summaryrefslogtreecommitdiff
path: root/sys-fs/zfs-kmod
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-07-03 22:39:47 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-07-03 22:39:47 +0100
commit7f0ccc917c7abe6223784c703d86cd14755691fb (patch)
tree8c6793f68896b341e22f33d7e6cef88e481f4a8b /sys-fs/zfs-kmod
parent9aa80713372911cec499b3adb2cd746790920916 (diff)
gentoo resync : 03.07.2021
Diffstat (limited to 'sys-fs/zfs-kmod')
-rw-r--r--sys-fs/zfs-kmod/Manifest19
-rw-r--r--sys-fs/zfs-kmod/files/zfs-8.0.4_5.12_compat_bio_max_segs.patch91
-rw-r--r--sys-fs/zfs-kmod/files/zfs-8.0.4_5.12_compat_iov_iter_advance.patch40
-rw-r--r--sys-fs/zfs-kmod/files/zfs-8.0.4_5.12_compat_tmpfile.patch89
-rw-r--r--sys-fs/zfs-kmod/files/zfs-8.0.4_5.12_compat_userns.patch173
-rw-r--r--sys-fs/zfs-kmod/files/zfs-8.0.4_spl_kmem_cache_slab_limit_16K.patch59
-rw-r--r--sys-fs/zfs-kmod/files/zfs-8.0.4_stream_resume.patch33
-rw-r--r--sys-fs/zfs-kmod/zfs-kmod-2.0.4-r1.ebuild202
-rw-r--r--sys-fs/zfs-kmod/zfs-kmod-2.0.5.ebuild2
-rw-r--r--sys-fs/zfs-kmod/zfs-kmod-2.1.0.ebuild (renamed from sys-fs/zfs-kmod/zfs-kmod-2.1.0_rc7.ebuild)42
-rw-r--r--sys-fs/zfs-kmod/zfs-kmod-9999.ebuild42
11 files changed, 34 insertions, 758 deletions
diff --git a/sys-fs/zfs-kmod/Manifest b/sys-fs/zfs-kmod/Manifest
index 5db26ee949ae..55c17eecb6c8 100644
--- a/sys-fs/zfs-kmod/Manifest
+++ b/sys-fs/zfs-kmod/Manifest
@@ -1,20 +1,11 @@
AUX 0.8.6-copy-builtin.patch 988 BLAKE2B f79add4b341075e3cd98b6aee4bb74b8fadd28b5ee1062f9260c0418909d380cdd2d637b52d4959ec19cafec1e55b1d05cd6bc358fdffbd6dc1b159e9935083d SHA512 af6b73a2d9d1b4e028c9b959950934798f4d048211d6e4a7e94595982ad2dc8bb4befd52122e3fa0890548e192f2f2ae41d877cad057543e940a7c2710c81a23
-AUX zfs-8.0.4_5.12_compat_bio_max_segs.patch 3134 BLAKE2B cfe0d17448f25ec649ca7cf0bb7ee4f2685d09b2fa693b411f31a4035e113627c8be73514b39f2460646b9a556a133afcbfc803675d93d1fd5d93d64d8b4e7b2 SHA512 c8a9893bfee7622fe9ebf61d311fd3701311d3e037cb0d69667b80a7e4d1ddb84e614b3631f2ae768223ea12fafa653f11ed99acdb973b487bdc98e143fe882d
-AUX zfs-8.0.4_5.12_compat_iov_iter_advance.patch 1357 BLAKE2B c32c94c233cc15f1db4166d293b7e0030f51c9ba6ba185293a2c068419a64c46288244e6096f69f55e5bd19006729b080cb95966519eb8db142a494d9f147878 SHA512 85d6cae52d088789930e130b5f62f9e9955e7b2e3e60f8624cf9cfe8b4b032a951ea605dbff5ed8164ec5eef66efa119238ddb9e5c64351b81dccebef94b8787
-AUX zfs-8.0.4_5.12_compat_tmpfile.patch 3013 BLAKE2B b1012123a6d9ddd03b7db83075447eba99c8fb4e3bf4f4e8a54d9defe2c4e6b752bda70d8512a8da68f509fc832acbaf2eb73c6673123553ac38c99095d7f872 SHA512 a981aa41fdf4c377f031d312c3f480152e80976f3ffa9e85f07918c599e3d5d70fb8310a0f1da0a0ebadf123408993134ef599d2750e16ea82e16dd060f198f8
-AUX zfs-8.0.4_5.12_compat_userns.patch 5612 BLAKE2B 556d3850a2c7f74370702ad354f64424170682f6499b6a5e1a58c45e20ddb082109a541b8613b815820569aeab5c322e180d8f0d0a6cea4799e11dd9afbe464e SHA512 b80f0e836db9008d5d0779ca8640c6cf0f6798cde66913391083236402e70907809c7f64f70008e53d5517e764c3f5678fadeb538ef30c98fc1f90e863deb400
-AUX zfs-8.0.4_spl_kmem_cache_slab_limit_16K.patch 2770 BLAKE2B f56051e4b2411fb7864989db6dd0dc56b09365b9326f131dc7d79d050ac18668d1c1e403c5d51471a0b65bf53954bf6f03b0c8b2b497b79cbc2b36abf58b144e SHA512 edf2be80a5d331181ffc3cfe32eaed20975181d63f9a68f1cea006f7d12f946c7e04003fc5062d34eef81079ae777e50e0ee533707b20a49e2411e3286d6c140
-AUX zfs-8.0.4_stream_resume.patch 1263 BLAKE2B 4454568cfcafa9b6b7ba6de94df728da349f1dff9803c21fc4d9613af17b65dc59ba2c7cf9584d1456cf454e4ba1bf9a9467e0b181d097861d649ffd32461bf4 SHA512 074b633a39930030ca45d49d1ea0c97a8e70a7b63feaabb010e8fc724940ae5989c1feae67affb03b7d6aafe68537afea032688f4b57ec2663848aaa93340710
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-rc7.tar.gz 34800406 BLAKE2B a645c3e19f521a7abb606cbcd619ea019abeb7810bd6476ecddcd76c7c801d6f1e3f197d49199eac72497db5c529b22bcd605b2e7ec2c236aec5216dc99b7dc1 SHA512 4e1cb1cc83454d92cac58110c219fca28dcf8361a5ea27dca955a5c88434b6e9ccd68892d93bf14d773056760f1907e004e65cc5d653308dd8996692ecba61f1
-DIST zfs-2.1.0-rc7.tar.gz.asc 195 BLAKE2B b772bba2f64bec51f11b5c51564a1449cd37d5e8e5c90eee1eb5c357193cab187bdeceef299c95622aed9c03601c1b5d67a941de12003c01e0af9ad68e82bfa2 SHA512 6c48eeab7658db1e9bac54da2f73087b1a58046504c507c94e58478f03f3b37336af254947964dbf9383575dc2cb3019640c7286ab0dfa5d5d9f55df96b34864
-DIST zfs-8.0.4_5.12_compat_idmapped_mounts.patch 41410 BLAKE2B 49724351c5a8e6ffa66762d5aac84ad89a3d04022d086d9f37ccd616b3e8e95852197b5333bdeeeab54fc51516d8254d0138a4422cc66214bb602e5ed72bbabf SHA512 1554d74a7024c106a3f4814895a64914f2e3d627f7edff3c8f415b419c6a596454862f8c0984a6e2f96e340851f1a9222a4c472ebd6d5db7dc0aa108dc2dca6c
+DIST zfs-2.1.0.tar.gz 34810470 BLAKE2B f7cc1cde711c255bacb000207b8e9a594105d18601a503d75a2a3055ed29ca941e148492fe52809f81a250848cfb5868b3d1c42860464a3d7d744a416db08929 SHA512 2121b90a1d4d92353801c48a2e34e2dd42bd295dacc3c30aa77cde967a1326e17c983bdd6905552421df0a652c09e84b3d4d2ba01001e053b8afb12e189c046f
+DIST zfs-2.1.0.tar.gz.asc 195 BLAKE2B d5a7c01c7fd1798a235d5bc9ba89353a85978ac8bb1eaec1c587b8cc6d7cd24b0d7613c465a8da7ba29a172e4ebd6e465f893145d9dd7adf11d7e3858fea835a SHA512 1c5c8d20adbcc27c5e5d760a84e258a897dee7c3950ef1eb56f3ef6bd1c85516c7776ce30b3e63229cd65315d43e06b5e04c587e9483b96b00adb42d24749c1a
EBUILD zfs-kmod-0.8.6.ebuild 5334 BLAKE2B abaa4b20899db464246d9c445ba55d938ba1982a2686a2c6b22fcc213e76551d2a28a59709760dd5e15af6cfdc8e4999713ae4d1efd3275c02a85f1dfc5b3275 SHA512 f67b1c4483f2a985256c18dcaf232c47219726f67c9fa95b184be6e608dc997b2beab18bd5863d32afcc92da0bad5c3ef8337a8878cf060d45b3931e8e736b77
-EBUILD zfs-kmod-2.0.4-r1.ebuild 5500 BLAKE2B 00a6b354c212eb2435588480e931aa343f37060e9d37a898b2bee95cb8a0760e348b10e92b138f0b7d06819d96433b3f94e4e4c0ae99af76d0902d765034053a SHA512 f97ee0af77cc8a7ed932984dd8d2709293f7df2f438806647ffbaa3edc5de0c9309e6340cb5912e95840bf3b20d6a8cb06a15726c107b02e3a89ceca5ee2a63f
-EBUILD zfs-kmod-2.0.5.ebuild 5372 BLAKE2B 98ce65e9b1196d12763608697436fe2b02790f2e987370bb4b9ad2f312f6a723a7a425e64aa31e447ccc7d80581ca97e47348b3ec007fe66b0ff0f334c539cdc SHA512 b121a44505341681c7b3f2de8bf03e3135e5f5a55aa71f6010f91610f14d03ec606bf6c7dfb018198c4fe1985824ac5478a6f1cf2e16a7e0c3a2795a177e95bf
-EBUILD zfs-kmod-2.1.0_rc7.ebuild 5372 BLAKE2B 98ce65e9b1196d12763608697436fe2b02790f2e987370bb4b9ad2f312f6a723a7a425e64aa31e447ccc7d80581ca97e47348b3ec007fe66b0ff0f334c539cdc SHA512 b121a44505341681c7b3f2de8bf03e3135e5f5a55aa71f6010f91610f14d03ec606bf6c7dfb018198c4fe1985824ac5478a6f1cf2e16a7e0c3a2795a177e95bf
-EBUILD zfs-kmod-9999.ebuild 5372 BLAKE2B 98ce65e9b1196d12763608697436fe2b02790f2e987370bb4b9ad2f312f6a723a7a425e64aa31e447ccc7d80581ca97e47348b3ec007fe66b0ff0f334c539cdc SHA512 b121a44505341681c7b3f2de8bf03e3135e5f5a55aa71f6010f91610f14d03ec606bf6c7dfb018198c4fe1985824ac5478a6f1cf2e16a7e0c3a2795a177e95bf
+EBUILD zfs-kmod-2.0.5.ebuild 5369 BLAKE2B e8ad56e7d466f9663d30a06c52ea06d3ebafc2cc4565caf2b57b6d2355878806ef859f74e43dce2b3622820d64b57dfca21d59ac2fad32c789ab3f1ee2160071 SHA512 df15493fb58aaa9c9fd46ec1017d159478be417f8b480ecfc7abe5bbdd3bf1917d8204428763c79363578a59d26e5691a49ee0698a54a7a3e58ea8a40b1469bf
+EBUILD zfs-kmod-2.1.0.ebuild 4578 BLAKE2B 7555ad82359618753003e5ef2e7e3e2f51405c748aa1c58b6a6019358353f240caa57629ad9bdfacf440cfa9dabf3b2b0d726acbcbc607fc114309e0d89206d0 SHA512 30b8887454da16b66f244ca1ce6a78a8486f09183c3b95316df673292e53ca1ec87706638f725235183779e3464673a6ee73f37aa5d1484ce4ee6441144edb56
+EBUILD zfs-kmod-9999.ebuild 4578 BLAKE2B 7555ad82359618753003e5ef2e7e3e2f51405c748aa1c58b6a6019358353f240caa57629ad9bdfacf440cfa9dabf3b2b0d726acbcbc607fc114309e0d89206d0 SHA512 30b8887454da16b66f244ca1ce6a78a8486f09183c3b95316df673292e53ca1ec87706638f725235183779e3464673a6ee73f37aa5d1484ce4ee6441144edb56
MISC metadata.xml 548 BLAKE2B 0245ac0b73ed129ce2df41358814d46749fab0463a03fceb643010629cd522460e84c5b8c0247f499adf4ed2e781e0d6f6857a3c6be4f4fb206eeabba158e86c SHA512 2b98b289369d875c5ff89825590a98c9764a1b716df1b79c852dbb833f4f02d5c66782f43084a1acde11a0ba2cb9ef2956b35c10881f77ec92d6749566276e6b
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 33f9a344e2f2..000000000000
--- 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 <ckane@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 <hutter2@llnl.gov>
-Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
-Signed-off-by: Coleman Kane <ckane@colemankane.org>
-Closes #11765
-(cherry picked from commit ffd6978ef59cfe2773e984bf03de2f0b93b03f5c)
-Signed-off-by: Jonathon Fernyhough <jonathon@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 95ecda34652c..000000000000
--- 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+rincebrain@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 <behlendorf1@llnl.gov>
-Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
-Issue #11378
-Closes #12041
-Closes #12155
-(cherry picked from commit 3f81aba7668143c6ca6fc44983d4c880606dea8f)
-Signed-off-by: Jonathon Fernyhough <jonathon@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 08acee821489..000000000000
--- 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+rincebrain@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 <behlendorf1@llnl.gov>
-Signed-off-by: Rich Ercolani <rincebrain@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 1d8530ec8c6c..000000000000
--- 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+rincebrain@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 <behlendorf1@llnl.gov>
-Signed-off-by: Rich Ercolani <rincebrain@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 3448f76a8012..000000000000
--- 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 <behlendorf1@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 <mahrens@delphix.com>
-Reviewed-by: Tony Nguyen <tony.nguyen@delphix.com>
-Signed-off-by: Brian Behlendorf <behlendorf1@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 196fab65f4ab..000000000000
--- 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-98@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 <mahrens@delphix.com>
-Reviewed-by: Alek Pinchuk <apinchuk@axcient.com>
-Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
-Signed-off-by: Paul Zuchowski <pzuchowski@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 18391c3ffa91..000000000000
--- 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."
-}
diff --git a/sys-fs/zfs-kmod/zfs-kmod-2.0.5.ebuild b/sys-fs/zfs-kmod/zfs-kmod-2.0.5.ebuild
index 27cf80ed4300..1b360228eba2 100644
--- a/sys-fs/zfs-kmod/zfs-kmod-2.0.5.ebuild
+++ b/sys-fs/zfs-kmod/zfs-kmod-2.0.5.ebuild
@@ -22,7 +22,7 @@ else
ZFS_KERNEL_COMPAT="5.12"
if [[ ${PV} != *_rc* ]]; then
- KEYWORDS="~amd64 ~arm64 ~ppc64"
+ KEYWORDS="amd64 arm64 ppc64"
fi
fi
diff --git a/sys-fs/zfs-kmod/zfs-kmod-2.1.0_rc7.ebuild b/sys-fs/zfs-kmod/zfs-kmod-2.1.0.ebuild
index 27cf80ed4300..1bb0a99b0c65 100644
--- a/sys-fs/zfs-kmod/zfs-kmod-2.1.0_rc7.ebuild
+++ b/sys-fs/zfs-kmod/zfs-kmod-2.1.0.ebuild
@@ -19,7 +19,7 @@ else
SRC_URI="https://github.com/openzfs/zfs/releases/download/zfs-${MY_PV}/zfs-${MY_PV}.tar.gz"
SRC_URI+=" verify-sig? ( https://github.com/openzfs/zfs/releases/download/zfs-${MY_PV}/zfs-${MY_PV}.tar.gz.asc )"
S="${WORKDIR}/zfs-${PV%_rc?}"
- ZFS_KERNEL_COMPAT="5.12"
+ ZFS_KERNEL_COMPAT="5.13"
if [[ ${PV} != *_rc* ]]; then
KEYWORDS="~amd64 ~arm64 ~ppc64"
@@ -165,15 +165,6 @@ src_install() {
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}"
@@ -184,22 +175,17 @@ pkg_postinst() {
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."
+ if has_version sys-boot/grub; then
+ 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 -o compatibility=grub2 ..."
+ ewarn
+ ewarn "Refer to /etc/zfs/compatibility.d/grub2 for list of features."
+ fi
}
diff --git a/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild b/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild
index 27cf80ed4300..1bb0a99b0c65 100644
--- a/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild
+++ b/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild
@@ -19,7 +19,7 @@ else
SRC_URI="https://github.com/openzfs/zfs/releases/download/zfs-${MY_PV}/zfs-${MY_PV}.tar.gz"
SRC_URI+=" verify-sig? ( https://github.com/openzfs/zfs/releases/download/zfs-${MY_PV}/zfs-${MY_PV}.tar.gz.asc )"
S="${WORKDIR}/zfs-${PV%_rc?}"
- ZFS_KERNEL_COMPAT="5.12"
+ ZFS_KERNEL_COMPAT="5.13"
if [[ ${PV} != *_rc* ]]; then
KEYWORDS="~amd64 ~arm64 ~ppc64"
@@ -165,15 +165,6 @@ src_install() {
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}"
@@ -184,22 +175,17 @@ pkg_postinst() {
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."
+ if has_version sys-boot/grub; then
+ 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 -o compatibility=grub2 ..."
+ ewarn
+ ewarn "Refer to /etc/zfs/compatibility.d/grub2 for list of features."
+ fi
}