commit:     d423af2c1af587b69f8caed6a0047713f76c198b
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Fri Jul  2 08:30:01 2021 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Fri Jul  2 08:30:28 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d423af2c

sys-fs/zfs-kmod: drop 2.0.4-r1

Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 sys-fs/zfs-kmod/Manifest                           |   2 -
 .../files/zfs-8.0.4_5.12_compat_bio_max_segs.patch |  91 ----------
 .../zfs-8.0.4_5.12_compat_iov_iter_advance.patch   |  40 ----
 .../files/zfs-8.0.4_5.12_compat_tmpfile.patch      |  89 ---------
 .../files/zfs-8.0.4_5.12_compat_userns.patch       | 173 ------------------
 .../zfs-8.0.4_spl_kmem_cache_slab_limit_16K.patch  |  59 ------
 .../zfs-kmod/files/zfs-8.0.4_stream_resume.patch   |  33 ----
 sys-fs/zfs-kmod/zfs-kmod-2.0.4-r1.ebuild           | 202 ---------------------
 8 files changed, 689 deletions(-)

diff --git a/sys-fs/zfs-kmod/Manifest b/sys-fs/zfs-kmod/Manifest
index bf47582ff92..8cc26888798 100644
--- a/sys-fs/zfs-kmod/Manifest
+++ b/sys-fs/zfs-kmod/Manifest
@@ -1,7 +1,5 @@
 DIST zfs-0.8.6.tar.gz 9295260 BLAKE2B 
45424d710aaf75a05f766ae523ae157a24b5cbdcefe72a59e4cede81e42f7a92ae7f01150388437b78cd49f3d28b9664599f2a624516e6b3f1073497194a99f2
 SHA512 
626b172554f39a5c70f6ea5c599a92fae52534590d1b0273de2bbfc3676d29dff0eade8ca17e5f179a59870c12bc758fb53b7900f8a1fdbdef3a9161b93f9cce
-DIST zfs-2.0.4.tar.gz 13123872 BLAKE2B 
7e4780092c0a87d5d187cd5734ddc736574db80b500f155287640ef2230e09335cc9b6b26ec1b7d8ab1b7942673ea49a3007a81da372a6d2ac36f3908913045c
 SHA512 
1dda92d424372bce7020f5215545485eae69211b6f0fb6bea3c7c22efac76c6a2662f0dd14a03f723b6a6fe73b1228ecca211a4034b86cf885bcadf38ba0dc6b
 DIST zfs-2.0.5.tar.gz 13166149 BLAKE2B 
4505c43a3b9a6c2b925383d00bbd9f17505290ded83f9bd3f08211769fa39254742340bdda65efd53f87f1708138517f91f8a43c01f3ce4191de200c84c77754
 SHA512 
ee1b3f0347442ee649a7ee8a2bb08208e011eea994076d30dd08dcd51dab29df0ff369b0c6e709346fa7de69cb07e0ffdceb34f01edb93d414578d1ffc6051ba
 DIST zfs-2.0.5.tar.gz.asc 836 BLAKE2B 
6bc53160ce650f63c717b67116fb754c7a8196c9aa99bb6e43f0145bb30a0446a1ba5695b8207b085435da289fa0058643201ef2f8827e12b0803ab20b0df305
 SHA512 
91e73a8da45e4f49113fc1af684143902a23c9cf5e59f8cd2f3a1214aeff57af63a7fa05dbe3fa0465f002521b89a43d6086d765d03209d83a41761d56b358aa
 DIST zfs-2.1.0-rc8.tar.gz 34830489 BLAKE2B 
c72c34888b6c0e1dff07483c8615296e5b917ae307fdcd510aeb3b6ba2cdc35df1abff523323b4f7f6b8b0b432c39f1e7e4e438c1eda365bee5791e56b82d852
 SHA512 
19617cf3c592d41585b0afb883a0d19cb7a1226f2e37590c6e4c8646422316d7ec9977b6d4844e88e676434452b9d437cd72b6da83fe0ccdac207d94b5c58a2b
 DIST zfs-2.1.0-rc8.tar.gz.asc 195 BLAKE2B 
46910365dec425edc72874ba8dd8e3138e35f0d1c32a5db38213d39ffa0645ed8e9044a182311db50c3cf3291efe00da32bb93b0d71a537e699a362ec3fbfb11
 SHA512 
3166a2a75d6c9253727663ebc52c6ab056d6a9b200616fd1dcdc0e0fa516aa90c6b5e1667852fc16186a202d866864efa70910291dd43665e667b57067df95ac
-DIST zfs-8.0.4_5.12_compat_idmapped_mounts.patch 41410 BLAKE2B 
49724351c5a8e6ffa66762d5aac84ad89a3d04022d086d9f37ccd616b3e8e95852197b5333bdeeeab54fc51516d8254d0138a4422cc66214bb602e5ed72bbabf
 SHA512 
1554d74a7024c106a3f4814895a64914f2e3d627f7edff3c8f415b419c6a596454862f8c0984a6e2f96e340851f1a9222a4c472ebd6d5db7dc0aa108dc2dca6c

