Gentoo Archives: gentoo-commits

From: Georgy Yakovlev <gyakovlev@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs-kmod/, sys-fs/zfs-kmod/files/
Date: Fri, 02 Jul 2021 08:31:40
Message-Id: 1625214628.d423af2c1af587b69f8caed6a0047713f76c198b.gyakovlev@gentoo
1 commit: d423af2c1af587b69f8caed6a0047713f76c198b
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jul 2 08:30:01 2021 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Fri Jul 2 08:30:28 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d423af2c
7
8 sys-fs/zfs-kmod: drop 2.0.4-r1
9
10 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
11
12 sys-fs/zfs-kmod/Manifest | 2 -
13 .../files/zfs-8.0.4_5.12_compat_bio_max_segs.patch | 91 ----------
14 .../zfs-8.0.4_5.12_compat_iov_iter_advance.patch | 40 ----
15 .../files/zfs-8.0.4_5.12_compat_tmpfile.patch | 89 ---------
16 .../files/zfs-8.0.4_5.12_compat_userns.patch | 173 ------------------
17 .../zfs-8.0.4_spl_kmem_cache_slab_limit_16K.patch | 59 ------
18 .../zfs-kmod/files/zfs-8.0.4_stream_resume.patch | 33 ----
19 sys-fs/zfs-kmod/zfs-kmod-2.0.4-r1.ebuild | 202 ---------------------
20 8 files changed, 689 deletions(-)
21
22 diff --git a/sys-fs/zfs-kmod/Manifest b/sys-fs/zfs-kmod/Manifest
23 index bf47582ff92..8cc26888798 100644
24 --- a/sys-fs/zfs-kmod/Manifest
25 +++ b/sys-fs/zfs-kmod/Manifest
26 @@ -1,7 +1,5 @@
27 DIST zfs-0.8.6.tar.gz 9295260 BLAKE2B 45424d710aaf75a05f766ae523ae157a24b5cbdcefe72a59e4cede81e42f7a92ae7f01150388437b78cd49f3d28b9664599f2a624516e6b3f1073497194a99f2 SHA512 626b172554f39a5c70f6ea5c599a92fae52534590d1b0273de2bbfc3676d29dff0eade8ca17e5f179a59870c12bc758fb53b7900f8a1fdbdef3a9161b93f9cce
28 -DIST zfs-2.0.4.tar.gz 13123872 BLAKE2B 7e4780092c0a87d5d187cd5734ddc736574db80b500f155287640ef2230e09335cc9b6b26ec1b7d8ab1b7942673ea49a3007a81da372a6d2ac36f3908913045c SHA512 1dda92d424372bce7020f5215545485eae69211b6f0fb6bea3c7c22efac76c6a2662f0dd14a03f723b6a6fe73b1228ecca211a4034b86cf885bcadf38ba0dc6b
29 DIST zfs-2.0.5.tar.gz 13166149 BLAKE2B 4505c43a3b9a6c2b925383d00bbd9f17505290ded83f9bd3f08211769fa39254742340bdda65efd53f87f1708138517f91f8a43c01f3ce4191de200c84c77754 SHA512 ee1b3f0347442ee649a7ee8a2bb08208e011eea994076d30dd08dcd51dab29df0ff369b0c6e709346fa7de69cb07e0ffdceb34f01edb93d414578d1ffc6051ba
30 DIST zfs-2.0.5.tar.gz.asc 836 BLAKE2B 6bc53160ce650f63c717b67116fb754c7a8196c9aa99bb6e43f0145bb30a0446a1ba5695b8207b085435da289fa0058643201ef2f8827e12b0803ab20b0df305 SHA512 91e73a8da45e4f49113fc1af684143902a23c9cf5e59f8cd2f3a1214aeff57af63a7fa05dbe3fa0465f002521b89a43d6086d765d03209d83a41761d56b358aa
31 DIST zfs-2.1.0-rc8.tar.gz 34830489 BLAKE2B c72c34888b6c0e1dff07483c8615296e5b917ae307fdcd510aeb3b6ba2cdc35df1abff523323b4f7f6b8b0b432c39f1e7e4e438c1eda365bee5791e56b82d852 SHA512 19617cf3c592d41585b0afb883a0d19cb7a1226f2e37590c6e4c8646422316d7ec9977b6d4844e88e676434452b9d437cd72b6da83fe0ccdac207d94b5c58a2b
32 DIST zfs-2.1.0-rc8.tar.gz.asc 195 BLAKE2B 46910365dec425edc72874ba8dd8e3138e35f0d1c32a5db38213d39ffa0645ed8e9044a182311db50c3cf3291efe00da32bb93b0d71a537e699a362ec3fbfb11 SHA512 3166a2a75d6c9253727663ebc52c6ab056d6a9b200616fd1dcdc0e0fa516aa90c6b5e1667852fc16186a202d866864efa70910291dd43665e667b57067df95ac
33 -DIST zfs-8.0.4_5.12_compat_idmapped_mounts.patch 41410 BLAKE2B 49724351c5a8e6ffa66762d5aac84ad89a3d04022d086d9f37ccd616b3e8e95852197b5333bdeeeab54fc51516d8254d0138a4422cc66214bb602e5ed72bbabf SHA512 1554d74a7024c106a3f4814895a64914f2e3d627f7edff3c8f415b419c6a596454862f8c0984a6e2f96e340851f1a9222a4c472ebd6d5db7dc0aa108dc2dca6c
34
35 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
36 deleted file mode 100644
37 index 33f9a344e2f..00000000000
38 --- a/sys-fs/zfs-kmod/files/zfs-8.0.4_5.12_compat_bio_max_segs.patch
39 +++ /dev/null
40 @@ -1,91 +0,0 @@
41 -From 77352db228c07ce8ba50478b9029820ca69c6c1b Mon Sep 17 00:00:00 2001
42 -From: Coleman Kane <ckane@×××××××××××.org>
43 -Date: Sat, 20 Mar 2021 01:33:42 -0400
44 -Subject: [PATCH] Linux 5.12 update: bio_max_segs() replaces BIO_MAX_PAGES
45 -
46 -The BIO_MAX_PAGES macro is being retired in favor of a bio_max_segs()
47 -function that implements the typical MIN(x,y) logic used throughout the
48 -kernel for bounding the allocation, and also the new implementation is
49 -intended to be signed-safe (which the former was not).
50 -
51 -Reviewed-by: Tony Hutter <hutter2@××××.gov>
52 -Reviewed-by: Brian Behlendorf <behlendorf1@××××.gov>
53 -Signed-off-by: Coleman Kane <ckane@×××××××××××.org>
54 -Closes #11765
55 -(cherry picked from commit ffd6978ef59cfe2773e984bf03de2f0b93b03f5c)
56 -Signed-off-by: Jonathon Fernyhough <jonathon@×××.dev>
57 ----
58 - config/kernel-bio_max_segs.m4 | 23 +++++++++++++++++++++++
59 - config/kernel.m4 | 2 ++
60 - module/os/linux/zfs/vdev_disk.c | 5 +++++
61 - 3 files changed, 30 insertions(+)
62 - create mode 100644 config/kernel-bio_max_segs.m4
63 -
64 -diff --git a/config/kernel-bio_max_segs.m4 b/config/kernel-bio_max_segs.m4
65 -new file mode 100644
66 -index 00000000000..a90d75455c1
67 ---- /dev/null
68 -+++ b/config/kernel-bio_max_segs.m4
69 -@@ -0,0 +1,23 @@
70 -+dnl #
71 -+dnl # 5.12 API change removes BIO_MAX_PAGES in favor of bio_max_segs()
72 -+dnl # which will handle the logic of setting the upper-bound to a
73 -+dnl # BIO_MAX_PAGES, internally.
74 -+dnl #
75 -+AC_DEFUN([ZFS_AC_KERNEL_SRC_BIO_MAX_SEGS], [
76 -+ ZFS_LINUX_TEST_SRC([bio_max_segs], [
77 -+ #include <linux/bio.h>
78 -+ ],[
79 -+ bio_max_segs(1);
80 -+ ])
81 -+])
82 -+
83 -+AC_DEFUN([ZFS_AC_KERNEL_BIO_MAX_SEGS], [
84 -+ AC_MSG_CHECKING([whether bio_max_segs() exists])
85 -+ ZFS_LINUX_TEST_RESULT([bio_max_segs], [
86 -+ AC_MSG_RESULT(yes)
87 -+
88 -+ AC_DEFINE([HAVE_BIO_MAX_SEGS], 1, [bio_max_segs() is implemented])
89 -+ ],[
90 -+ AC_MSG_RESULT(no)
91 -+ ])
92 -+])
93 -diff --git a/config/kernel.m4 b/config/kernel.m4
94 -index 51c7fb926ec..b8d53490a4a 100644
95 ---- a/config/kernel.m4
96 -+++ b/config/kernel.m4
97 -@@ -127,6 +127,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
98 - ZFS_AC_KERNEL_SRC_GENERIC_FILLATTR_USERNS
99 - ZFS_AC_KERNEL_SRC_MKNOD
100 - ZFS_AC_KERNEL_SRC_SYMLINK
101 -+ ZFS_AC_KERNEL_SRC_BIO_MAX_SEGS
102 -
103 - AC_MSG_CHECKING([for available kernel interfaces])
104 - ZFS_LINUX_TEST_COMPILE_ALL([kabi])
105 -@@ -227,6 +228,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [
106 - ZFS_AC_KERNEL_GENERIC_FILLATTR_USERNS
107 - ZFS_AC_KERNEL_MKNOD
108 - ZFS_AC_KERNEL_SYMLINK
109 -+ ZFS_AC_KERNEL_BIO_MAX_SEGS
110 - ])
111 -
112 - dnl #
113 -diff --git a/module/os/linux/zfs/vdev_disk.c b/module/os/linux/zfs/vdev_disk.c
114 -index 08c33313407..aaaf4105979 100644
115 ---- a/module/os/linux/zfs/vdev_disk.c
116 -+++ b/module/os/linux/zfs/vdev_disk.c
117 -@@ -593,9 +593,14 @@ __vdev_disk_physio(struct block_device *bdev, zio_t *zio,
118 - }
119 -
120 - /* bio_alloc() with __GFP_WAIT never returns NULL */
121 -+#ifdef HAVE_BIO_MAX_SEGS
122 -+ dr->dr_bio[i] = bio_alloc(GFP_NOIO, bio_max_segs(
123 -+ abd_nr_pages_off(zio->io_abd, bio_size, abd_offset)));
124 -+#else
125 - dr->dr_bio[i] = bio_alloc(GFP_NOIO,
126 - MIN(abd_nr_pages_off(zio->io_abd, bio_size, abd_offset),
127 - BIO_MAX_PAGES));
128 -+#endif
129 - if (unlikely(dr->dr_bio[i] == NULL)) {
130 - vdev_disk_dio_free(dr);
131 - return (SET_ERROR(ENOMEM));
132
133 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
134 deleted file mode 100644
135 index 95ecda34652..00000000000
136 --- a/sys-fs/zfs-kmod/files/zfs-8.0.4_5.12_compat_iov_iter_advance.patch
137 +++ /dev/null
138 @@ -1,40 +0,0 @@
139 -From 3e0bc63e1b0ca03493b936e92e871ca7ae451a0a Mon Sep 17 00:00:00 2001
140 -From: Rich Ercolani <214141+rincebrain@××××××××××××××××××××.com>
141 -Date: Tue, 1 Jun 2021 14:58:08 -0400
142 -Subject: [PATCH] Remove iov_iter_advance() for iter_write
143 -
144 -The additional iter advance is incorrect, as copy_from_iter() has
145 -already done the right thing. This will result in the following
146 -warning being printed to the console as of the 5.12 kernel.
147 -
148 - Attempted to advance past end of bvec iter
149 -
150 -This change should have been included with #11378 when a
151 -similar change was made on the read side.
152 -
153 -Suggested-by: @siebenmann
154 -Reviewed-by: Brian Behlendorf <behlendorf1@××××.gov>
155 -Signed-off-by: Rich Ercolani <rincebrain@×××××.com>
156 -Issue #11378
157 -Closes #12041
158 -Closes #12155
159 -(cherry picked from commit 3f81aba7668143c6ca6fc44983d4c880606dea8f)
160 -Signed-off-by: Jonathon Fernyhough <jonathon@×××.dev>
161 ----
162 - module/os/linux/zfs/zpl_file.c | 3 ---
163 - 1 file changed, 3 deletions(-)
164 -
165 -diff --git a/module/os/linux/zfs/zpl_file.c b/module/os/linux/zfs/zpl_file.c
166 -index 08bf97ff338..e20c1dd413c 100644
167 ---- a/module/os/linux/zfs/zpl_file.c
168 -+++ b/module/os/linux/zfs/zpl_file.c
169 -@@ -342,9 +342,6 @@ zpl_iter_write(struct kiocb *kiocb, struct iov_iter *from)
170 - ssize_t wrote = count - uio.uio_resid;
171 - kiocb->ki_pos += wrote;
172 -
173 -- if (wrote > 0)
174 -- iov_iter_advance(from, wrote);
175 --
176 - return (wrote);
177 - }
178 -
179
180 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
181 deleted file mode 100644
182 index 08acee82148..00000000000
183 --- a/sys-fs/zfs-kmod/files/zfs-8.0.4_5.12_compat_tmpfile.patch
184 +++ /dev/null
185 @@ -1,89 +0,0 @@
186 -From 6eced028dbbc2a44e32c4c0a76234ac2da9a365a Mon Sep 17 00:00:00 2001
187 -From: Rich Ercolani <214141+rincebrain@××××××××××××××××××××.com>
188 -Date: Thu, 20 May 2021 19:02:36 -0400
189 -Subject: [PATCH] Update tmpfile() existence detection
190 -
191 -Linux changed the tmpfile() signature again in torvalds/linux@6521f89,
192 -which in turn broke our HAVE_TMPFILE detection in configure.
193 -
194 -Update that macro to include the new case, and change the signature of
195 -zpl_tmpfile as appropriate.
196 -
197 -Reviewed-by: Brian Behlendorf <behlendorf1@××××.gov>
198 -Signed-off-by: Rich Ercolani <rincebrain@×××××.com>
199 -Closes: #12060
200 -Closes: #12087
201 ----
202 - config/kernel-tmpfile.m4 | 28 ++++++++++++++++++++++++----
203 - module/os/linux/zfs/zpl_inode.c | 5 +++++
204 - 2 files changed, 29 insertions(+), 4 deletions(-)
205 -
206 -diff --git a/config/kernel-tmpfile.m4 b/config/kernel-tmpfile.m4
207 -index f510bfe6ba0..45c2e6ceea5 100644
208 ---- a/config/kernel-tmpfile.m4
209 -+++ b/config/kernel-tmpfile.m4
210 -@@ -3,23 +3,43 @@ dnl # 3.11 API change
211 - dnl # Add support for i_op->tmpfile
212 - dnl #
213 - AC_DEFUN([ZFS_AC_KERNEL_SRC_TMPFILE], [
214 -- ZFS_LINUX_TEST_SRC([inode_operations_tmpfile], [
215 -+ dnl #
216 -+ dnl # 5.11 API change
217 -+ dnl # add support for userns parameter to tmpfile
218 -+ dnl #
219 -+ ZFS_LINUX_TEST_SRC([inode_operations_tmpfile_userns], [
220 - #include <linux/fs.h>
221 -- int tmpfile(struct inode *inode, struct dentry *dentry,
222 -+ int tmpfile(struct user_namespace *userns,
223 -+ struct inode *inode, struct dentry *dentry,
224 - umode_t mode) { return 0; }
225 - static struct inode_operations
226 - iops __attribute__ ((unused)) = {
227 - .tmpfile = tmpfile,
228 - };
229 - ],[])
230 -+ ZFS_LINUX_TEST_SRC([inode_operations_tmpfile], [
231 -+ #include <linux/fs.h>
232 -+ int tmpfile(struct inode *inode, struct dentry *dentry,
233 -+ umode_t mode) { return 0; }
234 -+ static struct inode_operations
235 -+ iops __attribute__ ((unused)) = {
236 -+ .tmpfile = tmpfile,
237 -+ };
238 -+ ],[])
239 - ])
240 -
241 - AC_DEFUN([ZFS_AC_KERNEL_TMPFILE], [
242 - AC_MSG_CHECKING([whether i_op->tmpfile() exists])
243 -- ZFS_LINUX_TEST_RESULT([inode_operations_tmpfile], [
244 -+ ZFS_LINUX_TEST_RESULT([inode_operations_tmpfile_userns], [
245 - AC_MSG_RESULT(yes)
246 - AC_DEFINE(HAVE_TMPFILE, 1, [i_op->tmpfile() exists])
247 -+ AC_DEFINE(HAVE_TMPFILE_USERNS, 1, [i_op->tmpfile() has userns])
248 - ],[
249 -- AC_MSG_RESULT(no)
250 -+ ZFS_LINUX_TEST_RESULT([inode_operations_tmpfile], [
251 -+ AC_MSG_RESULT(yes)
252 -+ AC_DEFINE(HAVE_TMPFILE, 1, [i_op->tmpfile() exists])
253 -+ ],[
254 -+ AC_MSG_RESULT(no)
255 -+ ])
256 - ])
257 - ])
258 -diff --git a/module/os/linux/zfs/zpl_inode.c b/module/os/linux/zfs/zpl_inode.c
259 -index 364b9fbef24..ab0373ef9ba 100644
260 ---- a/module/os/linux/zfs/zpl_inode.c
261 -+++ b/module/os/linux/zfs/zpl_inode.c
262 -@@ -218,7 +218,12 @@ zpl_mknod(struct inode *dir, struct dentry *dentry, umode_t mode,
263 -
264 - #ifdef HAVE_TMPFILE
265 - static int
266 -+#ifdef HAVE_TMPFILE_USERNS
267 -+zpl_tmpfile(struct user_namespace *userns, struct inode *dir,
268 -+ struct dentry *dentry, umode_t mode)
269 -+#else
270 - zpl_tmpfile(struct inode *dir, struct dentry *dentry, umode_t mode)
271 -+#endif
272 - {
273 - cred_t *cr = CRED();
274 - struct inode *ip;
275
276 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
277 deleted file mode 100644
278 index 1d8530ec8c6..00000000000
279 --- a/sys-fs/zfs-kmod/files/zfs-8.0.4_5.12_compat_userns.patch
280 +++ /dev/null
281 @@ -1,173 +0,0 @@
282 -From b3f8b103cb3a4bbb7ad41f6faf630be7baa4f585 Mon Sep 17 00:00:00 2001
283 -From: Rich Ercolani <214141+rincebrain@××××××××××××××××××××.com>
284 -Date: Thu, 27 May 2021 11:55:49 -0400
285 -Subject: [PATCH] Bend zpl_set_acl to permit the new userns* parameter
286 -
287 -Just like #12087, the set_acl signature changed with all the bolted-on
288 -*userns parameters, which disabled set_acl usage, and caused #12076.
289 -
290 -Turn zpl_set_acl into zpl_set_acl and zpl_set_acl_impl, and add a
291 -new configure test for the new version.
292 -
293 -Reviewed-by: Brian Behlendorf <behlendorf1@××××.gov>
294 -Signed-off-by: Rich Ercolani <rincebrain@×××××.com>
295 -Closes #12076
296 -Closes #12093
297 ----
298 - config/kernel-acl.m4 | 25 +++++++++++++++++++++--
299 - include/os/linux/zfs/sys/zpl.h | 5 +++++
300 - module/os/linux/zfs/zpl_xattr.c | 35 ++++++++++++++++++++++-----------
301 - 3 files changed, 51 insertions(+), 14 deletions(-)
302 -
303 -diff --git a/config/kernel-acl.m4 b/config/kernel-acl.m4
304 -index e02ce665323..c6da4df24eb 100644
305 ---- a/config/kernel-acl.m4
306 -+++ b/config/kernel-acl.m4
307 -@@ -189,7 +189,22 @@ dnl #
308 - dnl # 3.14 API change,
309 - dnl # Check if inode_operations contains the function set_acl
310 - dnl #
311 -+dnl # 5.12 API change,
312 -+dnl # set_acl() added a user_namespace* parameter first
313 -+dnl #
314 - AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_SET_ACL], [
315 -+ ZFS_LINUX_TEST_SRC([inode_operations_set_acl_userns], [
316 -+ #include <linux/fs.h>
317 -+
318 -+ int set_acl_fn(struct user_namespace *userns,
319 -+ struct inode *inode, struct posix_acl *acl,
320 -+ int type) { return 0; }
321 -+
322 -+ static const struct inode_operations
323 -+ iops __attribute__ ((unused)) = {
324 -+ .set_acl = set_acl_fn,
325 -+ };
326 -+ ],[])
327 - ZFS_LINUX_TEST_SRC([inode_operations_set_acl], [
328 - #include <linux/fs.h>
329 -
330 -@@ -205,11 +220,17 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_SET_ACL], [
331 -
332 - AC_DEFUN([ZFS_AC_KERNEL_INODE_OPERATIONS_SET_ACL], [
333 - AC_MSG_CHECKING([whether iops->set_acl() exists])
334 -- ZFS_LINUX_TEST_RESULT([inode_operations_set_acl], [
335 -+ ZFS_LINUX_TEST_RESULT([inode_operations_set_acl_userns], [
336 - AC_MSG_RESULT(yes)
337 - AC_DEFINE(HAVE_SET_ACL, 1, [iops->set_acl() exists])
338 -+ AC_DEFINE(HAVE_SET_ACL_USERNS, 1, [iops->set_acl() takes 4 args])
339 - ],[
340 -- AC_MSG_RESULT(no)
341 -+ ZFS_LINUX_TEST_RESULT([inode_operations_set_acl], [
342 -+ AC_MSG_RESULT(yes)
343 -+ AC_DEFINE(HAVE_SET_ACL, 1, [iops->set_acl() exists, takes 3 args])
344 -+ ],[
345 -+ AC_MSG_RESULT(no)
346 -+ ])
347 - ])
348 - ])
349 -
350 -diff --git a/include/os/linux/zfs/sys/zpl.h b/include/os/linux/zfs/sys/zpl.h
351 -index 21825d1f378..54f3fa0fdb0 100644
352 ---- a/include/os/linux/zfs/sys/zpl.h
353 -+++ b/include/os/linux/zfs/sys/zpl.h
354 -@@ -63,7 +63,12 @@ extern int zpl_xattr_security_init(struct inode *ip, struct inode *dip,
355 - const struct qstr *qstr);
356 - #if defined(CONFIG_FS_POSIX_ACL)
357 - #if defined(HAVE_SET_ACL)
358 -+#if defined(HAVE_SET_ACL_USERNS)
359 -+extern int zpl_set_acl(struct user_namespace *userns, struct inode *ip,
360 -+ struct posix_acl *acl, int type);
361 -+#else
362 - extern int zpl_set_acl(struct inode *ip, struct posix_acl *acl, int type);
363 -+#endif /* HAVE_SET_ACL_USERNS */
364 - #endif /* HAVE_SET_ACL */
365 - extern struct posix_acl *zpl_get_acl(struct inode *ip, int type);
366 - extern int zpl_init_acl(struct inode *ip, struct inode *dir);
367 -diff --git a/module/os/linux/zfs/zpl_xattr.c b/module/os/linux/zfs/zpl_xattr.c
368 -index 5e35f90df85..89ba9de14f6 100644
369 ---- a/module/os/linux/zfs/zpl_xattr.c
370 -+++ b/module/os/linux/zfs/zpl_xattr.c
371 -@@ -926,11 +926,8 @@ xattr_handler_t zpl_xattr_security_handler = {
372 - * attribute implemented by filesystems in the kernel." - xattr(7)
373 - */
374 - #ifdef CONFIG_FS_POSIX_ACL
375 --#ifndef HAVE_SET_ACL
376 --static
377 --#endif
378 --int
379 --zpl_set_acl(struct inode *ip, struct posix_acl *acl, int type)
380 -+static int
381 -+zpl_set_acl_impl(struct inode *ip, struct posix_acl *acl, int type)
382 - {
383 - char *name, *value = NULL;
384 - int error = 0;
385 -@@ -1002,6 +999,19 @@ zpl_set_acl(struct inode *ip, struct posix_acl *acl, int type)
386 - return (error);
387 - }
388 -
389 -+#ifdef HAVE_SET_ACL
390 -+int
391 -+#ifdef HAVE_SET_ACL_USERNS
392 -+zpl_set_acl(struct user_namespace *userns, struct inode *ip,
393 -+ struct posix_acl *acl, int type)
394 -+#else
395 -+zpl_set_acl(struct inode *ip, struct posix_acl *acl, int type)
396 -+#endif /* HAVE_SET_ACL_USERNS */
397 -+{
398 -+ return (zpl_set_acl_impl(ip, acl, type));
399 -+}
400 -+#endif /* HAVE_SET_ACL */
401 -+
402 - struct posix_acl *
403 - zpl_get_acl(struct inode *ip, int type)
404 - {
405 -@@ -1083,7 +1093,7 @@ zpl_init_acl(struct inode *ip, struct inode *dir)
406 - umode_t mode;
407 -
408 - if (S_ISDIR(ip->i_mode)) {
409 -- error = zpl_set_acl(ip, acl, ACL_TYPE_DEFAULT);
410 -+ error = zpl_set_acl_impl(ip, acl, ACL_TYPE_DEFAULT);
411 - if (error)
412 - goto out;
413 - }
414 -@@ -1093,8 +1103,10 @@ zpl_init_acl(struct inode *ip, struct inode *dir)
415 - if (error >= 0) {
416 - ip->i_mode = mode;
417 - zfs_mark_inode_dirty(ip);
418 -- if (error > 0)
419 -- error = zpl_set_acl(ip, acl, ACL_TYPE_ACCESS);
420 -+ if (error > 0) {
421 -+ error = zpl_set_acl_impl(ip, acl,
422 -+ ACL_TYPE_ACCESS);
423 -+ }
424 - }
425 - }
426 - out:
427 -@@ -1121,7 +1133,7 @@ zpl_chmod_acl(struct inode *ip)
428 -
429 - error = __posix_acl_chmod(&acl, GFP_KERNEL, ip->i_mode);
430 - if (!error)
431 -- error = zpl_set_acl(ip, acl, ACL_TYPE_ACCESS);
432 -+ error = zpl_set_acl_impl(ip, acl, ACL_TYPE_ACCESS);
433 -
434 - zpl_posix_acl_release(acl);
435 -
436 -@@ -1250,8 +1262,7 @@ __zpl_xattr_acl_set_access(struct inode *ip, const char *name,
437 - } else {
438 - acl = NULL;
439 - }
440 --
441 -- error = zpl_set_acl(ip, acl, type);
442 -+ error = zpl_set_acl_impl(ip, acl, type);
443 - zpl_posix_acl_release(acl);
444 -
445 - return (error);
446 -@@ -1291,7 +1302,7 @@ __zpl_xattr_acl_set_default(struct inode *ip, const char *name,
447 - acl = NULL;
448 - }
449 -
450 -- error = zpl_set_acl(ip, acl, type);
451 -+ error = zpl_set_acl_impl(ip, acl, type);
452 - zpl_posix_acl_release(acl);
453 -
454 - return (error);
455
456 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
457 deleted file mode 100644
458 index 3448f76a801..00000000000
459 --- a/sys-fs/zfs-kmod/files/zfs-8.0.4_spl_kmem_cache_slab_limit_16K.patch
460 +++ /dev/null
461 @@ -1,59 +0,0 @@
462 -From 783784582225e8ddfbf07993d9fc278bf08025c5 Mon Sep 17 00:00:00 2001
463 -From: Brian Behlendorf <behlendorf1@××××.gov>
464 -Date: Thu, 3 Jun 2021 13:37:45 -0700
465 -Subject: [PATCH] Linux: Set spl_kmem_cache_slab_limit when page size !4K
466 -
467 -For small objects the kernel's slab implementation is very fast and
468 -space efficient. However, as the allocation size increases to
469 -require multiple pages performance suffers. The SPL kmem cache
470 -allocator was designed to better handle these large allocation
471 -sizes. Therefore, on Linux the kmem_cache_* compatibility wrappers
472 -prefer to use the kernel's slab allocator for small objects and
473 -the custom SPL kmem cache allocator for larger objects.
474 -
475 -This logic was effectively disabled for all architectures using
476 -a non-4K page size which caused all kmem caches to only use the
477 -SPL implementation. Functionally this is fine, but the SPL code
478 -which calculates the target number of objects per-slab does not
479 -take in to account that __vmalloc() always returns page-aligned
480 -memory. This can result in a massive amount of wasted space when
481 -allocating tiny objects on a platform using large pages (64k).
482 -
483 -To resolve this issue we set the spl_kmem_cache_slab_limit cutoff
484 -to 16K for all architectures.
485 -
486 -This particular change does not attempt to update the logic used
487 -to calculate the optimal number of pages per slab. This remains
488 -an issue which should be addressed in a future change.
489 -
490 -Reviewed-by: Matthew Ahrens <mahrens@×××××××.com>
491 -Reviewed-by: Tony Nguyen <tony.nguyen@×××××××.com>
492 -Signed-off-by: Brian Behlendorf <behlendorf1@××××.gov>
493 -Closes #12152
494 -Closes #11429
495 -Closes #11574
496 -Closes #12150
497 ----
498 - module/os/linux/spl/spl-kmem-cache.c | 7 ++-----
499 - 1 file changed, 2 insertions(+), 5 deletions(-)
500 -
501 -diff --git a/module/os/linux/spl/spl-kmem-cache.c b/module/os/linux/spl/spl-kmem-cache.c
502 -index 3699b6a159a..2151ef008fd 100644
503 ---- a/module/os/linux/spl/spl-kmem-cache.c
504 -+++ b/module/os/linux/spl/spl-kmem-cache.c
505 -@@ -100,13 +100,10 @@ MODULE_PARM_DESC(spl_kmem_cache_max_size, "Maximum size of slab in MB");
506 - * For small objects the Linux slab allocator should be used to make the most
507 - * efficient use of the memory. However, large objects are not supported by
508 - * the Linux slab and therefore the SPL implementation is preferred. A cutoff
509 -- * of 16K was determined to be optimal for architectures using 4K pages.
510 -+ * of 16K was determined to be optimal for architectures using 4K pages and
511 -+ * to also work well on architecutres using larger 64K page sizes.
512 - */
513 --#if PAGE_SIZE == 4096
514 - unsigned int spl_kmem_cache_slab_limit = 16384;
515 --#else
516 --unsigned int spl_kmem_cache_slab_limit = 0;
517 --#endif
518 - module_param(spl_kmem_cache_slab_limit, uint, 0644);
519 - MODULE_PARM_DESC(spl_kmem_cache_slab_limit,
520 - "Objects less than N bytes use the Linux slab");
521
522 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
523 deleted file mode 100644
524 index 196fab65f4a..00000000000
525 --- a/sys-fs/zfs-kmod/files/zfs-8.0.4_stream_resume.patch
526 +++ /dev/null
527 @@ -1,33 +0,0 @@
528 -From ee2a9d2c771657168652e058477b81389c662b5e Mon Sep 17 00:00:00 2001
529 -From: Paul Zuchowski <31706010+PaulZ-98@××××××××××××××××××××.com>
530 -Date: Fri, 14 May 2021 00:46:14 -0400
531 -Subject: [PATCH] Fix dmu_recv_stream test for resumable
532 -
533 -Use dsl_dataset_has_resume_receive_state()
534 -not dsl_dataset_is_zapified() to check if
535 -stream is resumable.
536 -
537 -Reviewed-by: Matthew Ahrens <mahrens@×××××××.com>
538 -Reviewed-by: Alek Pinchuk <apinchuk@×××××××.com>
539 -Reviewed-by: Ryan Moeller <ryan@×××××××××.com>
540 -Signed-off-by: Paul Zuchowski <pzuchowski@×××××.com>
541 -Closes #12034
542 ----
543 - module/zfs/dmu_recv.c | 4 ++--
544 - 1 file changed, 2 insertions(+), 2 deletions(-)
545 -
546 -diff --git a/module/zfs/dmu_recv.c b/module/zfs/dmu_recv.c
547 -index b5414749f7f..f44b397853f 100644
548 ---- a/module/zfs/dmu_recv.c
549 -+++ b/module/zfs/dmu_recv.c
550 -@@ -2878,8 +2878,8 @@ dmu_recv_stream(dmu_recv_cookie_t *drc, offset_t *voffp)
551 - int err = 0;
552 - struct receive_writer_arg *rwa = kmem_zalloc(sizeof (*rwa), KM_SLEEP);
553 -
554 -- if (dsl_dataset_is_zapified(drc->drc_ds)) {
555 -- uint64_t bytes;
556 -+ if (dsl_dataset_has_resume_receive_state(drc->drc_ds)) {
557 -+ uint64_t bytes = 0;
558 - (void) zap_lookup(drc->drc_ds->ds_dir->dd_pool->dp_meta_objset,
559 - drc->drc_ds->ds_object, DS_FIELD_RESUME_BYTES,
560 - sizeof (bytes), 1, &bytes);
561
562 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
563 deleted file mode 100644
564 index 18391c3ffa9..00000000000
565 --- a/sys-fs/zfs-kmod/zfs-kmod-2.0.4-r1.ebuild
566 +++ /dev/null
567 @@ -1,202 +0,0 @@
568 -# Copyright 1999-2021 Gentoo Authors
569 -# Distributed under the terms of the GNU General Public License v2
570 -
571 -EAPI=7
572 -
573 -inherit autotools dist-kernel-utils flag-o-matic linux-mod toolchain-funcs
574 -
575 -DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
576 -HOMEPAGE="https://github.com/openzfs/zfs"
577 -
578 -if [[ ${PV} == "9999" ]]; then
579 - inherit git-r3
580 - EGIT_REPO_URI="https://github.com/openzfs/zfs.git"
581 -else
582 - MY_PV="${PV/_rc/-rc}"
583 - SRC_URI="https://github.com/openzfs/zfs/releases/download/zfs-${MY_PV}/zfs-${MY_PV}.tar.gz
584 - https://github.com/openzfs/zfs/commit/f315d9a3ff3cc0b81c99dd9be5878a55d2e98d8e.patch -> zfs-8.0.4_5.12_compat_idmapped_mounts.patch"
585 - KEYWORDS="~amd64 ~arm64 ~ppc64"
586 - S="${WORKDIR}/zfs-${PV%_rc?}"
587 - ZFS_KERNEL_COMPAT="5.12"
588 -fi
589 -
590 -LICENSE="CDDL MIT debug? ( GPL-2+ )"
591 -SLOT="0/${PVR}"
592 -IUSE="custom-cflags debug +rootfs"
593 -
594 -DEPEND=""
595 -
596 -RDEPEND="${DEPEND}
597 - !sys-kernel/spl
598 -"
599 -
600 -BDEPEND="
601 - dev-lang/perl
602 - virtual/awk
603 -"
604 -
605 -# PDEPEND in this form is needed to trick portage suggest
606 -# enabling dist-kernel if only 1 package have it set
607 -PDEPEND="dist-kernel? ( ~sys-fs/zfs-${PV}[dist-kernel] )"
608 -
609 -RESTRICT="debug? ( strip ) test"
610 -
611 -DOCS=( AUTHORS COPYRIGHT META README.md )
612 -
613 -pkg_pretend() {
614 - use rootfs || return 0
615 -
616 - if has_version virtual/dist-kernel && ! use dist-kernel; then
617 - ewarn "You have virtual/dist-kernel installed, but"
618 - ewarn "USE=\"dist-kernel\" is not enabled for ${CATEGORY}/${PN}"
619 - ewarn "It's recommended to globally enable dist-kernel USE flag"
620 - ewarn "to auto-trigger initrd rebuilds with kernel updates"
621 - fi
622 -}
623 -
624 -PATCHES=(
625 - "${DISTDIR}"/zfs-8.0.4_5.12_compat_idmapped_mounts.patch
626 - "${FILESDIR}"/zfs-8.0.4_5.12_compat_bio_max_segs.patch
627 - "${FILESDIR}"/zfs-8.0.4_5.12_compat_tmpfile.patch
628 - "${FILESDIR}"/zfs-8.0.4_5.12_compat_userns.patch
629 - "${FILESDIR}"/zfs-8.0.4_5.12_compat_iov_iter_advance.patch
630 - "${FILESDIR}"/zfs-8.0.4_stream_resume.patch
631 - "${FILESDIR}"/zfs-8.0.4_spl_kmem_cache_slab_limit_16K.patch
632 -)
633 -
634 -pkg_setup() {
635 - CONFIG_CHECK="
636 - !DEBUG_LOCK_ALLOC
637 - EFI_PARTITION
638 - MODULES
639 - !PAX_KERNEXEC_PLUGIN_METHOD_OR
640 - !TRIM_UNUSED_KSYMS
641 - ZLIB_DEFLATE
642 - ZLIB_INFLATE
643 - "
644 -
645 - use debug && CONFIG_CHECK="${CONFIG_CHECK}
646 - FRAME_POINTER
647 - DEBUG_INFO
648 - !DEBUG_INFO_REDUCED
649 - "
650 -
651 - use rootfs && \
652 - CONFIG_CHECK="${CONFIG_CHECK}
653 - BLK_DEV_INITRD
654 - DEVTMPFS
655 - "
656 -
657 - kernel_is -lt 5 && CONFIG_CHECK="${CONFIG_CHECK} IOSCHED_NOOP"
658 -
659 - if [[ ${PV} != "9999" ]]; then
660 - local kv_major_max kv_minor_max zcompat
661 - zcompat="${ZFS_KERNEL_COMPAT_OVERRIDE:-${ZFS_KERNEL_COMPAT}}"
662 - kv_major_max="${zcompat%%.*}"
663 - zcompat="${zcompat#*.}"
664 - kv_minor_max="${zcompat%%.*}"
665 - kernel_is -le "${kv_major_max}" "${kv_minor_max}" || die \
666 - "Linux ${kv_major_max}.${kv_minor_max} is the latest supported version"
667 -
668 - fi
669 -
670 - kernel_is -ge 3 10 || die "Linux 3.10 or newer required"
671 -
672 - linux-mod_pkg_setup
673 -}
674 -
675 -src_prepare() {
676 - default
677 - eautoreconf
678 - # Set module revision number
679 - sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" META || die "Could not set Gentoo release"
680 -}
681 -
682 -src_configure() {
683 - set_arch_to_kernel
684 -
685 - use custom-cflags || strip-flags
686 -
687 - filter-ldflags -Wl,*
688 -
689 - local myconf=(
690 - CROSS_COMPILE="${CHOST}-"
691 - HOSTCC="$(tc-getBUILD_CC)"
692 - --bindir="${EPREFIX}/bin"
693 - --sbindir="${EPREFIX}/sbin"
694 - --with-config=kernel
695 - --with-linux="${KV_DIR}"
696 - --with-linux-obj="${KV_OUT_DIR}"
697 - $(use_enable debug)
698 - )
699 -
700 - econf "${myconf[@]}"
701 -}
702 -
703 -src_compile() {
704 - set_arch_to_kernel
705 -
706 - myemakeargs=(
707 - CROSS_COMPILE="${CHOST}-"
708 - HOSTCC="$(tc-getBUILD_CC)"
709 - V=1
710 - )
711 -
712 - emake "${myemakeargs[@]}"
713 -}
714 -
715 -src_install() {
716 - set_arch_to_kernel
717 -
718 - myemakeargs+=(
719 - DEPMOD=:
720 - DESTDIR="${D}"
721 - INSTALL_MOD_PATH="${EPREFIX:-/}" # lib/modules/<kver> added by KBUILD
722 - )
723 -
724 - emake "${myemakeargs[@]}" install
725 -
726 - einstalldocs
727 -}
728 -
729 -pkg_postinst() {
730 - linux-mod_pkg_postinst
731 -
732 - # Remove old modules
733 - if [[ -d "${EROOT}/lib/modules/${KV_FULL}/addon/zfs" ]]; then
734 - ewarn "${PN} now installs modules in ${EROOT}/lib/modules/${KV_FULL}/extra/zfs"
735 - ewarn "Old modules were detected in ${EROOT}/lib/modules/${KV_FULL}/addon/zfs"
736 - ewarn "Automatically removing old modules to avoid problems."
737 - rm -r "${EROOT}/lib/modules/${KV_FULL}/addon/zfs" || die "Cannot remove modules"
738 - rmdir --ignore-fail-on-non-empty "${EROOT}/lib/modules/${KV_FULL}/addon"
739 - fi
740 -
741 - if [[ -z ${ROOT} ]] && use dist-kernel; then
742 - set_arch_to_portage
743 - dist-kernel_reinstall_initramfs "${KV_DIR}" "${KV_FULL}"
744 - fi
745 -
746 - if use x86 || use arm; then
747 - ewarn "32-bit kernels will likely require increasing vmalloc to"
748 - ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
749 - fi
750 -
751 - ewarn "This version of OpenZFS includes support for new feature flags"
752 - ewarn "that are incompatible with previous versions. GRUB2 support for"
753 - ewarn "/boot with the new feature flags is not yet available."
754 - ewarn "Do *NOT* upgrade root pools to use the new feature flags."
755 - ewarn "Any new pools will be created with the new feature flags by default"
756 - ewarn "and will not be compatible with older versions of ZFSOnLinux. To"
757 - ewarn "create a newpool that is backward compatible wih GRUB2, use "
758 - ewarn
759 - ewarn "zpool create -d -o feature@async_destroy=enabled "
760 - ewarn " -o feature@empty_bpobj=enabled -o feature@lz4_compress=enabled"
761 - ewarn " -o feature@spacemap_histogram=enabled"
762 - ewarn " -o feature@enabled_txg=enabled "
763 - ewarn " -o feature@extensible_dataset=enabled -o feature@bookmarks=enabled"
764 - ewarn " ..."
765 - ewarn
766 - ewarn "GRUB2 support will be updated as soon as either the GRUB2"
767 - ewarn "developers do a tag or the Gentoo developers find time to backport"
768 - ewarn "support from GRUB2 HEAD."
769 -}