diff options
| author | Michael Forney <mforney@mforney.org> | 2025-01-29 02:21:26 -0800 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2025-02-01 20:16:29 -0800 |
| commit | 3ef96f81af16fa887830d544462ab218d0933016 (patch) | |
| tree | 8cbbb26c3f818b93e7037d464b14182d4c8dca59 /pkg/zfs/patch | |
| parent | ac59f6699bf1e050f2cbdfac9d9ee9c1b1dbd5d5 (diff) | |
zfs: Update to 2.3.0
Diffstat (limited to 'pkg/zfs/patch')
7 files changed, 403 insertions, 154 deletions
diff --git a/pkg/zfs/patch/0001-Port-to-BearSSL.patch b/pkg/zfs/patch/0001-Port-to-BearSSL.patch index 1f64df8a..24b13db8 100644 --- a/pkg/zfs/patch/0001-Port-to-BearSSL.patch +++ b/pkg/zfs/patch/0001-Port-to-BearSSL.patch @@ -1,4 +1,4 @@ -From d9bae3dfe72c3680b273e611d01a8adf7cdf7765 Mon Sep 17 00:00:00 2001 +From 2bd6f119c41de4e0f1db37f6ad799d0e08e1fbd6 Mon Sep 17 00:00:00 2001 From: Michael Forney <mforney@mforney.org> Date: Tue, 17 Jan 2023 12:01:13 -0800 Subject: [PATCH] Port to BearSSL @@ -8,7 +8,7 @@ Subject: [PATCH] Port to BearSSL 1 file changed, 42 insertions(+), 10 deletions(-) diff --git a/lib/libzfs/libzfs_crypto.c b/lib/libzfs/libzfs_crypto.c -index 8f2a50d55..867879090 100644 +index 93dfa9cbc..1ee5d3f07 100644 --- a/lib/libzfs/libzfs_crypto.c +++ b/lib/libzfs/libzfs_crypto.c @@ -25,7 +25,7 @@ @@ -20,7 +20,7 @@ index 8f2a50d55..867879090 100644 #if LIBFETCH_DYNAMIC #include <dlfcn.h> #endif -@@ -772,6 +772,44 @@ error: +@@ -773,6 +773,44 @@ error: return (ret); } @@ -65,7 +65,7 @@ index 8f2a50d55..867879090 100644 static int derive_key(libzfs_handle_t *hdl, zfs_keyformat_t format, uint64_t iters, uint8_t *key_material, uint64_t salt, -@@ -800,15 +838,9 @@ derive_key(libzfs_handle_t *hdl, zfs_keyformat_t format, uint64_t iters, +@@ -801,15 +839,9 @@ derive_key(libzfs_handle_t *hdl, zfs_keyformat_t format, uint64_t iters, case ZFS_KEYFORMAT_PASSPHRASE: salt = LE_64(salt); @@ -85,5 +85,5 @@ index 8f2a50d55..867879090 100644 default: ret = EINVAL; -- -2.37.3 +2.44.0 diff --git a/pkg/zfs/patch/0002-Use-find-exec-rm-instead-of-non-portable-delete.patch b/pkg/zfs/patch/0002-Use-find-exec-rm-instead-of-non-portable-delete.patch index f81214a4..6fa9999d 100644 --- a/pkg/zfs/patch/0002-Use-find-exec-rm-instead-of-non-portable-delete.patch +++ b/pkg/zfs/patch/0002-Use-find-exec-rm-instead-of-non-portable-delete.patch @@ -1,4 +1,4 @@ -From 4f2a58f0763898a49d2b5d76f92f321947188708 Mon Sep 17 00:00:00 2001 +From 206003c44dfb83008b9a890addcdb03ae9883414 Mon Sep 17 00:00:00 2001 From: Michael Forney <mforney@mforney.org> Date: Tue, 17 Jan 2023 12:56:34 -0800 Subject: [PATCH] Use find -exec rm instead of non-portable -delete @@ -25,10 +25,10 @@ index cd2498358..83b3dbf30 100644 ], [ [CODE_COVERAGE_RULES_CHECK=' diff --git a/module/Makefile.in b/module/Makefile.in -index 9b34b3dfa..63d18d270 100644 +index 529ab81dc..8cc36cf93 100644 --- a/module/Makefile.in +++ b/module/Makefile.in -@@ -71,7 +71,7 @@ clean-Linux: +@@ -73,7 +73,7 @@ clean-Linux: @CONFIG_KERNEL_TRUE@ $(MAKE) -C @LINUX_OBJ@ M="$$PWD" @KERNEL_MAKE@ clean $(RM) @LINUX_SYMBOLS@ Module.markers @@ -37,7 +37,7 @@ index 9b34b3dfa..63d18d270 100644 clean-FreeBSD: +$(FMAKE) clean -@@ -91,7 +91,7 @@ modules_install-Linux: modules_uninstall-Linux-legacy +@@ -93,7 +93,7 @@ modules_install-Linux: modules_uninstall-Linux-legacy KERNELRELEASE=@LINUX_VERSION@ @# Remove extraneous build products when packaging if [ -n "$(DESTDIR)" ]; then \ @@ -86,5 +86,5 @@ index 93355d0b3..88fc777e1 100644 udevadm info --cleanup-db } -- -2.37.3 +2.44.0 diff --git a/pkg/zfs/patch/0004-Use-__func__-instead-of-obsolete-and-non-standard-__.patch b/pkg/zfs/patch/0004-Use-__func__-instead-of-obsolete-and-non-standard-__.patch index aba6e28b..43c444d5 100644 --- a/pkg/zfs/patch/0004-Use-__func__-instead-of-obsolete-and-non-standard-__.patch +++ b/pkg/zfs/patch/0004-Use-__func__-instead-of-obsolete-and-non-standard-__.patch @@ -1,24 +1,26 @@ -From 3b0d7aec7e04881005dcf07f12054cc65c2d3587 Mon Sep 17 00:00:00 2001 +From 611323e80bc8db627f44af6e767a738c1b5c9651 Mon Sep 17 00:00:00 2001 From: Michael Forney <mforney@mforney.org> Date: Sat, 21 Jan 2023 17:12:32 -0800 Subject: [PATCH] Use __func__ instead of obsolete and non-standard __FUNCTION__ --- - include/os/freebsd/spl/sys/debug.h | 18 +++++++++--------- - include/os/linux/spl/sys/debug.h | 18 +++++++++--------- - lib/libspl/include/assert.h | 18 +++++++++--------- - module/os/freebsd/zfs/crypto_os.c | 22 +++++++++++----------- - module/os/freebsd/zfs/zfs_vfsops.c | 4 ++-- - module/os/freebsd/zfs/zio_crypt.c | 6 +++--- - 6 files changed, 43 insertions(+), 43 deletions(-) + include/os/freebsd/spl/sys/debug.h | 34 +++++++++++++------------- + include/os/linux/spl/sys/debug.h | 34 +++++++++++++------------- + lib/libspl/include/assert.h | 36 ++++++++++++++-------------- + module/os/freebsd/zfs/crypto_os.c | 8 +++---- + module/os/freebsd/zfs/zfs_vfsops.c | 4 ++-- + module/os/freebsd/zfs/zfs_vnops_os.c | 2 +- + module/os/freebsd/zfs/zio_crypt.c | 6 ++--- + tests/zfs-tests/cmd/idmap_util.c | 2 +- + 8 files changed, 63 insertions(+), 63 deletions(-) diff --git a/include/os/freebsd/spl/sys/debug.h b/include/os/freebsd/spl/sys/debug.h -index 3e67cf0e9..4bb62224e 100644 +index fd22e6b00..c570088d9 100644 --- a/include/os/freebsd/spl/sys/debug.h +++ b/include/os/freebsd/spl/sys/debug.h -@@ -75,18 +75,18 @@ spl_assert(const char *buf, const char *file, const char *func, int line) - #define unlikely(expr) expect((expr) != 0, 0) +@@ -97,16 +97,16 @@ spl_assert(const char *buf, const char *file, const char *func, int line) + #endif #define PANIC(fmt, a...) \ - spl_panic(__FILE__, __FUNCTION__, __LINE__, fmt, ## a) @@ -30,7 +32,14 @@ index 3e67cf0e9..4bb62224e 100644 - __FILE__, __FUNCTION__, __LINE__)) + __FILE__, __func__, __LINE__)) - #define VERIFY3B(LEFT, OP, RIGHT) do { \ + #define VERIFYF(cond, str, ...) do { \ + if (unlikely(!(cond))) \ +- spl_panic(__FILE__, __FUNCTION__, __LINE__, \ ++ spl_panic(__FILE__, __func__, __LINE__, \ + "VERIFY(" #cond ") failed " str "\n", __VA_ARGS__);\ + } while (0) + +@@ -114,7 +114,7 @@ spl_assert(const char *buf, const char *file, const char *func, int line) const boolean_t _verify3_left = (boolean_t)(LEFT); \ const boolean_t _verify3_right = (boolean_t)(RIGHT); \ if (unlikely(!(_verify3_left OP _verify3_right))) \ @@ -38,8 +47,8 @@ index 3e67cf0e9..4bb62224e 100644 + spl_panic(__FILE__, __func__, __LINE__, \ "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ "failed (%d " #OP " %d)\n", \ - (boolean_t)(_verify3_left), \ -@@ -97,7 +97,7 @@ spl_assert(const char *buf, const char *file, const char *func, int line) + (boolean_t)_verify3_left, \ +@@ -125,7 +125,7 @@ spl_assert(const char *buf, const char *file, const char *func, int line) const int64_t _verify3_left = (int64_t)(LEFT); \ const int64_t _verify3_right = (int64_t)(RIGHT); \ if (unlikely(!(_verify3_left OP _verify3_right))) \ @@ -47,8 +56,8 @@ index 3e67cf0e9..4bb62224e 100644 + spl_panic(__FILE__, __func__, __LINE__, \ "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ "failed (%lld " #OP " %lld)\n", \ - (long long) (_verify3_left), \ -@@ -108,7 +108,7 @@ spl_assert(const char *buf, const char *file, const char *func, int line) + (long long)_verify3_left, \ +@@ -136,7 +136,7 @@ spl_assert(const char *buf, const char *file, const char *func, int line) const uint64_t _verify3_left = (uint64_t)(LEFT); \ const uint64_t _verify3_right = (uint64_t)(RIGHT); \ if (unlikely(!(_verify3_left OP _verify3_right))) \ @@ -56,8 +65,8 @@ index 3e67cf0e9..4bb62224e 100644 + spl_panic(__FILE__, __func__, __LINE__, \ "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ "failed (%llu " #OP " %llu)\n", \ - (unsigned long long) (_verify3_left), \ -@@ -119,7 +119,7 @@ spl_assert(const char *buf, const char *file, const char *func, int line) + (unsigned long long)_verify3_left, \ +@@ -147,7 +147,7 @@ spl_assert(const char *buf, const char *file, const char *func, int line) const uintptr_t _verify3_left = (uintptr_t)(LEFT); \ const uintptr_t _verify3_right = (uintptr_t)(RIGHT); \ if (unlikely(!(_verify3_left OP _verify3_right))) \ @@ -65,36 +74,100 @@ index 3e67cf0e9..4bb62224e 100644 + spl_panic(__FILE__, __func__, __LINE__, \ "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ "failed (%px " #OP " %px)\n", \ + (void *)_verify3_left, \ +@@ -157,7 +157,7 @@ spl_assert(const char *buf, const char *file, const char *func, int line) + #define VERIFY0(RIGHT) do { \ + const int64_t _verify0_right = (int64_t)(RIGHT); \ + if (unlikely(!(0 == _verify0_right))) \ +- spl_panic(__FILE__, __FUNCTION__, __LINE__, \ ++ spl_panic(__FILE__, __func__, __LINE__, \ + "VERIFY0(" #RIGHT ") " \ + "failed (0 == %lld)\n", \ + (long long)_verify0_right); \ +@@ -166,7 +166,7 @@ spl_assert(const char *buf, const char *file, const char *func, int line) + #define VERIFY0P(RIGHT) do { \ + const uintptr_t _verify0_right = (uintptr_t)(RIGHT); \ + if (unlikely(!(0 == _verify0_right))) \ +- spl_panic(__FILE__, __FUNCTION__, __LINE__, \ ++ spl_panic(__FILE__, __func__, __LINE__, \ + "VERIFY0P(" #RIGHT ") " \ + "failed (NULL == %px)\n", \ + (void *)_verify0_right); \ +@@ -184,7 +184,7 @@ spl_assert(const char *buf, const char *file, const char *func, int line) + const boolean_t _verify3_left = (boolean_t)(LEFT); \ + const boolean_t _verify3_right = (boolean_t)(RIGHT); \ + if (unlikely(!(_verify3_left OP _verify3_right))) \ +- spl_panic(__FILE__, __FUNCTION__, __LINE__, \ ++ spl_panic(__FILE__, __func__, __LINE__, \ + "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ + "failed (%d " #OP " %d) " STR "\n", \ + (boolean_t)(_verify3_left), \ +@@ -196,7 +196,7 @@ spl_assert(const char *buf, const char *file, const char *func, int line) + const int64_t _verify3_left = (int64_t)(LEFT); \ + const int64_t _verify3_right = (int64_t)(RIGHT); \ + if (unlikely(!(_verify3_left OP _verify3_right))) \ +- spl_panic(__FILE__, __FUNCTION__, __LINE__, \ ++ spl_panic(__FILE__, __func__, __LINE__, \ + "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ + "failed (%lld " #OP " %lld) " STR "\n", \ + (long long)(_verify3_left), \ +@@ -208,7 +208,7 @@ spl_assert(const char *buf, const char *file, const char *func, int line) + const uint64_t _verify3_left = (uint64_t)(LEFT); \ + const uint64_t _verify3_right = (uint64_t)(RIGHT); \ + if (unlikely(!(_verify3_left OP _verify3_right))) \ +- spl_panic(__FILE__, __FUNCTION__, __LINE__, \ ++ spl_panic(__FILE__, __func__, __LINE__, \ + "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ + "failed (%llu " #OP " %llu) " STR "\n", \ + (unsigned long long)(_verify3_left), \ +@@ -220,7 +220,7 @@ spl_assert(const char *buf, const char *file, const char *func, int line) + const uintptr_t _verify3_left = (uintptr_t)(LEFT); \ + const uintptr_t _verify3_right = (uintptr_t)(RIGHT); \ + if (unlikely(!(_verify3_left OP _verify3_right))) \ +- spl_panic(__FILE__, __FUNCTION__, __LINE__, \ ++ spl_panic(__FILE__, __func__, __LINE__, \ + "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ + "failed (%px " #OP " %px) " STR "\n", \ (void *) (_verify3_left), \ -@@ -130,7 +130,7 @@ spl_assert(const char *buf, const char *file, const char *func, int line) +@@ -232,7 +232,7 @@ spl_assert(const char *buf, const char *file, const char *func, int line) + const uintptr_t _verify3_left = (uintptr_t)(0); \ + const uintptr_t _verify3_right = (uintptr_t)(RIGHT); \ + if (unlikely(!(_verify3_left == _verify3_right))) \ +- spl_panic(__FILE__, __FUNCTION__, __LINE__, \ ++ spl_panic(__FILE__, __func__, __LINE__, \ + "VERIFY0(0 == " #RIGHT ") " \ + "failed (0 == %px) " STR "\n", \ + (long long) (_verify3_right), \ +@@ -243,7 +243,7 @@ spl_assert(const char *buf, const char *file, const char *func, int line) const int64_t _verify3_left = (int64_t)(0); \ const int64_t _verify3_right = (int64_t)(RIGHT); \ if (unlikely(!(_verify3_left == _verify3_right))) \ - spl_panic(__FILE__, __FUNCTION__, __LINE__, \ + spl_panic(__FILE__, __func__, __LINE__, \ "VERIFY0(0 == " #RIGHT ") " \ - "failed (0 == %lld)\n", \ - (long long) (_verify3_right)); \ -@@ -170,11 +170,11 @@ spl_assert(const char *buf, const char *file, const char *func, int line) - #define IMPLY(A, B) \ + "failed (0 == %lld) " STR "\n", \ + (long long) (_verify3_right), \ +@@ -253,12 +253,12 @@ spl_assert(const char *buf, const char *file, const char *func, int line) + #define VERIFY_IMPLY(A, B) \ ((void)(likely((!(A)) || (B)) || \ spl_assert("(" #A ") implies (" #B ")", \ - __FILE__, __FUNCTION__, __LINE__))) + __FILE__, __func__, __LINE__))) - #define EQUIV(A, B) \ + + #define VERIFY_EQUIV(A, B) \ ((void)(likely(!!(A) == !!(B)) || \ spl_assert("(" #A ") is equivalent to (" #B ")", \ - __FILE__, __FUNCTION__, __LINE__))) + __FILE__, __func__, __LINE__))) - - #endif /* NDEBUG */ + /* + * Debugging disabled (--disable-debug) diff --git a/include/os/linux/spl/sys/debug.h b/include/os/linux/spl/sys/debug.h -index 007238574..ff5d65b0f 100644 +index 3459d6979..885a2db06 100644 --- a/include/os/linux/spl/sys/debug.h +++ b/include/os/linux/spl/sys/debug.h -@@ -79,18 +79,18 @@ spl_assert(const char *buf, const char *file, const char *func, int line) - } +@@ -101,16 +101,16 @@ spl_assert(const char *buf, const char *file, const char *func, int line) + #endif #define PANIC(fmt, a...) \ - spl_panic(__FILE__, __FUNCTION__, __LINE__, fmt, ## a) @@ -106,7 +179,14 @@ index 007238574..ff5d65b0f 100644 - __FILE__, __FUNCTION__, __LINE__)) + __FILE__, __func__, __LINE__)) - #define VERIFY3B(LEFT, OP, RIGHT) do { \ + #define VERIFYF(cond, str, ...) do { \ + if (unlikely(!(cond))) \ +- spl_panic(__FILE__, __FUNCTION__, __LINE__, \ ++ spl_panic(__FILE__, __func__, __LINE__, \ + "VERIFY(" #cond ") failed " str "\n", __VA_ARGS__);\ + } while (0) + +@@ -118,7 +118,7 @@ spl_assert(const char *buf, const char *file, const char *func, int line) const boolean_t _verify3_left = (boolean_t)(LEFT); \ const boolean_t _verify3_right = (boolean_t)(RIGHT); \ if (unlikely(!(_verify3_left OP _verify3_right))) \ @@ -114,8 +194,8 @@ index 007238574..ff5d65b0f 100644 + spl_panic(__FILE__, __func__, __LINE__, \ "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ "failed (%d " #OP " %d)\n", \ - (boolean_t)(_verify3_left), \ -@@ -101,7 +101,7 @@ spl_assert(const char *buf, const char *file, const char *func, int line) + (boolean_t)_verify3_left, \ +@@ -129,7 +129,7 @@ spl_assert(const char *buf, const char *file, const char *func, int line) const int64_t _verify3_left = (int64_t)(LEFT); \ const int64_t _verify3_right = (int64_t)(RIGHT); \ if (unlikely(!(_verify3_left OP _verify3_right))) \ @@ -123,8 +203,8 @@ index 007238574..ff5d65b0f 100644 + spl_panic(__FILE__, __func__, __LINE__, \ "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ "failed (%lld " #OP " %lld)\n", \ - (long long)(_verify3_left), \ -@@ -112,7 +112,7 @@ spl_assert(const char *buf, const char *file, const char *func, int line) + (long long)_verify3_left, \ +@@ -140,7 +140,7 @@ spl_assert(const char *buf, const char *file, const char *func, int line) const uint64_t _verify3_left = (uint64_t)(LEFT); \ const uint64_t _verify3_right = (uint64_t)(RIGHT); \ if (unlikely(!(_verify3_left OP _verify3_right))) \ @@ -132,8 +212,8 @@ index 007238574..ff5d65b0f 100644 + spl_panic(__FILE__, __func__, __LINE__, \ "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ "failed (%llu " #OP " %llu)\n", \ - (unsigned long long)(_verify3_left), \ -@@ -123,7 +123,7 @@ spl_assert(const char *buf, const char *file, const char *func, int line) + (unsigned long long)_verify3_left, \ +@@ -151,7 +151,7 @@ spl_assert(const char *buf, const char *file, const char *func, int line) const uintptr_t _verify3_left = (uintptr_t)(LEFT); \ const uintptr_t _verify3_right = (uintptr_t)(RIGHT); \ if (unlikely(!(_verify3_left OP _verify3_right))) \ @@ -141,17 +221,80 @@ index 007238574..ff5d65b0f 100644 + spl_panic(__FILE__, __func__, __LINE__, \ "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ "failed (%px " #OP " %px)\n", \ + (void *)_verify3_left, \ +@@ -161,7 +161,7 @@ spl_assert(const char *buf, const char *file, const char *func, int line) + #define VERIFY0(RIGHT) do { \ + const int64_t _verify0_right = (int64_t)(RIGHT); \ + if (unlikely(!(0 == _verify0_right))) \ +- spl_panic(__FILE__, __FUNCTION__, __LINE__, \ ++ spl_panic(__FILE__, __func__, __LINE__, \ + "VERIFY0(" #RIGHT ") " \ + "failed (0 == %lld)\n", \ + (long long)_verify0_right); \ +@@ -170,7 +170,7 @@ spl_assert(const char *buf, const char *file, const char *func, int line) + #define VERIFY0P(RIGHT) do { \ + const uintptr_t _verify0_right = (uintptr_t)(RIGHT); \ + if (unlikely(!(0 == _verify0_right))) \ +- spl_panic(__FILE__, __FUNCTION__, __LINE__, \ ++ spl_panic(__FILE__, __func__, __LINE__, \ + "VERIFY0P(" #RIGHT ") " \ + "failed (NULL == %px)\n", \ + (void *)_verify0_right); \ +@@ -188,7 +188,7 @@ spl_assert(const char *buf, const char *file, const char *func, int line) + const boolean_t _verify3_left = (boolean_t)(LEFT); \ + const boolean_t _verify3_right = (boolean_t)(RIGHT); \ + if (unlikely(!(_verify3_left OP _verify3_right))) \ +- spl_panic(__FILE__, __FUNCTION__, __LINE__, \ ++ spl_panic(__FILE__, __func__, __LINE__, \ + "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ + "failed (%d " #OP " %d) " STR "\n", \ + (boolean_t)(_verify3_left), \ +@@ -200,7 +200,7 @@ spl_assert(const char *buf, const char *file, const char *func, int line) + const int64_t _verify3_left = (int64_t)(LEFT); \ + const int64_t _verify3_right = (int64_t)(RIGHT); \ + if (unlikely(!(_verify3_left OP _verify3_right))) \ +- spl_panic(__FILE__, __FUNCTION__, __LINE__, \ ++ spl_panic(__FILE__, __func__, __LINE__, \ + "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ + "failed (%lld " #OP " %lld) " STR "\n", \ + (long long)(_verify3_left), \ +@@ -212,7 +212,7 @@ spl_assert(const char *buf, const char *file, const char *func, int line) + const uint64_t _verify3_left = (uint64_t)(LEFT); \ + const uint64_t _verify3_right = (uint64_t)(RIGHT); \ + if (unlikely(!(_verify3_left OP _verify3_right))) \ +- spl_panic(__FILE__, __FUNCTION__, __LINE__, \ ++ spl_panic(__FILE__, __func__, __LINE__, \ + "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ + "failed (%llu " #OP " %llu) " STR "\n", \ + (unsigned long long)(_verify3_left), \ +@@ -224,7 +224,7 @@ spl_assert(const char *buf, const char *file, const char *func, int line) + const uintptr_t _verify3_left = (uintptr_t)(LEFT); \ + const uintptr_t _verify3_right = (uintptr_t)(RIGHT); \ + if (unlikely(!(_verify3_left OP _verify3_right))) \ +- spl_panic(__FILE__, __FUNCTION__, __LINE__, \ ++ spl_panic(__FILE__, __func__, __LINE__, \ + "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ + "failed (%px " #OP " %px) " STR "\n", \ (void *) (_verify3_left), \ -@@ -134,7 +134,7 @@ spl_assert(const char *buf, const char *file, const char *func, int line) +@@ -236,7 +236,7 @@ spl_assert(const char *buf, const char *file, const char *func, int line) + const uintptr_t _verify3_left = (uintptr_t)(0); \ + const uintptr_t _verify3_right = (uintptr_t)(RIGHT); \ + if (unlikely(!(_verify3_left == _verify3_right))) \ +- spl_panic(__FILE__, __FUNCTION__, __LINE__, \ ++ spl_panic(__FILE__, __func__, __LINE__, \ + "VERIFY0(0 == " #RIGHT ") " \ + "failed (0 == %px) " STR "\n", \ + (long long) (_verify3_right), \ +@@ -247,7 +247,7 @@ spl_assert(const char *buf, const char *file, const char *func, int line) const int64_t _verify3_left = (int64_t)(0); \ const int64_t _verify3_right = (int64_t)(RIGHT); \ if (unlikely(!(_verify3_left == _verify3_right))) \ - spl_panic(__FILE__, __FUNCTION__, __LINE__, \ + spl_panic(__FILE__, __func__, __LINE__, \ "VERIFY0(0 == " #RIGHT ") " \ - "failed (0 == %lld)\n", \ - (long long) (_verify3_right)); \ -@@ -143,12 +143,12 @@ spl_assert(const char *buf, const char *file, const char *func, int line) + "failed (0 == %lld) " STR "\n", \ + (long long) (_verify3_right), \ +@@ -257,12 +257,12 @@ spl_assert(const char *buf, const char *file, const char *func, int line) #define VERIFY_IMPLY(A, B) \ ((void)(likely((!(A)) || (B)) || \ spl_assert("(" #A ") implies (" #B ")", \ @@ -167,15 +310,30 @@ index 007238574..ff5d65b0f 100644 /* * Debugging disabled (--disable-debug) diff --git a/lib/libspl/include/assert.h b/lib/libspl/include/assert.h -index af4957dfb..c3a06c119 100644 +index 155bbab30..ce1b8e486 100644 --- a/lib/libspl/include/assert.h +++ b/lib/libspl/include/assert.h -@@ -69,17 +69,17 @@ libspl_assert(const char *buf, const char *file, const char *func, int line) +@@ -65,30 +65,30 @@ libspl_assert(const char *buf, const char *file, const char *func, int line) + #endif + + #define PANIC(fmt, a...) \ +- libspl_assertf(__FILE__, __FUNCTION__, __LINE__, fmt, ## a) ++ libspl_assertf(__FILE__, __func__, __LINE__, fmt, ## a) #define VERIFY(cond) \ (void) ((!(cond)) && \ - libspl_assert(#cond, __FILE__, __FUNCTION__, __LINE__)) + libspl_assert(#cond, __FILE__, __func__, __LINE__)) + + #define VERIFYF(cond, STR, ...) \ + do { \ + if (!(cond)) \ +- libspl_assertf(__FILE__, __FUNCTION__, __LINE__, \ ++ libspl_assertf(__FILE__, __func__, __LINE__, \ + "%s " STR, #cond, \ + __VA_ARGS__); \ + } while (0) + #define verify(cond) \ (void) ((!(cond)) && \ - libspl_assert(#cond, __FILE__, __FUNCTION__, __LINE__)) @@ -187,47 +345,110 @@ index af4957dfb..c3a06c119 100644 const boolean_t __right = (boolean_t)(RIGHT); \ if (!(__left OP __right)) \ - libspl_assertf(__FILE__, __FUNCTION__, __LINE__, \ -+ libspl_assertf(__FILE__, __func__, __LINE__, \ ++ libspl_assertf(__FILE__, __func__, __LINE__, \ "%s %s %s (0x%llx %s 0x%llx)", #LEFT, #OP, #RIGHT, \ (u_longlong_t)__left, #OP, (u_longlong_t)__right); \ } while (0) -@@ -89,7 +89,7 @@ do { \ +@@ -98,7 +98,7 @@ do { \ const int64_t __left = (int64_t)(LEFT); \ const int64_t __right = (int64_t)(RIGHT); \ if (!(__left OP __right)) \ - libspl_assertf(__FILE__, __FUNCTION__, __LINE__, \ -+ libspl_assertf(__FILE__, __func__, __LINE__, \ ++ libspl_assertf(__FILE__, __func__, __LINE__, \ "%s %s %s (0x%llx %s 0x%llx)", #LEFT, #OP, #RIGHT, \ (u_longlong_t)__left, #OP, (u_longlong_t)__right); \ } while (0) -@@ -99,7 +99,7 @@ do { \ +@@ -108,7 +108,7 @@ do { \ const uint64_t __left = (uint64_t)(LEFT); \ const uint64_t __right = (uint64_t)(RIGHT); \ if (!(__left OP __right)) \ - libspl_assertf(__FILE__, __FUNCTION__, __LINE__, \ -+ libspl_assertf(__FILE__, __func__, __LINE__, \ ++ libspl_assertf(__FILE__, __func__, __LINE__, \ "%s %s %s (0x%llx %s 0x%llx)", #LEFT, #OP, #RIGHT, \ (u_longlong_t)__left, #OP, (u_longlong_t)__right); \ } while (0) -@@ -109,7 +109,7 @@ do { \ +@@ -118,7 +118,7 @@ do { \ const uintptr_t __left = (uintptr_t)(LEFT); \ const uintptr_t __right = (uintptr_t)(RIGHT); \ if (!(__left OP __right)) \ - libspl_assertf(__FILE__, __FUNCTION__, __LINE__, \ -+ libspl_assertf(__FILE__, __func__, __LINE__, \ - "%s %s %s (0x%llx %s 0x%llx)", #LEFT, #OP, #RIGHT, \ - (u_longlong_t)__left, #OP, (u_longlong_t)__right); \ ++ libspl_assertf(__FILE__, __func__, __LINE__, \ + "%s %s %s (%p %s %p)", #LEFT, #OP, #RIGHT, \ + (void *)__left, #OP, (void *)__right); \ } while (0) -@@ -118,7 +118,7 @@ do { \ +@@ -127,7 +127,7 @@ do { \ do { \ const uint64_t __left = (uint64_t)(LEFT); \ if (!(__left == 0)) \ - libspl_assertf(__FILE__, __FUNCTION__, __LINE__, \ -+ libspl_assertf(__FILE__, __func__, __LINE__, \ ++ libspl_assertf(__FILE__, __func__, __LINE__, \ "%s == 0 (0x%llx == 0)", #LEFT, \ (u_longlong_t)__left); \ } while (0) -@@ -154,11 +154,11 @@ do { \ +@@ -136,7 +136,7 @@ do { \ + do { \ + const uintptr_t __left = (uintptr_t)(LEFT); \ + if (!(__left == 0)) \ +- libspl_assertf(__FILE__, __FUNCTION__, __LINE__, \ ++ libspl_assertf(__FILE__, __func__, __LINE__, \ + "%s == 0 (%p == 0)", #LEFT, \ + (void *)__left); \ + } while (0) +@@ -152,7 +152,7 @@ do { \ + const boolean_t __left = (boolean_t)(LEFT); \ + const boolean_t __right = (boolean_t)(RIGHT); \ + if (!(__left OP __right)) \ +- libspl_assertf(__FILE__, __FUNCTION__, __LINE__, \ ++ libspl_assertf(__FILE__, __func__, __LINE__, \ + "%s %s %s (0x%llx %s 0x%llx) " STR, \ + #LEFT, #OP, #RIGHT, \ + (u_longlong_t)__left, #OP, (u_longlong_t)__right, \ +@@ -164,7 +164,7 @@ do { \ + const int64_t __left = (int64_t)(LEFT); \ + const int64_t __right = (int64_t)(RIGHT); \ + if (!(__left OP __right)) \ +- libspl_assertf(__FILE__, __FUNCTION__, __LINE__, \ ++ libspl_assertf(__FILE__, __func__, __LINE__, \ + "%s %s %s (0x%llx %s 0x%llx) " STR, \ + #LEFT, #OP, #RIGHT, \ + (u_longlong_t)__left, #OP, (u_longlong_t)__right, \ +@@ -176,7 +176,7 @@ do { \ + const uint64_t __left = (uint64_t)(LEFT); \ + const uint64_t __right = (uint64_t)(RIGHT); \ + if (!(__left OP __right)) \ +- libspl_assertf(__FILE__, __FUNCTION__, __LINE__, \ ++ libspl_assertf(__FILE__, __func__, __LINE__, \ + "%s %s %s (0x%llx %s 0x%llx) " STR, \ + #LEFT, #OP, #RIGHT, \ + (u_longlong_t)__left, #OP, (u_longlong_t)__right, \ +@@ -188,7 +188,7 @@ do { \ + const uintptr_t __left = (uintptr_t)(LEFT); \ + const uintptr_t __right = (uintptr_t)(RIGHT); \ + if (!(__left OP __right)) \ +- libspl_assertf(__FILE__, __FUNCTION__, __LINE__, \ ++ libspl_assertf(__FILE__, __func__, __LINE__, \ + "%s %s %s (0x%llx %s 0x%llx) " STR, \ + #LEFT, #OP, #RIGHT, \ + (u_longlong_t)__left, #OP, (u_longlong_t)__right, \ +@@ -200,7 +200,7 @@ do { \ + do { \ + const uint64_t __left = (uint64_t)(LEFT); \ + if (!(__left == 0)) \ +- libspl_assertf(__FILE__, __FUNCTION__, __LINE__, \ ++ libspl_assertf(__FILE__, __func__, __LINE__, \ + "%s == 0 (0x%llx == 0) " STR, #LEFT, \ + (u_longlong_t)__left, __VA_ARGS__); \ + } while (0) +@@ -209,7 +209,7 @@ do { \ + do { \ + const uintptr_t __left = (uintptr_t)(LEFT); \ + if (!(__left == 0)) \ +- libspl_assertf(__FILE__, __FUNCTION__, __LINE__, \ ++ libspl_assertf(__FILE__, __func__, __LINE__, \ + "%s == 0 (%p == 0) " STR, #LEFT, \ + (u_longlong_t)__left, __VA_ARGS__); \ + } while (0) +@@ -262,11 +262,11 @@ do { \ #define IMPLY(A, B) \ ((void)(((!(A)) || (B)) || \ libspl_assert("(" #A ") implies (" #B ")", \ @@ -242,10 +463,10 @@ index af4957dfb..c3a06c119 100644 #endif /* NDEBUG */ diff --git a/module/os/freebsd/zfs/crypto_os.c b/module/os/freebsd/zfs/crypto_os.c -index 1f139ea5b..c945a155f 100644 +index 4d8493743..d35c101f4 100644 --- a/module/os/freebsd/zfs/crypto_os.c +++ b/module/os/freebsd/zfs/crypto_os.c -@@ -227,7 +227,7 @@ freebsd_crypt_uio_debug_log(boolean_t encrypt, +@@ -217,7 +217,7 @@ freebsd_crypt_uio_debug_log(boolean_t encrypt, printf("%s(%s, %p, { %s, %d, %d, %s }, %p, { %p, %u }, " "%p, %u, %u)\n", @@ -254,7 +475,7 @@ index 1f139ea5b..c945a155f 100644 c_info->ci_algname, c_info->ci_crypt_type, (unsigned int)c_info->ci_keylen, c_info->ci_name, data_uio, key->ck_data, -@@ -263,7 +263,7 @@ freebsd_crypt_newsession(freebsd_crypt_session_t *sessp, +@@ -252,7 +252,7 @@ freebsd_crypt_newsession(freebsd_crypt_session_t *sessp, #ifdef FCRYPTO_DEBUG printf("%s(%p, { %s, %d, %d, %s }, { %p, %u })\n", @@ -263,7 +484,7 @@ index 1f139ea5b..c945a155f 100644 c_info->ci_algname, c_info->ci_crypt_type, (unsigned int)c_info->ci_keylen, c_info->ci_name, key->ck_data, (unsigned int)key->ck_length); -@@ -328,7 +328,7 @@ freebsd_crypt_newsession(freebsd_crypt_session_t *sessp, +@@ -317,7 +317,7 @@ freebsd_crypt_newsession(freebsd_crypt_session_t *sessp, bad: #ifdef FCRYPTO_DEBUG if (error) @@ -272,7 +493,7 @@ index 1f139ea5b..c945a155f 100644 #endif return (error); } -@@ -384,7 +384,7 @@ freebsd_crypt_uio(boolean_t encrypt, +@@ -373,7 +373,7 @@ freebsd_crypt_uio(boolean_t encrypt, out: #ifdef FCRYPTO_DEBUG if (error) @@ -281,74 +502,11 @@ index 1f139ea5b..c945a155f 100644 #endif if (input_sessionp == NULL) { freebsd_crypt_freesession(session); -@@ -406,7 +406,7 @@ freebsd_crypt_newsession(freebsd_crypt_session_t *sessp, - - #ifdef FCRYPTO_DEBUG - printf("%s(%p, { %s, %d, %d, %s }, { %p, %u })\n", -- __FUNCTION__, sessp, -+ __func__, sessp, - c_info->ci_algname, c_info->ci_crypt_type, - (unsigned int)c_info->ci_keylen, c_info->ci_name, - key->ck_data, (unsigned int)key->ck_length); -@@ -460,7 +460,7 @@ freebsd_crypt_newsession(freebsd_crypt_session_t *sessp, - #ifdef FCRYPTO_DEBUG - printf("%s(%d): Using crypt %s (key length %u [%u bytes]), " - "auth %s (key length %d)\n", -- __FUNCTION__, __LINE__, -+ __func__, __LINE__, - xform->name, (unsigned int)key->ck_length, - (unsigned int)key->ck_length/8, - xauth->name, xauth->keysize); -@@ -483,7 +483,7 @@ freebsd_crypt_newsession(freebsd_crypt_session_t *sessp, - CRYPTOCAP_F_HARDWARE | CRYPTOCAP_F_SOFTWARE); - if (error != 0) { - printf("%s(%d): crypto_newsession failed with %d\n", -- __FUNCTION__, __LINE__, error); -+ __func__, __LINE__, error); - goto bad; - } - sessp->fs_sid = sid; -@@ -563,7 +563,7 @@ freebsd_crypt_uio(boolean_t encrypt, - #ifdef FCRYPTO_DEBUG - printf("%s(%d): Using crypt %s (key length %u [%u bytes]), " - "auth %s (key length %d)\n", -- __FUNCTION__, __LINE__, -+ __func__, __LINE__, - xform->name, (unsigned int)key->ck_length, - (unsigned int)key->ck_length/8, - xauth->name, xauth->keysize); -@@ -597,7 +597,7 @@ freebsd_crypt_uio(boolean_t encrypt, - auth_desc->crd_alg = xauth->type; - #ifdef FCRYPTO_DEBUG - printf("%s: auth: skip = %u, len = %u, inject = %u\n", -- __FUNCTION__, auth_desc->crd_skip, auth_desc->crd_len, -+ __func__, auth_desc->crd_skip, auth_desc->crd_len, - auth_desc->crd_inject); - #endif - -@@ -611,7 +611,7 @@ freebsd_crypt_uio(boolean_t encrypt, - - #ifdef FCRYPTO_DEBUG - printf("%s: enc: skip = %u, len = %u, inject = %u\n", -- __FUNCTION__, enc_desc->crd_skip, enc_desc->crd_len, -+ __func__, enc_desc->crd_skip, enc_desc->crd_len, - enc_desc->crd_inject); - #endif - -@@ -628,7 +628,7 @@ out: - bad: - #ifdef FCRYPTO_DEBUG - if (error) -- printf("%s: returning error %d\n", __FUNCTION__, error); -+ printf("%s: returning error %d\n", __func__, error); - #endif - return (error); - } diff --git a/module/os/freebsd/zfs/zfs_vfsops.c b/module/os/freebsd/zfs/zfs_vfsops.c -index a972c720d..2d54636bb 100644 +index a3fac1636..48e3cba13 100644 --- a/module/os/freebsd/zfs/zfs_vfsops.c +++ b/module/os/freebsd/zfs/zfs_vfsops.c -@@ -262,7 +262,7 @@ zfs_getquota(zfsvfs_t *zfsvfs, uid_t id, int isgroup, struct dqblk64 *dqp) +@@ -253,7 +253,7 @@ zfs_getquota(zfsvfs_t *zfsvfs, uid_t id, int isgroup, struct dqblk64 *dqp) if ((error = zap_lookup(zfsvfs->z_os, quotaobj, buf, sizeof (quota), 1, "a)) != 0) { dprintf("%s(%d): quotaobj lookup failed\n", @@ -357,7 +515,7 @@ index a972c720d..2d54636bb 100644 goto done; } /* -@@ -273,7 +273,7 @@ zfs_getquota(zfsvfs_t *zfsvfs, uid_t id, int isgroup, struct dqblk64 *dqp) +@@ -264,7 +264,7 @@ zfs_getquota(zfsvfs_t *zfsvfs, uid_t id, int isgroup, struct dqblk64 *dqp) error = zap_lookup(zfsvfs->z_os, usedobj, buf, sizeof (used), 1, &used); if (error && error != ENOENT) { dprintf("%s(%d): usedobj failed; %d\n", @@ -366,8 +524,21 @@ index a972c720d..2d54636bb 100644 goto done; } dqp->dqb_curblocks = btodb(used); +diff --git a/module/os/freebsd/zfs/zfs_vnops_os.c b/module/os/freebsd/zfs/zfs_vnops_os.c +index 5edd3fcc7..9af121d60 100644 +--- a/module/os/freebsd/zfs/zfs_vnops_os.c ++++ b/module/os/freebsd/zfs/zfs_vnops_os.c +@@ -4378,7 +4378,7 @@ zfs_freebsd_read(struct vop_read_args *ap) + printf("%s(%d): Direct I/O read returning EFAULT " + "uio = %p, zfs_uio_offset(uio) = %lu " + "zfs_uio_resid(uio) = %lu\n", +- __FUNCTION__, __LINE__, &uio, zfs_uio_offset(&uio), ++ __func__, __LINE__, &uio, zfs_uio_offset(&uio), + zfs_uio_resid(&uio)); + #endif + } diff --git a/module/os/freebsd/zfs/zio_crypt.c b/module/os/freebsd/zfs/zio_crypt.c -index b08916b31..204666957 100644 +index 195ac58f6..b6de57683 100644 --- a/module/os/freebsd/zfs/zio_crypt.c +++ b/module/os/freebsd/zfs/zio_crypt.c @@ -409,7 +409,7 @@ zio_do_crypt_uio_opencrypto(boolean_t encrypt, freebsd_crypt_session_t *sess, @@ -388,7 +559,7 @@ index b08916b31..204666957 100644 #endif return (SET_ERROR(ECKSUM)); } -@@ -1700,7 +1700,7 @@ zio_do_crypt_data(boolean_t encrypt, zio_crypt_key_t *key, +@@ -1693,7 +1693,7 @@ zio_do_crypt_data(boolean_t encrypt, zio_crypt_key_t *key, #ifdef FCRYPTO_DEBUG printf("%s(%s, %p, %p, %d, %p, %p, %u, %s, %p, %p, %p)\n", @@ -397,6 +568,19 @@ index b08916b31..204666957 100644 encrypt ? "encrypt" : "decrypt", key, salt, ot, iv, mac, datalen, byteswap ? "byteswap" : "native_endian", plainbuf, +diff --git a/tests/zfs-tests/cmd/idmap_util.c b/tests/zfs-tests/cmd/idmap_util.c +index 49483cbaa..5a6cae9eb 100644 +--- a/tests/zfs-tests/cmd/idmap_util.c ++++ b/tests/zfs-tests/cmd/idmap_util.c +@@ -155,7 +155,7 @@ log_msg(const char *msg, ...) + #define log_errno(msg, args...) \ + do { \ + log_msg("%s:%d:%s: [%m] " msg, __FILE__, __LINE__,\ +- __FUNCTION__, ##args); \ ++ __func__, ##args); \ + } while (0) + + /* -- -2.37.3 +2.44.0 diff --git a/pkg/zfs/patch/0005-Use-forward-declaration-instead-of-empty-struct.patch b/pkg/zfs/patch/0005-Use-forward-declaration-instead-of-empty-struct.patch index 723cbb18..0d7e78f7 100644 --- a/pkg/zfs/patch/0005-Use-forward-declaration-instead-of-empty-struct.patch +++ b/pkg/zfs/patch/0005-Use-forward-declaration-instead-of-empty-struct.patch @@ -1,4 +1,4 @@ -From 1c52610d16cd241e61c74ab7588edfdf00b945c3 Mon Sep 17 00:00:00 2001 +From f497d55d50cfb278a802da24e5c96682d38fa244 Mon Sep 17 00:00:00 2001 From: Michael Forney <mforney@mforney.org> Date: Sat, 21 Jan 2023 17:15:47 -0800 Subject: [PATCH] Use forward declaration instead of empty struct @@ -8,10 +8,10 @@ Subject: [PATCH] Use forward declaration instead of empty struct 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sys/zfs_context.h b/include/sys/zfs_context.h -index 750ca612b..7c8cf33ca 100644 +index 998eaa5dd..6d3e12002 100644 --- a/include/sys/zfs_context.h +++ b/include/sys/zfs_context.h -@@ -383,7 +383,7 @@ typedef struct procfs_list { +@@ -382,7 +382,7 @@ typedef struct procfs_list { } procfs_list_t; #ifndef __cplusplus @@ -21,5 +21,5 @@ index 750ca612b..7c8cf33ca 100644 typedef struct procfs_list_node { -- -2.37.3 +2.44.0 diff --git a/pkg/zfs/patch/0007-Remove-stray-at-top-level.patch b/pkg/zfs/patch/0007-Remove-stray-at-top-level.patch index f838f845..337b38b8 100644 --- a/pkg/zfs/patch/0007-Remove-stray-at-top-level.patch +++ b/pkg/zfs/patch/0007-Remove-stray-at-top-level.patch @@ -1,4 +1,4 @@ -From b40890a5c47a69abfe96490b053f71be5ab09166 Mon Sep 17 00:00:00 2001 +From 09804181b5df3ffef1bea6869778a5c5949a9992 Mon Sep 17 00:00:00 2001 From: Michael Forney <mforney@mforney.org> Date: Sat, 21 Jan 2023 17:17:48 -0800 Subject: [PATCH] Remove stray ';' at top-level @@ -55,13 +55,13 @@ index 9b74531fa..283c8e297 100644 +EXPORT_SYMBOL(avl_update_gt) +EXPORT_SYMBOL(avl_update) diff --git a/module/nvpair/nvpair.c b/module/nvpair/nvpair.c -index d9449e47e..5626e2025 100644 +index 903487347..56c256826 100644 --- a/module/nvpair/nvpair.c +++ b/module/nvpair/nvpair.c @@ -3281,13 +3281,13 @@ nvs_xdr_nvp_##type(XDR *xdrs, void *ptr, ...) \ + #endif - /* BEGIN CSTYLED */ -NVS_BUILD_XDRPROC_T(char); -NVS_BUILD_XDRPROC_T(short); -NVS_BUILD_XDRPROC_T(u_short); @@ -76,10 +76,10 @@ index d9449e47e..5626e2025 100644 +NVS_BUILD_XDRPROC_T(u_int) +NVS_BUILD_XDRPROC_T(longlong_t) +NVS_BUILD_XDRPROC_T(u_longlong_t) - /* END CSTYLED */ /* -@@ -3681,116 +3681,116 @@ nvs_xdr(nvstream_t *nvs, nvlist_t *nvl, char *buf, size_t *buflen) + * The format of xdr encoded nvpair is: +@@ -3680,116 +3680,116 @@ nvs_xdr(nvstream_t *nvs, nvlist_t *nvl, char *buf, size_t *buflen) return (err); } @@ -336,10 +336,10 @@ index 273b219a9..41099c7f0 100644 - "Limit to the amount of nesting a path can have. Defaults to 50."); + "Limit to the amount of nesting a path can have. Defaults to 50.") diff --git a/module/zcommon/zfs_prop.c b/module/zcommon/zfs_prop.c -index 3db6fd13f..13c63a36c 100644 +index 40254c8d9..191285825 100644 --- a/module/zcommon/zfs_prop.c +++ b/module/zcommon/zfs_prop.c -@@ -1076,26 +1076,26 @@ module_exit(zcommon_fini); +@@ -1110,26 +1110,26 @@ module_exit(zcommon_fini); #endif /* zfs dataset property functions */ @@ -388,5 +388,5 @@ index 3db6fd13f..13c63a36c 100644 +EXPORT_SYMBOL(zfs_prop_valid_for_type) +EXPORT_SYMBOL(zfs_prop_written) -- -2.37.3 +2.44.0 diff --git a/pkg/zfs/patch/0010-Avoid-arithmetic-on-void-pointer.patch b/pkg/zfs/patch/0010-Avoid-arithmetic-on-void-pointer.patch index c6309370..e0af799a 100644 --- a/pkg/zfs/patch/0010-Avoid-arithmetic-on-void-pointer.patch +++ b/pkg/zfs/patch/0010-Avoid-arithmetic-on-void-pointer.patch @@ -1,4 +1,4 @@ -From dad6fa581122eaf3eb5c65839a3fd294887ba139 Mon Sep 17 00:00:00 2001 +From e97b3c526b84a7bb8b504bbd765bde4924cc1bb6 Mon Sep 17 00:00:00 2001 From: Michael Forney <mforney@mforney.org> Date: Sat, 21 Jan 2023 17:52:40 -0800 Subject: [PATCH] Avoid arithmetic on void pointer @@ -8,10 +8,10 @@ Subject: [PATCH] Avoid arithmetic on void pointer 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/zcommon/zfs_fletcher.c b/module/zcommon/zfs_fletcher.c -index 619ddef02..a99865b2a 100644 +index 74b8c2a47..93342f615 100644 --- a/module/zcommon/zfs_fletcher.c +++ b/module/zcommon/zfs_fletcher.c -@@ -581,7 +581,7 @@ fletcher_4_incremental_impl(boolean_t native, const void *buf, uint64_t size, +@@ -583,7 +583,7 @@ fletcher_4_incremental_impl(boolean_t native, const void *buf, uint64_t size, fletcher_4_incremental_combine(zcp, len, &nzc); size -= len; @@ -21,5 +21,5 @@ index 619ddef02..a99865b2a 100644 } -- -2.37.3 +2.44.0 diff --git a/pkg/zfs/patch/0012-Remove-definition-of-highbit64-and-lowbit64.patch b/pkg/zfs/patch/0012-Remove-definition-of-highbit64-and-lowbit64.patch new file mode 100644 index 00000000..d9618041 --- /dev/null +++ b/pkg/zfs/patch/0012-Remove-definition-of-highbit64-and-lowbit64.patch @@ -0,0 +1,65 @@ +From cfc27efc55e81d952d96d7257b60fde6f9dff36d Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Wed, 29 Jan 2025 01:41:00 -0800 +Subject: [PATCH] Remove definition of highbit64 and lowbit64 + +For zstream, this is normally defined in lib/libzpool/kernel.c, but +that pulls in a bunch of other stuff. + +Instead, we'll just supply our own versions that support non-GNU +compilers. +--- + cmd/zpool/zpool_util.c | 26 -------------------------- + cmd/zpool/zpool_util.h | 2 -- + 2 files changed, 28 deletions(-) + +diff --git a/cmd/zpool/zpool_util.c b/cmd/zpool/zpool_util.c +index e7ff739e5..cd2c86995 100644 +--- a/cmd/zpool/zpool_util.c ++++ b/cmd/zpool/zpool_util.c +@@ -113,29 +113,3 @@ array64_max(uint64_t array[], unsigned int len) + + return (max); + } +- +-/* +- * Find highest one bit set. +- * Returns bit number + 1 of highest bit that is set, otherwise returns 0. +- */ +-int +-highbit64(uint64_t i) +-{ +- if (i == 0) +- return (0); +- +- return (NBBY * sizeof (uint64_t) - __builtin_clzll(i)); +-} +- +-/* +- * Find lowest one bit set. +- * Returns bit number + 1 of lowest bit that is set, otherwise returns 0. +- */ +-int +-lowbit64(uint64_t i) +-{ +- if (i == 0) +- return (0); +- +- return (__builtin_ffsll(i)); +-} +diff --git a/cmd/zpool/zpool_util.h b/cmd/zpool/zpool_util.h +index 7f5406f06..f340e7bbc 100644 +--- a/cmd/zpool/zpool_util.h ++++ b/cmd/zpool/zpool_util.h +@@ -44,8 +44,6 @@ void *safe_realloc(void *, size_t); + void zpool_no_memory(void); + uint_t num_logs(nvlist_t *nv); + uint64_t array64_max(uint64_t array[], unsigned int len); +-int highbit64(uint64_t i); +-int lowbit64(uint64_t i); + + /* + * Misc utility functions +-- +2.44.0 + |