diff --git a/sys-fs/zfs-kmod/files/zfs-8.0.4_5.12_compat_bio_max_segs.patch 
b/sys-fs/zfs-kmod/files/zfs-8.0.4_5.12_compat_bio_max_segs.patch
deleted file mode 100644
index 33f9a344e2f..00000000000
--- a/sys-fs/zfs-kmod/files/zfs-8.0.4_5.12_compat_bio_max_segs.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-From 77352db228c07ce8ba50478b9029820ca69c6c1b Mon Sep 17 00:00:00 2001
-From: Coleman Kane <ck...@colemankane.org>
-Date: Sat, 20 Mar 2021 01:33:42 -0400
-Subject: [PATCH] Linux 5.12 update: bio_max_segs() replaces BIO_MAX_PAGES
-
-The BIO_MAX_PAGES macro is being retired in favor of a bio_max_segs()
-function that implements the typical MIN(x,y) logic used throughout the
-kernel for bounding the allocation, and also the new implementation is
-intended to be signed-safe (which the former was not).
-
-Reviewed-by: Tony Hutter <hutt...@llnl.gov>
-Reviewed-by: Brian Behlendorf <behlendo...@llnl.gov>
-Signed-off-by: Coleman Kane <ck...@colemankane.org>
-Closes #11765
-(cherry picked from commit ffd6978ef59cfe2773e984bf03de2f0b93b03f5c)
-Signed-off-by: Jonathon Fernyhough <jonat...@m2x.dev>
----
- config/kernel-bio_max_segs.m4   | 23 +++++++++++++++++++++++
- config/kernel.m4                |  2 ++
- module/os/linux/zfs/vdev_disk.c |  5 +++++
- 3 files changed, 30 insertions(+)
- create mode 100644 config/kernel-bio_max_segs.m4
-
-diff --git a/config/kernel-bio_max_segs.m4 b/config/kernel-bio_max_segs.m4
-new file mode 100644
-index 00000000000..a90d75455c1
---- /dev/null
-+++ b/config/kernel-bio_max_segs.m4
-@@ -0,0 +1,23 @@
-+dnl #
-+dnl # 5.12 API change removes BIO_MAX_PAGES in favor of bio_max_segs()
-+dnl # which will handle the logic of setting the upper-bound to a
-+dnl # BIO_MAX_PAGES, internally.
-+dnl #
-+AC_DEFUN([ZFS_AC_KERNEL_SRC_BIO_MAX_SEGS], [
-+      ZFS_LINUX_TEST_SRC([bio_max_segs], [
-+              #include <linux/bio.h>
-+      ],[
-+              bio_max_segs(1);
-+      ])
-+])
-+
-+AC_DEFUN([ZFS_AC_KERNEL_BIO_MAX_SEGS], [
-+      AC_MSG_CHECKING([whether bio_max_segs() exists])
-+      ZFS_LINUX_TEST_RESULT([bio_max_segs], [
-+              AC_MSG_RESULT(yes)
-+
-+              AC_DEFINE([HAVE_BIO_MAX_SEGS], 1, [bio_max_segs() is 
implemented])
-+      ],[
-+              AC_MSG_RESULT(no)
-+      ])
-+])
-diff --git a/config/kernel.m4 b/config/kernel.m4
-index 51c7fb926ec..b8d53490a4a 100644
---- a/config/kernel.m4
-+++ b/config/kernel.m4
-@@ -127,6 +127,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
-       ZFS_AC_KERNEL_SRC_GENERIC_FILLATTR_USERNS
-       ZFS_AC_KERNEL_SRC_MKNOD
-       ZFS_AC_KERNEL_SRC_SYMLINK
-+      ZFS_AC_KERNEL_SRC_BIO_MAX_SEGS
- 
-       AC_MSG_CHECKING([for available kernel interfaces])
-       ZFS_LINUX_TEST_COMPILE_ALL([kabi])
-@@ -227,6 +228,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [
-       ZFS_AC_KERNEL_GENERIC_FILLATTR_USERNS
-       ZFS_AC_KERNEL_MKNOD
-       ZFS_AC_KERNEL_SYMLINK
-+      ZFS_AC_KERNEL_BIO_MAX_SEGS
- ])
- 
- dnl #
-diff --git a/module/os/linux/zfs/vdev_disk.c b/module/os/linux/zfs/vdev_disk.c
-index 08c33313407..aaaf4105979 100644
---- a/module/os/linux/zfs/vdev_disk.c
-+++ b/module/os/linux/zfs/vdev_disk.c
-@@ -593,9 +593,14 @@ __vdev_disk_physio(struct block_device *bdev, zio_t *zio,
-               }
- 
-               /* bio_alloc() with __GFP_WAIT never returns NULL */
-+#ifdef HAVE_BIO_MAX_SEGS
-+              dr->dr_bio[i] = bio_alloc(GFP_NOIO, bio_max_segs(
-+                  abd_nr_pages_off(zio->io_abd, bio_size, abd_offset)));
-+#else
-               dr->dr_bio[i] = bio_alloc(GFP_NOIO,
-                   MIN(abd_nr_pages_off(zio->io_abd, bio_size, abd_offset),
-                   BIO_MAX_PAGES));
-+#endif
-               if (unlikely(dr->dr_bio[i] == NULL)) {
-                       vdev_disk_dio_free(dr);
-                       return (SET_ERROR(ENOMEM));

diff --git a/sys-fs/zfs-kmod/files/zfs-8.0.4_5.12_compat_iov_iter_advance.patch 
b/sys-fs/zfs-kmod/files/zfs-8.0.4_5.12_compat_iov_iter_advance.patch
deleted file mode 100644
index 95ecda34652..00000000000
--- a/sys-fs/zfs-kmod/files/zfs-8.0.4_5.12_compat_iov_iter_advance.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 3e0bc63e1b0ca03493b936e92e871ca7ae451a0a Mon Sep 17 00:00:00 2001
-From: Rich Ercolani <214141+rincebr...@users.noreply.github.com>
-Date: Tue, 1 Jun 2021 14:58:08 -0400
-Subject: [PATCH] Remove iov_iter_advance() for iter_write
-
-The additional iter advance is incorrect, as copy_from_iter() has
-already done the right thing.  This will result in the following
-warning being printed to the console as of the 5.12 kernel.
-
-    Attempted to advance past end of bvec iter
-
-This change should have been included with #11378 when a
-similar change was made on the read side.
-
-Suggested-by: @siebenmann
-Reviewed-by: Brian Behlendorf <behlendo...@llnl.gov>
-Signed-off-by: Rich Ercolani <rincebr...@gmail.com>
-Issue #11378
-Closes #12041
-Closes #12155
-(cherry picked from commit 3f81aba7668143c6ca6fc44983d4c880606dea8f)
-Signed-off-by: Jonathon Fernyhough <jonat...@m2x.dev>
----
- module/os/linux/zfs/zpl_file.c | 3 ---
- 1 file changed, 3 deletions(-)
-
-diff --git a/module/os/linux/zfs/zpl_file.c b/module/os/linux/zfs/zpl_file.c
-index 08bf97ff338..e20c1dd413c 100644
---- a/module/os/linux/zfs/zpl_file.c
-+++ b/module/os/linux/zfs/zpl_file.c
-@@ -342,9 +342,6 @@ zpl_iter_write(struct kiocb *kiocb, struct iov_iter *from)
-       ssize_t wrote = count - uio.uio_resid;
-       kiocb->ki_pos += wrote;
- 
--      if (wrote > 0)
--              iov_iter_advance(from, wrote);
--
-       return (wrote);
- }
- 

diff --git a/sys-fs/zfs-kmod/files/zfs-8.0.4_5.12_compat_tmpfile.patch 
b/sys-fs/zfs-kmod/files/zfs-8.0.4_5.12_compat_tmpfile.patch
deleted file mode 100644
index 08acee82148..00000000000
--- a/sys-fs/zfs-kmod/files/zfs-8.0.4_5.12_compat_tmpfile.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From 6eced028dbbc2a44e32c4c0a76234ac2da9a365a Mon Sep 17 00:00:00 2001
-From: Rich Ercolani <214141+rincebr...@users.noreply.github.com>
-Date: Thu, 20 May 2021 19:02:36 -0400
-Subject: [PATCH] Update tmpfile() existence detection
-
-Linux changed the tmpfile() signature again in torvalds/linux@6521f89,
-which in turn broke our HAVE_TMPFILE detection in configure.
-
-Update that macro to include the new case, and change the signature of
-zpl_tmpfile as appropriate.
-
-Reviewed-by: Brian Behlendorf <behlendo...@llnl.gov>
-Signed-off-by: Rich Ercolani <rincebr...@gmail.com>
-Closes: #12060
-Closes: #12087
----
- config/kernel-tmpfile.m4        | 28 ++++++++++++++++++++++++----
- module/os/linux/zfs/zpl_inode.c |  5 +++++
- 2 files changed, 29 insertions(+), 4 deletions(-)
-
-diff --git a/config/kernel-tmpfile.m4 b/config/kernel-tmpfile.m4
-index f510bfe6ba0..45c2e6ceea5 100644
---- a/config/kernel-tmpfile.m4
-+++ b/config/kernel-tmpfile.m4
-@@ -3,23 +3,43 @@ dnl # 3.11 API change
- dnl # Add support for i_op->tmpfile
- dnl #
- AC_DEFUN([ZFS_AC_KERNEL_SRC_TMPFILE], [
--      ZFS_LINUX_TEST_SRC([inode_operations_tmpfile], [
-+      dnl #
-+      dnl # 5.11 API change
-+      dnl # add support for userns parameter to tmpfile
-+      dnl #
-+      ZFS_LINUX_TEST_SRC([inode_operations_tmpfile_userns], [
-               #include <linux/fs.h>
--              int tmpfile(struct inode *inode, struct dentry *dentry,
-+              int tmpfile(struct user_namespace *userns,
-+                  struct inode *inode, struct dentry *dentry,
-                   umode_t mode) { return 0; }
-               static struct inode_operations
-                   iops __attribute__ ((unused)) = {
-                       .tmpfile = tmpfile,
-               };
-       ],[])
-+      ZFS_LINUX_TEST_SRC([inode_operations_tmpfile], [
-+                      #include <linux/fs.h>
-+                      int tmpfile(struct inode *inode, struct dentry *dentry,
-+                          umode_t mode) { return 0; }
-+                      static struct inode_operations
-+                          iops __attribute__ ((unused)) = {
-+                              .tmpfile = tmpfile,
-+                      };
-+      ],[])
- ])
- 
- AC_DEFUN([ZFS_AC_KERNEL_TMPFILE], [
-       AC_MSG_CHECKING([whether i_op->tmpfile() exists])
--      ZFS_LINUX_TEST_RESULT([inode_operations_tmpfile], [
-+      ZFS_LINUX_TEST_RESULT([inode_operations_tmpfile_userns], [
-               AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_TMPFILE, 1, [i_op->tmpfile() exists])
-+              AC_DEFINE(HAVE_TMPFILE_USERNS, 1, [i_op->tmpfile() has userns])
-       ],[
--              AC_MSG_RESULT(no)
-+              ZFS_LINUX_TEST_RESULT([inode_operations_tmpfile], [
-+                      AC_MSG_RESULT(yes)
-+                      AC_DEFINE(HAVE_TMPFILE, 1, [i_op->tmpfile() exists])
-+              ],[
-+                      AC_MSG_RESULT(no)
-+              ])
-       ])
- ])
-diff --git a/module/os/linux/zfs/zpl_inode.c b/module/os/linux/zfs/zpl_inode.c
-index 364b9fbef24..ab0373ef9ba 100644
---- a/module/os/linux/zfs/zpl_inode.c
-+++ b/module/os/linux/zfs/zpl_inode.c
-@@ -218,7 +218,12 @@ zpl_mknod(struct inode *dir, struct dentry *dentry, 
umode_t mode,
- 
- #ifdef HAVE_TMPFILE
- static int
-+#ifdef HAVE_TMPFILE_USERNS
-+zpl_tmpfile(struct user_namespace *userns, struct inode *dir,
-+    struct dentry *dentry, umode_t mode)
-+#else
- zpl_tmpfile(struct inode *dir, struct dentry *dentry, umode_t mode)
-+#endif
- {
-       cred_t *cr = CRED();
-       struct inode *ip;

diff --git a/sys-fs/zfs-kmod/files/zfs-8.0.4_5.12_compat_userns.patch 
b/sys-fs/zfs-kmod/files/zfs-8.0.4_5.12_compat_userns.patch
deleted file mode 100644
index 1d8530ec8c6..00000000000
--- a/sys-fs/zfs-kmod/files/zfs-8.0.4_5.12_compat_userns.patch
+++ /dev/null
@@ -1,173 +0,0 @@
-From b3f8b103cb3a4bbb7ad41f6faf630be7baa4f585 Mon Sep 17 00:00:00 2001
-From: Rich Ercolani <214141+rincebr...@users.noreply.github.com>
-Date: Thu, 27 May 2021 11:55:49 -0400
-Subject: [PATCH] Bend zpl_set_acl to permit the new userns* parameter
-
-Just like #12087, the set_acl signature changed with all the bolted-on
-*userns parameters, which disabled set_acl usage, and caused #12076.
-
-Turn zpl_set_acl into zpl_set_acl and zpl_set_acl_impl, and add a
-new configure test for the new version.
-
-Reviewed-by: Brian Behlendorf <behlendo...@llnl.gov>
-Signed-off-by: Rich Ercolani <rincebr...@gmail.com>
-Closes #12076
-Closes #12093
----
- config/kernel-acl.m4            | 25 +++++++++++++++++++++--
- include/os/linux/zfs/sys/zpl.h  |  5 +++++
- module/os/linux/zfs/zpl_xattr.c | 35 ++++++++++++++++++++++-----------
- 3 files changed, 51 insertions(+), 14 deletions(-)
-
-diff --git a/config/kernel-acl.m4 b/config/kernel-acl.m4
-index e02ce665323..c6da4df24eb 100644
---- a/config/kernel-acl.m4
-+++ b/config/kernel-acl.m4
-@@ -189,7 +189,22 @@ dnl #
- dnl # 3.14 API change,
- dnl # Check if inode_operations contains the function set_acl
- dnl #
-+dnl # 5.12 API change,
-+dnl # set_acl() added a user_namespace* parameter first
-+dnl #
- AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_SET_ACL], [
-+      ZFS_LINUX_TEST_SRC([inode_operations_set_acl_userns], [
-+              #include <linux/fs.h>
-+
-+              int set_acl_fn(struct user_namespace *userns,
-+                  struct inode *inode, struct posix_acl *acl,
-+                  int type) { return 0; }
-+
-+              static const struct inode_operations
-+                  iops __attribute__ ((unused)) = {
-+                      .set_acl = set_acl_fn,
-+              };
-+      ],[])
-       ZFS_LINUX_TEST_SRC([inode_operations_set_acl], [
-               #include <linux/fs.h>
- 
-@@ -205,11 +220,17 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_SET_ACL], [
- 
- AC_DEFUN([ZFS_AC_KERNEL_INODE_OPERATIONS_SET_ACL], [
-       AC_MSG_CHECKING([whether iops->set_acl() exists])
--      ZFS_LINUX_TEST_RESULT([inode_operations_set_acl], [
-+      ZFS_LINUX_TEST_RESULT([inode_operations_set_acl_userns], [
-               AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_SET_ACL, 1, [iops->set_acl() exists])
-+              AC_DEFINE(HAVE_SET_ACL_USERNS, 1, [iops->set_acl() takes 4 
args])
-       ],[
--              AC_MSG_RESULT(no)
-+              ZFS_LINUX_TEST_RESULT([inode_operations_set_acl], [
-+                      AC_MSG_RESULT(yes)
-+                      AC_DEFINE(HAVE_SET_ACL, 1, [iops->set_acl() exists, 
takes 3 args])
-+              ],[
-+                      AC_MSG_RESULT(no)
-+              ])
-       ])
- ])
- 
-diff --git a/include/os/linux/zfs/sys/zpl.h b/include/os/linux/zfs/sys/zpl.h
-index 21825d1f378..54f3fa0fdb0 100644
---- a/include/os/linux/zfs/sys/zpl.h
-+++ b/include/os/linux/zfs/sys/zpl.h
-@@ -63,7 +63,12 @@ extern int zpl_xattr_security_init(struct inode *ip, struct 
inode *dip,
-     const struct qstr *qstr);
- #if defined(CONFIG_FS_POSIX_ACL)
- #if defined(HAVE_SET_ACL)
-+#if defined(HAVE_SET_ACL_USERNS)
-+extern int zpl_set_acl(struct user_namespace *userns, struct inode *ip,
-+    struct posix_acl *acl, int type);
-+#else
- extern int zpl_set_acl(struct inode *ip, struct posix_acl *acl, int type);
-+#endif /* HAVE_SET_ACL_USERNS */
- #endif /* HAVE_SET_ACL */
- extern struct posix_acl *zpl_get_acl(struct inode *ip, int type);
- extern int zpl_init_acl(struct inode *ip, struct inode *dir);
-diff --git a/module/os/linux/zfs/zpl_xattr.c b/module/os/linux/zfs/zpl_xattr.c
-index 5e35f90df85..89ba9de14f6 100644
---- a/module/os/linux/zfs/zpl_xattr.c
-+++ b/module/os/linux/zfs/zpl_xattr.c
-@@ -926,11 +926,8 @@ xattr_handler_t zpl_xattr_security_handler = {
-  * attribute implemented by filesystems in the kernel." - xattr(7)
-  */
- #ifdef CONFIG_FS_POSIX_ACL
--#ifndef HAVE_SET_ACL
--static
--#endif
--int
--zpl_set_acl(struct inode *ip, struct posix_acl *acl, int type)
-+static int
-+zpl_set_acl_impl(struct inode *ip, struct posix_acl *acl, int type)
- {
-       char *name, *value = NULL;
-       int error = 0;
-@@ -1002,6 +999,19 @@ zpl_set_acl(struct inode *ip, struct posix_acl *acl, int 
type)
-       return (error);
- }
- 
-+#ifdef HAVE_SET_ACL
-+int
-+#ifdef HAVE_SET_ACL_USERNS
-+zpl_set_acl(struct user_namespace *userns, struct inode *ip,
-+    struct posix_acl *acl, int type)
-+#else
-+zpl_set_acl(struct inode *ip, struct posix_acl *acl, int type)
-+#endif /* HAVE_SET_ACL_USERNS */
-+{
-+      return (zpl_set_acl_impl(ip, acl, type));
-+}
-+#endif /* HAVE_SET_ACL */
-+
- struct posix_acl *
- zpl_get_acl(struct inode *ip, int type)
- {
-@@ -1083,7 +1093,7 @@ zpl_init_acl(struct inode *ip, struct inode *dir)
-               umode_t mode;
- 
-               if (S_ISDIR(ip->i_mode)) {
--                      error = zpl_set_acl(ip, acl, ACL_TYPE_DEFAULT);
-+                      error = zpl_set_acl_impl(ip, acl, ACL_TYPE_DEFAULT);
-                       if (error)
-                               goto out;
-               }
-@@ -1093,8 +1103,10 @@ zpl_init_acl(struct inode *ip, struct inode *dir)
-               if (error >= 0) {
-                       ip->i_mode = mode;
-                       zfs_mark_inode_dirty(ip);
--                      if (error > 0)
--                              error = zpl_set_acl(ip, acl, ACL_TYPE_ACCESS);
-+                      if (error > 0) {
-+                              error = zpl_set_acl_impl(ip, acl,
-+                                  ACL_TYPE_ACCESS);
-+                      }
-               }
-       }
- out:
-@@ -1121,7 +1133,7 @@ zpl_chmod_acl(struct inode *ip)
- 
-       error = __posix_acl_chmod(&acl, GFP_KERNEL, ip->i_mode);
-       if (!error)
--              error = zpl_set_acl(ip, acl, ACL_TYPE_ACCESS);
-+              error = zpl_set_acl_impl(ip, acl, ACL_TYPE_ACCESS);
- 
-       zpl_posix_acl_release(acl);
- 
-@@ -1250,8 +1262,7 @@ __zpl_xattr_acl_set_access(struct inode *ip, const char 
*name,
-       } else {
-               acl = NULL;
-       }
--
--      error = zpl_set_acl(ip, acl, type);
-+      error = zpl_set_acl_impl(ip, acl, type);
-       zpl_posix_acl_release(acl);
- 
-       return (error);
-@@ -1291,7 +1302,7 @@ __zpl_xattr_acl_set_default(struct inode *ip, const char 
*name,
-               acl = NULL;
-       }
- 
--      error = zpl_set_acl(ip, acl, type);
-+      error = zpl_set_acl_impl(ip, acl, type);
-       zpl_posix_acl_release(acl);
- 
-       return (error);

diff --git 
a/sys-fs/zfs-kmod/files/zfs-8.0.4_spl_kmem_cache_slab_limit_16K.patch 
b/sys-fs/zfs-kmod/files/zfs-8.0.4_spl_kmem_cache_slab_limit_16K.patch
deleted file mode 100644
index 3448f76a801..00000000000
--- a/sys-fs/zfs-kmod/files/zfs-8.0.4_spl_kmem_cache_slab_limit_16K.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 783784582225e8ddfbf07993d9fc278bf08025c5 Mon Sep 17 00:00:00 2001
-From: Brian Behlendorf <behlendo...@llnl.gov>
-Date: Thu, 3 Jun 2021 13:37:45 -0700
-Subject: [PATCH] Linux: Set spl_kmem_cache_slab_limit when page size !4K
-
-For small objects the kernel's slab implementation is very fast and
-space efficient. However, as the allocation size increases to
-require multiple pages performance suffers. The SPL kmem cache
-allocator was designed to better handle these large allocation
-sizes. Therefore, on Linux the kmem_cache_* compatibility wrappers
-prefer to use the kernel's slab allocator for small objects and
-the custom SPL kmem cache allocator for larger objects.
-
-This logic was effectively disabled for all architectures using
-a non-4K page size which caused all kmem caches to only use the
-SPL implementation. Functionally this is fine, but the SPL code
-which calculates the target number of objects per-slab does not
-take in to account that __vmalloc() always returns page-aligned
-memory. This can result in a massive amount of wasted space when
-allocating tiny objects on a platform using large pages (64k).
-
-To resolve this issue we set the spl_kmem_cache_slab_limit cutoff
-to 16K for all architectures.
-
-This particular change does not attempt to update the logic used
-to calculate the optimal number of pages per slab. This remains
-an issue which should be addressed in a future change.
-
-Reviewed-by: Matthew Ahrens <mahr...@delphix.com>
-Reviewed-by: Tony Nguyen <tony.ngu...@delphix.com>
-Signed-off-by: Brian Behlendorf <behlendo...@llnl.gov>
-Closes #12152
-Closes #11429
-Closes #11574
-Closes #12150
----
- module/os/linux/spl/spl-kmem-cache.c | 7 ++-----
- 1 file changed, 2 insertions(+), 5 deletions(-)
-
-diff --git a/module/os/linux/spl/spl-kmem-cache.c 
b/module/os/linux/spl/spl-kmem-cache.c
-index 3699b6a159a..2151ef008fd 100644
---- a/module/os/linux/spl/spl-kmem-cache.c
-+++ b/module/os/linux/spl/spl-kmem-cache.c
-@@ -100,13 +100,10 @@ MODULE_PARM_DESC(spl_kmem_cache_max_size, "Maximum size 
of slab in MB");
-  * For small objects the Linux slab allocator should be used to make the most
-  * efficient use of the memory.  However, large objects are not supported by
-  * the Linux slab and therefore the SPL implementation is preferred.  A cutoff
-- * of 16K was determined to be optimal for architectures using 4K pages.
-+ * of 16K was determined to be optimal for architectures using 4K pages and
-+ * to also work well on architecutres using larger 64K page sizes.
-  */
--#if PAGE_SIZE == 4096
- unsigned int spl_kmem_cache_slab_limit = 16384;
--#else
--unsigned int spl_kmem_cache_slab_limit = 0;
--#endif
- module_param(spl_kmem_cache_slab_limit, uint, 0644);
- MODULE_PARM_DESC(spl_kmem_cache_slab_limit,
-       "Objects less than N bytes use the Linux slab");

diff --git a/sys-fs/zfs-kmod/files/zfs-8.0.4_stream_resume.patch 
b/sys-fs/zfs-kmod/files/zfs-8.0.4_stream_resume.patch
deleted file mode 100644
index 196fab65f4a..00000000000
--- a/sys-fs/zfs-kmod/files/zfs-8.0.4_stream_resume.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From ee2a9d2c771657168652e058477b81389c662b5e Mon Sep 17 00:00:00 2001
-From: Paul Zuchowski <31706010+paulz...@users.noreply.github.com>
-Date: Fri, 14 May 2021 00:46:14 -0400
-Subject: [PATCH] Fix dmu_recv_stream test for resumable
-
-Use dsl_dataset_has_resume_receive_state()
-not dsl_dataset_is_zapified() to check if
-stream is resumable.
-
-Reviewed-by: Matthew Ahrens <mahr...@delphix.com>
-Reviewed-by: Alek Pinchuk <apinc...@axcient.com>
-Reviewed-by: Ryan Moeller <r...@ixsystems.com>
-Signed-off-by: Paul Zuchowski <pzuchow...@datto.com>
-Closes #12034
----
- module/zfs/dmu_recv.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/module/zfs/dmu_recv.c b/module/zfs/dmu_recv.c
-index b5414749f7f..f44b397853f 100644
---- a/module/zfs/dmu_recv.c
-+++ b/module/zfs/dmu_recv.c
-@@ -2878,8 +2878,8 @@ dmu_recv_stream(dmu_recv_cookie_t *drc, offset_t *voffp)
-       int err = 0;
-       struct receive_writer_arg *rwa = kmem_zalloc(sizeof (*rwa), KM_SLEEP);
- 
--      if (dsl_dataset_is_zapified(drc->drc_ds)) {
--              uint64_t bytes;
-+      if (dsl_dataset_has_resume_receive_state(drc->drc_ds)) {
-+              uint64_t bytes = 0;
-               (void) zap_lookup(drc->drc_ds->ds_dir->dd_pool->dp_meta_objset,
-                   drc->drc_ds->ds_object, DS_FIELD_RESUME_BYTES,
-                   sizeof (bytes), 1, &bytes);

diff --git a/sys-fs/zfs-kmod/zfs-kmod-2.0.4-r1.ebuild 
b/sys-fs/zfs-kmod/zfs-kmod-2.0.4-r1.ebuild
deleted file mode 100644
index 18391c3ffa9..00000000000
--- a/sys-fs/zfs-kmod/zfs-kmod-2.0.4-r1.ebuild
+++ /dev/null
@@ -1,202 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit autotools dist-kernel-utils flag-o-matic linux-mod toolchain-funcs
-
-DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
-HOMEPAGE="https://github.com/openzfs/zfs";
-
-if [[ ${PV} == "9999" ]]; then
-       inherit git-r3
-       EGIT_REPO_URI="https://github.com/openzfs/zfs.git";
-else
-       MY_PV="${PV/_rc/-rc}"
-       
SRC_URI="https://github.com/openzfs/zfs/releases/download/zfs-${MY_PV}/zfs-${MY_PV}.tar.gz
-               
https://github.com/openzfs/zfs/commit/f315d9a3ff3cc0b81c99dd9be5878a55d2e98d8e.patch
 -> zfs-8.0.4_5.12_compat_idmapped_mounts.patch"
-       KEYWORDS="~amd64 ~arm64 ~ppc64"
-       S="${WORKDIR}/zfs-${PV%_rc?}"
-       ZFS_KERNEL_COMPAT="5.12"
-fi
-
-LICENSE="CDDL MIT debug? ( GPL-2+ )"
-SLOT="0/${PVR}"
-IUSE="custom-cflags debug +rootfs"
-
-DEPEND=""
-
-RDEPEND="${DEPEND}
-       !sys-kernel/spl
-"
-
-BDEPEND="
-       dev-lang/perl
-       virtual/awk
-"
-
-# PDEPEND in this form is needed to trick portage suggest
-# enabling dist-kernel if only 1 package have it set
-PDEPEND="dist-kernel? ( ~sys-fs/zfs-${PV}[dist-kernel] )"
-
-RESTRICT="debug? ( strip ) test"
-
-DOCS=( AUTHORS COPYRIGHT META README.md )
-
-pkg_pretend() {
-       use rootfs || return 0
-
-       if has_version virtual/dist-kernel && ! use dist-kernel; then
-               ewarn "You have virtual/dist-kernel installed, but"
-               ewarn "USE=\"dist-kernel\" is not enabled for ${CATEGORY}/${PN}"
-               ewarn "It's recommended to globally enable dist-kernel USE flag"
-               ewarn "to auto-trigger initrd rebuilds with kernel updates"
-       fi
-}
-
-PATCHES=(
-       "${DISTDIR}"/zfs-8.0.4_5.12_compat_idmapped_mounts.patch
-       "${FILESDIR}"/zfs-8.0.4_5.12_compat_bio_max_segs.patch
-       "${FILESDIR}"/zfs-8.0.4_5.12_compat_tmpfile.patch
-       "${FILESDIR}"/zfs-8.0.4_5.12_compat_userns.patch
-       "${FILESDIR}"/zfs-8.0.4_5.12_compat_iov_iter_advance.patch
-       "${FILESDIR}"/zfs-8.0.4_stream_resume.patch
-       "${FILESDIR}"/zfs-8.0.4_spl_kmem_cache_slab_limit_16K.patch
-)
-
-pkg_setup() {
-       CONFIG_CHECK="
-               !DEBUG_LOCK_ALLOC
-               EFI_PARTITION
-               MODULES
-               !PAX_KERNEXEC_PLUGIN_METHOD_OR
-               !TRIM_UNUSED_KSYMS
-               ZLIB_DEFLATE
-               ZLIB_INFLATE
-       "
-
-       use debug && CONFIG_CHECK="${CONFIG_CHECK}
-               FRAME_POINTER
-               DEBUG_INFO
-               !DEBUG_INFO_REDUCED
-       "
-
-       use rootfs && \
-               CONFIG_CHECK="${CONFIG_CHECK}
-                       BLK_DEV_INITRD
-                       DEVTMPFS
-       "
-
-       kernel_is -lt 5 && CONFIG_CHECK="${CONFIG_CHECK} IOSCHED_NOOP"
-
-       if [[ ${PV} != "9999" ]]; then
-               local kv_major_max kv_minor_max zcompat
-               zcompat="${ZFS_KERNEL_COMPAT_OVERRIDE:-${ZFS_KERNEL_COMPAT}}"
-               kv_major_max="${zcompat%%.*}"
-               zcompat="${zcompat#*.}"
-               kv_minor_max="${zcompat%%.*}"
-               kernel_is -le "${kv_major_max}" "${kv_minor_max}" || die \
-                       "Linux ${kv_major_max}.${kv_minor_max} is the latest 
supported version"
-
-       fi
-
-       kernel_is -ge 3 10 || die "Linux 3.10 or newer required"
-
-       linux-mod_pkg_setup
-}
-
-src_prepare() {
-       default
-       eautoreconf
-       # Set module revision number
-       sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" META || die "Could not 
set Gentoo release"
-}
-
-src_configure() {
-       set_arch_to_kernel
-
-       use custom-cflags || strip-flags
-
-       filter-ldflags -Wl,*
-
-       local myconf=(
-               CROSS_COMPILE="${CHOST}-"
-               HOSTCC="$(tc-getBUILD_CC)"
-               --bindir="${EPREFIX}/bin"
-               --sbindir="${EPREFIX}/sbin"
-               --with-config=kernel
-               --with-linux="${KV_DIR}"
-               --with-linux-obj="${KV_OUT_DIR}"
-               $(use_enable debug)
-       )
-
-       econf "${myconf[@]}"
-}
-
-src_compile() {
-       set_arch_to_kernel
-
-       myemakeargs=(
-               CROSS_COMPILE="${CHOST}-"
-               HOSTCC="$(tc-getBUILD_CC)"
-               V=1
-       )
-
-       emake "${myemakeargs[@]}"
-}
-
-src_install() {
-       set_arch_to_kernel
-
-       myemakeargs+=(
-               DEPMOD=:
-               DESTDIR="${D}"
-               INSTALL_MOD_PATH="${EPREFIX:-/}" # lib/modules/<kver> added by 
KBUILD
-       )
-
-       emake "${myemakeargs[@]}" install
-
-       einstalldocs
-}
-
-pkg_postinst() {
-       linux-mod_pkg_postinst
-
-       # Remove old modules
-       if [[ -d "${EROOT}/lib/modules/${KV_FULL}/addon/zfs" ]]; then
-               ewarn "${PN} now installs modules in 
${EROOT}/lib/modules/${KV_FULL}/extra/zfs"
-               ewarn "Old modules were detected in 
${EROOT}/lib/modules/${KV_FULL}/addon/zfs"
-               ewarn "Automatically removing old modules to avoid problems."
-               rm -r "${EROOT}/lib/modules/${KV_FULL}/addon/zfs" || die 
"Cannot remove modules"
-               rmdir --ignore-fail-on-non-empty 
"${EROOT}/lib/modules/${KV_FULL}/addon"
-       fi
-
-       if [[ -z ${ROOT} ]] && use dist-kernel; then
-               set_arch_to_portage
-               dist-kernel_reinstall_initramfs "${KV_DIR}" "${KV_FULL}"
-       fi
-
-       if use x86 || use arm; then
-               ewarn "32-bit kernels will likely require increasing vmalloc to"
-               ewarn "at least 256M and decreasing zfs_arc_max to some value 
less than that."
-       fi
-
-       ewarn "This version of OpenZFS includes support for new feature flags"
-       ewarn "that are incompatible with previous versions. GRUB2 support for"
-       ewarn "/boot with the new feature flags is not yet available."
-       ewarn "Do *NOT* upgrade root pools to use the new feature flags."
-       ewarn "Any new pools will be created with the new feature flags by 
default"
-       ewarn "and will not be compatible with older versions of ZFSOnLinux. To"
-       ewarn "create a newpool that is backward compatible wih GRUB2, use "
-       ewarn
-       ewarn "zpool create -d -o feature@async_destroy=enabled "
-       ewarn " -o feature@empty_bpobj=enabled -o feature@lz4_compress=enabled"
-       ewarn " -o feature@spacemap_histogram=enabled"
-       ewarn " -o feature@enabled_txg=enabled "
-       ewarn " -o feature@extensible_dataset=enabled -o 
feature@bookmarks=enabled"
-       ewarn " ..."
-       ewarn
-       ewarn "GRUB2 support will be updated as soon as either the GRUB2"
-       ewarn "developers do a tag or the Gentoo developers find time to 
backport"
-       ewarn "support from GRUB2 HEAD."
-}

Reply via email to