diff options
| author | Michael Forney <mforney@mforney.org> | 2024-03-22 19:22:27 -0700 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2024-03-23 11:07:33 -0700 |
| commit | 63394a17ae622bb0ed40c0d319cf55b02bc9c752 (patch) | |
| tree | a951958fb78929c7e9b232a0eba1604f267eb752 /pkg/zfs/patch | |
| parent | bdcd34d1f1beabbc7cf9063eee2121e11f9d1366 (diff) | |
zfs: Update to 2.2.3
zstream decompress and recompress are patched out for now.
Diffstat (limited to 'pkg/zfs/patch')
| -rw-r--r-- | pkg/zfs/patch/0001-Port-to-BearSSL.patch | 10 | ||||
| -rw-r--r-- | pkg/zfs/patch/0002-Use-find-exec-rm-instead-of-non-portable-delete.patch | 28 | ||||
| -rw-r--r-- | pkg/zfs/patch/0003-Use-AC_PROG_FGREP-to-detect-fgrep.patch | 41 | ||||
| -rw-r--r-- | pkg/zfs/patch/0003-Use-__asm__-instead-of-asm-to-compile-with-std-c99.patch (renamed from pkg/zfs/patch/0004-Use-__asm__-instead-of-asm-to-compile-with-std-c99.patch) | 44 | ||||
| -rw-r--r-- | pkg/zfs/patch/0004-Use-__func__-instead-of-obsolete-and-non-standard-__.patch (renamed from pkg/zfs/patch/0005-Use-__func__-instead-of-obsolete-and-non-standard-__.patch) | 223 | ||||
| -rw-r--r-- | pkg/zfs/patch/0005-Use-forward-declaration-instead-of-empty-struct.patch (renamed from pkg/zfs/patch/0006-Use-forward-declaration-instead-of-empty-struct.patch) | 6 | ||||
| -rw-r--r-- | pkg/zfs/patch/0006-Avoid-conflict-with-C23-bool-keyword.patch (renamed from pkg/zfs/patch/0007-Avoid-conflict-with-C23-bool-keyword.patch) | 6 | ||||
| -rw-r--r-- | pkg/zfs/patch/0007-Remove-stray-at-top-level.patch (renamed from pkg/zfs/patch/0008-Remove-stray-at-top-level.patch) | 63 | ||||
| -rw-r--r-- | pkg/zfs/patch/0008-Avoid-use-of-long-double-function.patch (renamed from pkg/zfs/patch/0009-Avoid-use-of-long-double-function.patch) | 0 | ||||
| -rw-r--r-- | pkg/zfs/patch/0009-Avoid-unnecessary-VLA.patch (renamed from pkg/zfs/patch/0010-Avoid-unnecessary-VLA.patch) | 10 | ||||
| -rw-r--r-- | pkg/zfs/patch/0010-Avoid-arithmetic-on-void-pointer.patch (renamed from pkg/zfs/patch/0011-Avoid-arithmetic-on-void-pointer.patch) | 6 | ||||
| -rw-r--r-- | pkg/zfs/patch/0011-zstream-Disable-recompress-and-decompress.patch | 39 |
12 files changed, 223 insertions, 253 deletions
diff --git a/pkg/zfs/patch/0001-Port-to-BearSSL.patch b/pkg/zfs/patch/0001-Port-to-BearSSL.patch index 497cdd59..1f64df8a 100644 --- a/pkg/zfs/patch/0001-Port-to-BearSSL.patch +++ b/pkg/zfs/patch/0001-Port-to-BearSSL.patch @@ -1,4 +1,4 @@ -From ec03405d2ba8eee8e95ec94e09888eaff82ad6ac Mon Sep 17 00:00:00 2001 +From d9bae3dfe72c3680b273e611d01a8adf7cdf7765 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 f77becd6a..5eed592a4 100644 +index 8f2a50d55..867879090 100644 --- a/lib/libzfs/libzfs_crypto.c +++ b/lib/libzfs/libzfs_crypto.c @@ -25,7 +25,7 @@ @@ -20,7 +20,7 @@ index f77becd6a..5eed592a4 100644 #if LIBFETCH_DYNAMIC #include <dlfcn.h> #endif -@@ -763,6 +763,44 @@ error: +@@ -772,6 +772,44 @@ error: return (ret); } @@ -64,8 +64,8 @@ index f77becd6a..5eed592a4 100644 + static int derive_key(libzfs_handle_t *hdl, zfs_keyformat_t format, uint64_t iters, - uint8_t *key_material, size_t key_material_len, uint64_t salt, -@@ -793,15 +831,9 @@ 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, case ZFS_KEYFORMAT_PASSPHRASE: salt = LE_64(salt); 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 4e58fa8d..f81214a4 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 8da3e065051442982e255786a45fd5eea01321a9 Mon Sep 17 00:00:00 2001 +From 4f2a58f0763898a49d2b5d76f92f321947188708 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 @@ -12,7 +12,7 @@ Subject: [PATCH] Use find -exec rm instead of non-portable -delete 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/config/ax_code_coverage.m4 b/config/ax_code_coverage.m4 -index 3e3c666f3..fbe46db1f 100644 +index cd2498358..83b3dbf30 100644 --- a/config/ax_code_coverage.m4 +++ b/config/ax_code_coverage.m4 @@ -153,7 +153,7 @@ distclean: code-coverage-clean @@ -25,10 +25,10 @@ index 3e3c666f3..fbe46db1f 100644 ], [ [CODE_COVERAGE_RULES_CHECK=' diff --git a/module/Makefile.in b/module/Makefile.in -index b6338430e..d87fb729d 100644 +index 9b34b3dfa..63d18d270 100644 --- a/module/Makefile.in +++ b/module/Makefile.in -@@ -70,7 +70,7 @@ clean-Linux: +@@ -71,7 +71,7 @@ clean-Linux: @CONFIG_KERNEL_TRUE@ $(MAKE) -C @LINUX_OBJ@ M="$$PWD" @KERNEL_MAKE@ clean $(RM) @LINUX_SYMBOLS@ Module.markers @@ -37,17 +37,17 @@ index b6338430e..d87fb729d 100644 clean-FreeBSD: +$(FMAKE) clean -@@ -86,7 +86,7 @@ modules_install-Linux: +@@ -91,7 +91,7 @@ modules_install-Linux: modules_uninstall-Linux-legacy + KERNELRELEASE=@LINUX_VERSION@ @# Remove extraneous build products when packaging - kmoddir=$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \ if [ -n "$(DESTDIR)" ]; then \ -- find $$kmoddir -name 'modules.*' -delete; \ -+ find $$kmoddir -name 'modules.*' -exec $(RM) -- {} +; \ +- find $(KMODDIR) -name 'modules.*' -delete; \ ++ find $(KMODDIR) -name 'modules.*' -exec $(RM) -- {} + \ fi @# Debian ships tiny fake System.map files that are @# syntactically valid but just say diff --git a/tests/zfs-tests/tests/functional/cli_root/zfs_diff/zfs_diff_timestamp.ksh b/tests/zfs-tests/tests/functional/cli_root/zfs_diff/zfs_diff_timestamp.ksh -index 0d08cf629..7714d02cd 100755 +index 81ee87f8a..903d2856f 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zfs_diff/zfs_diff_timestamp.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zfs_diff/zfs_diff_timestamp.ksh @@ -33,7 +33,7 @@ function cleanup @@ -60,20 +60,20 @@ index 0d08cf629..7714d02cd 100755 } diff --git a/tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_007_pos.ksh b/tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_007_pos.ksh -index da0aebe6b..7d5242ee0 100755 +index 157603981..cf60d03c5 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_007_pos.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_007_pos.ksh -@@ -61,7 +61,7 @@ test_pool () +@@ -61,7 +61,7 @@ function test_pool object=$(ls -i $mntpnt | awk '{print $1}') log_must zfs snapshot $POOL/fs@a while true; do - log_must find $mntpnt/ -type f -delete + log_must find $mntpnt/ -type f -exec rm -- {} + - sync + sync_all_pools log_must mkfiles "$mntpnt/" 4000 - sync + sync_all_pools diff --git a/tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_common.kshlib b/tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_common.kshlib -index b69d2ce02..54f3e459e 100644 +index 93355d0b3..88fc777e1 100644 --- a/tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_common.kshlib +++ b/tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_common.kshlib @@ -60,7 +60,7 @@ function udev_cleanup diff --git a/pkg/zfs/patch/0003-Use-AC_PROG_FGREP-to-detect-fgrep.patch b/pkg/zfs/patch/0003-Use-AC_PROG_FGREP-to-detect-fgrep.patch deleted file mode 100644 index c30e255d..00000000 --- a/pkg/zfs/patch/0003-Use-AC_PROG_FGREP-to-detect-fgrep.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 4f4a44f8c83179ee98397faa773f2e4c1faa066b Mon Sep 17 00:00:00 2001 -From: Michael Forney <mforney@mforney.org> -Date: Tue, 17 Jan 2023 12:57:13 -0800 -Subject: [PATCH] Use AC_PROG_FGREP to detect fgrep - -fgrep is not standard, so use AC_PROG_FGREP to detect the appropriate -command. ---- - config/kernel.m4 | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/config/kernel.m4 b/config/kernel.m4 -index 3a059b73a..3f535fdb3 100644 ---- a/config/kernel.m4 -+++ b/config/kernel.m4 -@@ -324,6 +324,7 @@ dnl # and `/usr/src/linux-*` with the highest version number according - dnl # to `sort -V` is assumed to be both source and build directory. - dnl # - AC_DEFUN([ZFS_AC_KERNEL], [ -+ AC_REQUIRE([AC_PROG_FGREP]) - AC_ARG_WITH([linux], - AS_HELP_STRING([--with-linux=PATH], - [Path to kernel source]), -@@ -404,11 +405,11 @@ AC_DEFUN([ZFS_AC_KERNEL], [ - utsrelease1=$kernelbuild/include/linux/version.h - utsrelease2=$kernelbuild/include/linux/utsrelease.h - utsrelease3=$kernelbuild/include/generated/utsrelease.h -- AS_IF([test -r $utsrelease1 && fgrep -q UTS_RELEASE $utsrelease1], [ -+ AS_IF([test -r $utsrelease1 && $FGREP -q UTS_RELEASE $utsrelease1], [ - utsrelease=$utsrelease1 -- ], [test -r $utsrelease2 && fgrep -q UTS_RELEASE $utsrelease2], [ -+ ], [test -r $utsrelease2 && $FGREP -q UTS_RELEASE $utsrelease2], [ - utsrelease=$utsrelease2 -- ], [test -r $utsrelease3 && fgrep -q UTS_RELEASE $utsrelease3], [ -+ ], [test -r $utsrelease3 && $FGREP -q UTS_RELEASE $utsrelease3], [ - utsrelease=$utsrelease3 - ]) - --- -2.37.3 - diff --git a/pkg/zfs/patch/0004-Use-__asm__-instead-of-asm-to-compile-with-std-c99.patch b/pkg/zfs/patch/0003-Use-__asm__-instead-of-asm-to-compile-with-std-c99.patch index 5bb7abe5..f8095664 100644 --- a/pkg/zfs/patch/0004-Use-__asm__-instead-of-asm-to-compile-with-std-c99.patch +++ b/pkg/zfs/patch/0003-Use-__asm__-instead-of-asm-to-compile-with-std-c99.patch @@ -1,4 +1,4 @@ -From 6f50ce7e45a1d35ed170a22c7b465445cc5437fa Mon Sep 17 00:00:00 2001 +From 2c79a37719c4f115ad718adae6856f903f5a1e7b Mon Sep 17 00:00:00 2001 From: Michael Forney <mforney@mforney.org> Date: Tue, 17 Jan 2023 13:07:11 -0800 Subject: [PATCH] Use __asm__ instead of asm to compile with -std=c99 @@ -9,7 +9,7 @@ Subject: [PATCH] Use __asm__ instead of asm to compile with -std=c99 2 files changed, 65 insertions(+), 65 deletions(-) diff --git a/module/zcommon/zfs_fletcher_intel.c b/module/zcommon/zfs_fletcher_intel.c -index 5136a01ec..14eecb192 100644 +index 34590a155..9213d083c 100644 --- a/module/zcommon/zfs_fletcher_intel.c +++ b/module/zcommon/zfs_fletcher_intel.c @@ -83,18 +83,18 @@ fletcher_4_avx2_fini(fletcher_4_ctx_t *ctx, zio_cksum_t *zcp) @@ -39,10 +39,10 @@ index 5136a01ec..14eecb192 100644 } -@@ -109,15 +109,15 @@ fletcher_4_avx2_native(fletcher_4_ctx_t *ctx, const void *buf, uint64_t size) +@@ -107,15 +107,15 @@ fletcher_4_avx2_native(fletcher_4_ctx_t *ctx, const void *buf, uint64_t size) FLETCHER_4_AVX2_RESTORE_CTX(ctx); - for (; ip < ipend; ip += 2) { + do { - asm volatile("vpmovzxdq %0, %%ymm4"::"m" (*ip)); - asm volatile("vpaddq %ymm4, %ymm0, %ymm0"); - asm volatile("vpaddq %ymm0, %ymm1, %ymm1"); @@ -53,22 +53,22 @@ index 5136a01ec..14eecb192 100644 + __asm__ volatile("vpaddq %ymm0, %ymm1, %ymm1"); + __asm__ volatile("vpaddq %ymm1, %ymm2, %ymm2"); + __asm__ volatile("vpaddq %ymm2, %ymm3, %ymm3"); - } + } while ((ip += 2) < ipend); FLETCHER_4_AVX2_SAVE_CTX(ctx); - asm volatile("vzeroupper"); + __asm__ volatile("vzeroupper"); - - kfpu_end(); } -@@ -136,20 +136,20 @@ fletcher_4_avx2_byteswap(fletcher_4_ctx_t *ctx, const void *buf, uint64_t size) + + static void +@@ -130,20 +130,20 @@ fletcher_4_avx2_byteswap(fletcher_4_ctx_t *ctx, const void *buf, uint64_t size) FLETCHER_4_AVX2_RESTORE_CTX(ctx); - asm volatile("vmovdqu %0, %%ymm5" :: "m" (mask)); + __asm__ volatile("vmovdqu %0, %%ymm5" :: "m" (mask)); - for (; ip < ipend; ip += 2) { + do { - asm volatile("vpmovzxdq %0, %%ymm4"::"m" (*ip)); - asm volatile("vpshufb %ymm5, %ymm4, %ymm4"); + __asm__ volatile("vpmovzxdq %0, %%ymm4"::"m" (*ip)); @@ -82,16 +82,16 @@ index 5136a01ec..14eecb192 100644 + __asm__ volatile("vpaddq %ymm0, %ymm1, %ymm1"); + __asm__ volatile("vpaddq %ymm1, %ymm2, %ymm2"); + __asm__ volatile("vpaddq %ymm2, %ymm3, %ymm3"); - } + } while ((ip += 2) < ipend); FLETCHER_4_AVX2_SAVE_CTX(ctx); - asm volatile("vzeroupper"); + __asm__ volatile("vzeroupper"); - - kfpu_end(); } + + static boolean_t fletcher_4_avx2_valid(void) diff --git a/module/zcommon/zfs_fletcher_sse.c b/module/zcommon/zfs_fletcher_sse.c -index 15ce9b07f..3aca5485d 100644 +index 8ab9b9acb..b942de4a2 100644 --- a/module/zcommon/zfs_fletcher_sse.c +++ b/module/zcommon/zfs_fletcher_sse.c @@ -82,18 +82,18 @@ fletcher_4_sse2_fini(fletcher_4_ctx_t *ctx, zio_cksum_t *zcp) @@ -121,14 +121,14 @@ index 15ce9b07f..3aca5485d 100644 } static void -@@ -106,21 +106,21 @@ fletcher_4_sse2_native(fletcher_4_ctx_t *ctx, const void *buf, uint64_t size) +@@ -104,21 +104,21 @@ fletcher_4_sse2_native(fletcher_4_ctx_t *ctx, const void *buf, uint64_t size) FLETCHER_4_SSE_RESTORE_CTX(ctx); - asm volatile("pxor %xmm4, %xmm4"); + __asm__ volatile("pxor %xmm4, %xmm4"); - for (; ip < ipend; ip += 2) { + do { - asm volatile("movdqu %0, %%xmm5" :: "m"(*ip)); - asm volatile("movdqa %xmm5, %xmm6"); - asm volatile("punpckldq %xmm4, %xmm5"); @@ -153,11 +153,11 @@ index 15ce9b07f..3aca5485d 100644 + __asm__ volatile("paddq %xmm0, %xmm1"); + __asm__ volatile("paddq %xmm1, %xmm2"); + __asm__ volatile("paddq %xmm2, %xmm3"); - } + } while ((ip += 2) < ipend); FLETCHER_4_SSE_SAVE_CTX(ctx); -@@ -141,13 +141,13 @@ fletcher_4_sse2_byteswap(fletcher_4_ctx_t *ctx, const void *buf, uint64_t size) - for (; ip < ipend; ip += 2) { +@@ -135,13 +135,13 @@ fletcher_4_sse2_byteswap(fletcher_4_ctx_t *ctx, const void *buf, uint64_t size) + do { uint32_t scratch1 = BSWAP_32(ip[0]); uint32_t scratch2 = BSWAP_32(ip[1]); - asm volatile("movd %0, %%xmm5" :: "r"(scratch1)); @@ -174,10 +174,10 @@ index 15ce9b07f..3aca5485d 100644 + __asm__ volatile("paddq %xmm0, %xmm1"); + __asm__ volatile("paddq %xmm1, %xmm2"); + __asm__ volatile("paddq %xmm2, %xmm3"); - } + } while ((ip += 2) < ipend); FLETCHER_4_SSE_SAVE_CTX(ctx); -@@ -188,23 +188,23 @@ fletcher_4_ssse3_byteswap(fletcher_4_ctx_t *ctx, const void *buf, uint64_t size) +@@ -179,23 +179,23 @@ fletcher_4_ssse3_byteswap(fletcher_4_ctx_t *ctx, const void *buf, uint64_t size) FLETCHER_4_SSE_RESTORE_CTX(ctx); @@ -186,7 +186,7 @@ index 15ce9b07f..3aca5485d 100644 + __asm__ volatile("movdqu %0, %%xmm7"::"m" (mask)); + __asm__ volatile("pxor %xmm4, %xmm4"); - for (; ip < ipend; ip += 2) { + do { - asm volatile("movdqu %0, %%xmm5"::"m" (*ip)); - asm volatile("pshufb %xmm7, %xmm5"); - asm volatile("movdqa %xmm5, %xmm6"); @@ -213,7 +213,7 @@ index 15ce9b07f..3aca5485d 100644 + __asm__ volatile("paddq %xmm0, %xmm1"); + __asm__ volatile("paddq %xmm1, %xmm2"); + __asm__ volatile("paddq %xmm2, %xmm3"); - } + } while ((ip += 2) < ipend); FLETCHER_4_SSE_SAVE_CTX(ctx); -- diff --git a/pkg/zfs/patch/0005-Use-__func__-instead-of-obsolete-and-non-standard-__.patch b/pkg/zfs/patch/0004-Use-__func__-instead-of-obsolete-and-non-standard-__.patch index a41cfddc..aba6e28b 100644 --- a/pkg/zfs/patch/0005-Use-__func__-instead-of-obsolete-and-non-standard-__.patch +++ b/pkg/zfs/patch/0004-Use-__func__-instead-of-obsolete-and-non-standard-__.patch @@ -1,4 +1,4 @@ -From 35e48da3329aff4eee7bb3ff2ddd81d982cfa307 Mon Sep 17 00:00:00 2001 +From 3b0d7aec7e04881005dcf07f12054cc65c2d3587 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 @@ -14,162 +14,163 @@ Subject: [PATCH] Use __func__ instead of obsolete and non-standard 6 files changed, 43 insertions(+), 43 deletions(-) diff --git a/include/os/freebsd/spl/sys/debug.h b/include/os/freebsd/spl/sys/debug.h -index 1f820bc33..a5c12daa5 100644 +index 3e67cf0e9..4bb62224e 100644 --- a/include/os/freebsd/spl/sys/debug.h +++ b/include/os/freebsd/spl/sys/debug.h -@@ -66,18 +66,18 @@ void spl_dumpstack(void); +@@ -75,18 +75,18 @@ spl_assert(const char *buf, const char *file, const char *func, int line) + #define unlikely(expr) expect((expr) != 0, 0) - /* BEGIN CSTYLED */ #define PANIC(fmt, a...) \ - spl_panic(__FILE__, __FUNCTION__, __LINE__, fmt, ## a) + spl_panic(__FILE__, __func__, __LINE__, fmt, ## a) - #define VERIFY(cond) \ - (void) (unlikely(!(cond)) && \ -- spl_panic(__FILE__, __FUNCTION__, __LINE__, \ -+ spl_panic(__FILE__, __func__, __LINE__, \ - "%s", "VERIFY(" #cond ") failed\n")) + #define VERIFY(cond) \ + (void) (unlikely(!(cond)) && \ + spl_assert("VERIFY(" #cond ") failed\n", \ +- __FILE__, __FUNCTION__, __LINE__)) ++ __FILE__, __func__, __LINE__)) - #define VERIFY3B(LEFT, OP, RIGHT) do { \ + #define VERIFY3B(LEFT, OP, RIGHT) do { \ const boolean_t _verify3_left = (boolean_t)(LEFT); \ - const boolean_t _verify3_right = (boolean_t)(RIGHT);\ + 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)\n", \ - (boolean_t) (_verify3_left), \ -@@ -88,7 +88,7 @@ void spl_dumpstack(void); + "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) 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)\n", \ - (long long) (_verify3_left), \ -@@ -99,7 +99,7 @@ void spl_dumpstack(void); + "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) 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)\n", \ - (unsigned long long) (_verify3_left), \ -@@ -110,7 +110,7 @@ void spl_dumpstack(void); + "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) const uintptr_t _verify3_left = (uintptr_t)(LEFT); \ - const uintptr_t _verify3_right = (uintptr_t)(RIGHT);\ + 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)\n", \ - (void *) (_verify3_left), \ -@@ -121,7 +121,7 @@ void spl_dumpstack(void); - const int64_t _verify3_left = (int64_t)(0); \ + "failed (%px " #OP " %px)\n", \ + (void *) (_verify3_left), \ +@@ -130,7 +130,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__, \ - "VERIFY3(0 == " #RIGHT ") " \ - "failed (0 == %lld)\n", \ - (long long) (_verify3_right)); \ -@@ -155,11 +155,11 @@ void spl_dumpstack(void); - #define ASSERT VERIFY + "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) \ - ((void)(likely((!(A)) || (B)) || \ -- spl_panic(__FILE__, __FUNCTION__, __LINE__, \ -+ spl_panic(__FILE__, __func__, __LINE__, \ - "(" #A ") implies (" #B ")"))) + ((void)(likely((!(A)) || (B)) || \ + spl_assert("(" #A ") implies (" #B ")", \ +- __FILE__, __FUNCTION__, __LINE__))) ++ __FILE__, __func__, __LINE__))) #define EQUIV(A, B) \ - ((void)(likely(!!(A) == !!(B)) || \ -- spl_panic(__FILE__, __FUNCTION__, __LINE__, \ -+ spl_panic(__FILE__, __func__, __LINE__, \ - "(" #A ") is equivalent to (" #B ")"))) - /* END CSTYLED */ + ((void)(likely(!!(A) == !!(B)) || \ + spl_assert("(" #A ") is equivalent to (" #B ")", \ +- __FILE__, __FUNCTION__, __LINE__))) ++ __FILE__, __func__, __LINE__))) + + #endif /* NDEBUG */ diff --git a/include/os/linux/spl/sys/debug.h b/include/os/linux/spl/sys/debug.h -index dc6b85eeb..b46c174cd 100644 +index 007238574..ff5d65b0f 100644 --- a/include/os/linux/spl/sys/debug.h +++ b/include/os/linux/spl/sys/debug.h -@@ -60,18 +60,18 @@ void spl_dumpstack(void); +@@ -79,18 +79,18 @@ spl_assert(const char *buf, const char *file, const char *func, int line) + } - /* BEGIN CSTYLED */ #define PANIC(fmt, a...) \ - spl_panic(__FILE__, __FUNCTION__, __LINE__, fmt, ## a) + spl_panic(__FILE__, __func__, __LINE__, fmt, ## a) - #define VERIFY(cond) \ - (void) (unlikely(!(cond)) && \ -- spl_panic(__FILE__, __FUNCTION__, __LINE__, \ -+ spl_panic(__FILE__, __func__, __LINE__, \ - "%s", "VERIFY(" #cond ") failed\n")) + #define VERIFY(cond) \ + (void) (unlikely(!(cond)) && \ + spl_assert("VERIFY(" #cond ") failed\n", \ +- __FILE__, __FUNCTION__, __LINE__)) ++ __FILE__, __func__, __LINE__)) - #define VERIFY3B(LEFT, OP, RIGHT) do { \ + #define VERIFY3B(LEFT, OP, RIGHT) do { \ const boolean_t _verify3_left = (boolean_t)(LEFT); \ - const boolean_t _verify3_right = (boolean_t)(RIGHT);\ + 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)\n", \ - (boolean_t) (_verify3_left), \ -@@ -82,7 +82,7 @@ void spl_dumpstack(void); + "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) 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)\n", \ - (long long) (_verify3_left), \ -@@ -93,7 +93,7 @@ void spl_dumpstack(void); + "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) 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)\n", \ - (unsigned long long) (_verify3_left), \ -@@ -104,7 +104,7 @@ void spl_dumpstack(void); + "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) const uintptr_t _verify3_left = (uintptr_t)(LEFT); \ - const uintptr_t _verify3_right = (uintptr_t)(RIGHT);\ + 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)\n", \ - (void *) (_verify3_left), \ -@@ -115,7 +115,7 @@ void spl_dumpstack(void); - const int64_t _verify3_left = (int64_t)(0); \ + "failed (%px " #OP " %px)\n", \ + (void *) (_verify3_left), \ +@@ -134,7 +134,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__, \ - "VERIFY3(0 == " #RIGHT ") " \ - "failed (0 == %lld)\n", \ - (long long) (_verify3_right)); \ -@@ -155,11 +155,11 @@ void spl_dumpstack(void); - #define ASSERT VERIFY - #define IMPLY(A, B) \ - ((void)(likely((!(A)) || (B)) || \ -- spl_panic(__FILE__, __FUNCTION__, __LINE__, \ -+ spl_panic(__FILE__, __func__, __LINE__, \ - "(" #A ") implies (" #B ")"))) - #define EQUIV(A, B) \ - ((void)(likely(!!(A) == !!(B)) || \ -- spl_panic(__FILE__, __FUNCTION__, __LINE__, \ -+ spl_panic(__FILE__, __func__, __LINE__, \ - "(" #A ") is equivalent to (" #B ")"))) - /* END CSTYLED */ + "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) + #define VERIFY_IMPLY(A, B) \ + ((void)(likely((!(A)) || (B)) || \ + spl_assert("(" #A ") implies (" #B ")", \ +- __FILE__, __FUNCTION__, __LINE__))) ++ __FILE__, __func__, __LINE__))) + + #define VERIFY_EQUIV(A, B) \ + ((void)(likely(!!(A) == !!(B)) || \ + spl_assert("(" #A ") is equivalent to (" #B ")", \ +- __FILE__, __FUNCTION__, __LINE__))) ++ __FILE__, __func__, __LINE__))) + /* + * Debugging disabled (--disable-debug) diff --git a/lib/libspl/include/assert.h b/lib/libspl/include/assert.h -index 0503ce492..73f33077c 100644 +index af4957dfb..c3a06c119 100644 --- a/lib/libspl/include/assert.h +++ b/lib/libspl/include/assert.h -@@ -53,17 +53,17 @@ libspl_assert(const char *buf, const char *file, const char *func, int line) +@@ -69,17 +69,17 @@ libspl_assert(const char *buf, const char *file, const char *func, int line) #define VERIFY(cond) \ (void) ((!(cond)) && \ @@ -190,7 +191,7 @@ index 0503ce492..73f33077c 100644 "%s %s %s (0x%llx %s 0x%llx)", #LEFT, #OP, #RIGHT, \ (u_longlong_t)__left, #OP, (u_longlong_t)__right); \ } while (0) -@@ -73,7 +73,7 @@ do { \ +@@ -89,7 +89,7 @@ do { \ const int64_t __left = (int64_t)(LEFT); \ const int64_t __right = (int64_t)(RIGHT); \ if (!(__left OP __right)) \ @@ -199,7 +200,7 @@ index 0503ce492..73f33077c 100644 "%s %s %s (0x%llx %s 0x%llx)", #LEFT, #OP, #RIGHT, \ (u_longlong_t)__left, #OP, (u_longlong_t)__right); \ } while (0) -@@ -83,7 +83,7 @@ do { \ +@@ -99,7 +99,7 @@ do { \ const uint64_t __left = (uint64_t)(LEFT); \ const uint64_t __right = (uint64_t)(RIGHT); \ if (!(__left OP __right)) \ @@ -208,7 +209,7 @@ index 0503ce492..73f33077c 100644 "%s %s %s (0x%llx %s 0x%llx)", #LEFT, #OP, #RIGHT, \ (u_longlong_t)__left, #OP, (u_longlong_t)__right); \ } while (0) -@@ -93,7 +93,7 @@ do { \ +@@ -109,7 +109,7 @@ do { \ const uintptr_t __left = (uintptr_t)(LEFT); \ const uintptr_t __right = (uintptr_t)(RIGHT); \ if (!(__left OP __right)) \ @@ -217,7 +218,7 @@ index 0503ce492..73f33077c 100644 "%s %s %s (0x%llx %s 0x%llx)", #LEFT, #OP, #RIGHT, \ (u_longlong_t)__left, #OP, (u_longlong_t)__right); \ } while (0) -@@ -102,7 +102,7 @@ do { \ +@@ -118,7 +118,7 @@ do { \ do { \ const uint64_t __left = (uint64_t)(LEFT); \ if (!(__left == 0)) \ @@ -226,7 +227,7 @@ index 0503ce492..73f33077c 100644 "%s == 0 (0x%llx == 0)", #LEFT, \ (u_longlong_t)__left); \ } while (0) -@@ -140,11 +140,11 @@ do { \ +@@ -154,11 +154,11 @@ do { \ #define IMPLY(A, B) \ ((void)(((!(A)) || (B)) || \ libspl_assert("(" #A ") implies (" #B ")", \ @@ -241,28 +242,28 @@ index 0503ce492..73f33077c 100644 #endif /* NDEBUG */ diff --git a/module/os/freebsd/zfs/crypto_os.c b/module/os/freebsd/zfs/crypto_os.c -index f342c5e85..0ebc56e95 100644 +index 1f139ea5b..c945a155f 100644 --- a/module/os/freebsd/zfs/crypto_os.c +++ b/module/os/freebsd/zfs/crypto_os.c -@@ -229,7 +229,7 @@ freebsd_crypt_uio_debug_log(boolean_t encrypt, +@@ -227,7 +227,7 @@ freebsd_crypt_uio_debug_log(boolean_t encrypt, - printf("%s(%s, %p, { %s, %d, %d, %s }, %p, { %d, %p, %u }, " + printf("%s(%s, %p, { %s, %d, %d, %s }, %p, { %p, %u }, " "%p, %u, %u)\n", - __FUNCTION__, encrypt ? "encrypt" : "decrypt", input_sessionp, + __func__, encrypt ? "encrypt" : "decrypt", input_sessionp, c_info->ci_algname, c_info->ci_crypt_type, (unsigned int)c_info->ci_keylen, c_info->ci_name, - data_uio, key->ck_format, key->ck_data, -@@ -265,7 +265,7 @@ freebsd_crypt_newsession(freebsd_crypt_session_t *sessp, + data_uio, key->ck_data, +@@ -263,7 +263,7 @@ freebsd_crypt_newsession(freebsd_crypt_session_t *sessp, #ifdef FCRYPTO_DEBUG - printf("%s(%p, { %s, %d, %d, %s }, { %d, %p, %u })\n", + 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_format, key->ck_data, (unsigned int)key->ck_length); -@@ -331,7 +331,7 @@ freebsd_crypt_newsession(freebsd_crypt_session_t *sessp, + key->ck_data, (unsigned int)key->ck_length); +@@ -328,7 +328,7 @@ freebsd_crypt_newsession(freebsd_crypt_session_t *sessp, bad: #ifdef FCRYPTO_DEBUG if (error) @@ -271,7 +272,7 @@ index f342c5e85..0ebc56e95 100644 #endif return (error); } -@@ -387,7 +387,7 @@ freebsd_crypt_uio(boolean_t encrypt, +@@ -384,7 +384,7 @@ freebsd_crypt_uio(boolean_t encrypt, out: #ifdef FCRYPTO_DEBUG if (error) @@ -280,16 +281,16 @@ index f342c5e85..0ebc56e95 100644 #endif if (input_sessionp == NULL) { freebsd_crypt_freesession(session); -@@ -409,7 +409,7 @@ freebsd_crypt_newsession(freebsd_crypt_session_t *sessp, +@@ -406,7 +406,7 @@ freebsd_crypt_newsession(freebsd_crypt_session_t *sessp, #ifdef FCRYPTO_DEBUG - printf("%s(%p, { %s, %d, %d, %s }, { %d, %p, %u })\n", + 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_format, key->ck_data, (unsigned int)key->ck_length); -@@ -463,7 +463,7 @@ freebsd_crypt_newsession(freebsd_crypt_session_t *sessp, + 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", @@ -298,7 +299,7 @@ index f342c5e85..0ebc56e95 100644 xform->name, (unsigned int)key->ck_length, (unsigned int)key->ck_length/8, xauth->name, xauth->keysize); -@@ -489,7 +489,7 @@ freebsd_crypt_newsession(freebsd_crypt_session_t *sessp, +@@ -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", @@ -307,7 +308,7 @@ index f342c5e85..0ebc56e95 100644 goto bad; } sessp->fs_sid = sid; -@@ -569,7 +569,7 @@ freebsd_crypt_uio(boolean_t encrypt, +@@ -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", @@ -316,7 +317,7 @@ index f342c5e85..0ebc56e95 100644 xform->name, (unsigned int)key->ck_length, (unsigned int)key->ck_length/8, xauth->name, xauth->keysize); -@@ -603,7 +603,7 @@ freebsd_crypt_uio(boolean_t encrypt, +@@ -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", @@ -325,7 +326,7 @@ index f342c5e85..0ebc56e95 100644 auth_desc->crd_inject); #endif -@@ -617,7 +617,7 @@ freebsd_crypt_uio(boolean_t encrypt, +@@ -611,7 +611,7 @@ freebsd_crypt_uio(boolean_t encrypt, #ifdef FCRYPTO_DEBUG printf("%s: enc: skip = %u, len = %u, inject = %u\n", @@ -334,7 +335,7 @@ index f342c5e85..0ebc56e95 100644 enc_desc->crd_inject); #endif -@@ -634,7 +634,7 @@ out: +@@ -628,7 +628,7 @@ out: bad: #ifdef FCRYPTO_DEBUG if (error) @@ -344,10 +345,10 @@ index f342c5e85..0ebc56e95 100644 return (error); } diff --git a/module/os/freebsd/zfs/zfs_vfsops.c b/module/os/freebsd/zfs/zfs_vfsops.c -index 05d41d4e3..01b12b12c 100644 +index a972c720d..2d54636bb 100644 --- a/module/os/freebsd/zfs/zfs_vfsops.c +++ b/module/os/freebsd/zfs/zfs_vfsops.c -@@ -244,7 +244,7 @@ zfs_getquota(zfsvfs_t *zfsvfs, uid_t id, int isgroup, struct dqblk64 *dqp) +@@ -262,7 +262,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", @@ -356,7 +357,7 @@ index 05d41d4e3..01b12b12c 100644 goto done; } /* -@@ -255,7 +255,7 @@ zfs_getquota(zfsvfs_t *zfsvfs, uid_t id, int isgroup, struct dqblk64 *dqp) +@@ -273,7 +273,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,10 +367,10 @@ index 05d41d4e3..01b12b12c 100644 } dqp->dqb_curblocks = btodb(used); diff --git a/module/os/freebsd/zfs/zio_crypt.c b/module/os/freebsd/zfs/zio_crypt.c -index 9e0ab52a2..997f2492f 100644 +index b08916b31..204666957 100644 --- a/module/os/freebsd/zfs/zio_crypt.c +++ b/module/os/freebsd/zfs/zio_crypt.c -@@ -420,7 +420,7 @@ zio_do_crypt_uio_opencrypto(boolean_t encrypt, freebsd_crypt_session_t *sess, +@@ -409,7 +409,7 @@ zio_do_crypt_uio_opencrypto(boolean_t encrypt, freebsd_crypt_session_t *sess, if (ret != 0) { #ifdef FCRYPTO_DEBUG printf("%s(%d): Returning error %s\n", @@ -378,9 +379,9 @@ index 9e0ab52a2..997f2492f 100644 #endif ret = SET_ERROR(encrypt ? EIO : ECKSUM); } -@@ -1195,7 +1195,7 @@ zio_crypt_do_indirect_mac_checksum_impl(boolean_t generate, void *buf, +@@ -1176,7 +1176,7 @@ zio_crypt_do_indirect_mac_checksum_impl(boolean_t generate, void *buf, - if (bcmp(digestbuf, cksum, ZIO_DATA_MAC_LEN) != 0) { + if (memcmp(digestbuf, cksum, ZIO_DATA_MAC_LEN) != 0) { #ifdef FCRYPTO_DEBUG - printf("%s(%d): Setting ECKSUM\n", __FUNCTION__, __LINE__); + printf("%s(%d): Setting ECKSUM\n", __func__, __LINE__); diff --git a/pkg/zfs/patch/0006-Use-forward-declaration-instead-of-empty-struct.patch b/pkg/zfs/patch/0005-Use-forward-declaration-instead-of-empty-struct.patch index 99c71827..723cbb18 100644 --- a/pkg/zfs/patch/0006-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 50878832d41ef03d61f5db2dc7a89039b2ba5889 Mon Sep 17 00:00:00 2001 +From 1c52610d16cd241e61c74ab7588edfdf00b945c3 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 a6ff94317..42384d83a 100644 +index 750ca612b..7c8cf33ca 100644 --- a/include/sys/zfs_context.h +++ b/include/sys/zfs_context.h -@@ -380,7 +380,7 @@ typedef struct procfs_list { +@@ -383,7 +383,7 @@ typedef struct procfs_list { } procfs_list_t; #ifndef __cplusplus diff --git a/pkg/zfs/patch/0007-Avoid-conflict-with-C23-bool-keyword.patch b/pkg/zfs/patch/0006-Avoid-conflict-with-C23-bool-keyword.patch index 1bde5c95..a7bfd886 100644 --- a/pkg/zfs/patch/0007-Avoid-conflict-with-C23-bool-keyword.patch +++ b/pkg/zfs/patch/0006-Avoid-conflict-with-C23-bool-keyword.patch @@ -1,4 +1,4 @@ -From bf9e24e3fe87474e71555b3421bfaa7d0c5e1882 Mon Sep 17 00:00:00 2001 +From 2f6ff5f479fc24f2c4cf7e3a30470a3aadb55607 Mon Sep 17 00:00:00 2001 From: Michael Forney <mforney@mforney.org> Date: Sat, 21 Jan 2023 17:18:50 -0800 Subject: [PATCH] Avoid conflict with C23 bool keyword @@ -8,10 +8,10 @@ Subject: [PATCH] Avoid conflict with C23 bool keyword 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/zed/agents/fmd_api.h b/cmd/zed/agents/fmd_api.h -index 4f06fb244..45c1f2ce2 100644 +index b940d0d39..7c485a9c9 100644 --- a/cmd/zed/agents/fmd_api.h +++ b/cmd/zed/agents/fmd_api.h -@@ -109,7 +109,7 @@ typedef struct fmd_stat { +@@ -105,7 +105,7 @@ typedef struct fmd_stat { uint_t fmds_type; /* statistic type (see above) */ char fmds_desc[64]; /* statistic description */ union { diff --git a/pkg/zfs/patch/0008-Remove-stray-at-top-level.patch b/pkg/zfs/patch/0007-Remove-stray-at-top-level.patch index 87ed8de0..f838f845 100644 --- a/pkg/zfs/patch/0008-Remove-stray-at-top-level.patch +++ b/pkg/zfs/patch/0007-Remove-stray-at-top-level.patch @@ -1,28 +1,23 @@ -From 54212b1aebdb3c5ffa7904eed7b9a09490aca1e1 Mon Sep 17 00:00:00 2001 +From b40890a5c47a69abfe96490b053f71be5ab09166 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 --- - module/avl/avl.c | 46 +++---- - module/nvpair/nvpair.c | 240 ++++++++++++++++----------------- + module/avl/avl.c | 36 ++--- + module/nvpair/nvpair.c | 232 ++++++++++++++++----------------- module/zcommon/zfs_namecheck.c | 20 +-- - module/zcommon/zfs_prop.c | 50 +++---- - 4 files changed, 178 insertions(+), 178 deletions(-) + module/zcommon/zfs_prop.c | 42 +++--- + 4 files changed, 165 insertions(+), 165 deletions(-) diff --git a/module/avl/avl.c b/module/avl/avl.c -index f761a8ae7..18dbe1b99 100644 +index 9b74531fa..283c8e297 100644 --- a/module/avl/avl.c +++ b/module/avl/avl.c -@@ -1052,26 +1052,26 @@ module_init(avl_init); - module_exit(avl_fini); - #endif +@@ -1032,21 +1032,21 @@ done: + return (AVL_NODE2DATA(node, off)); + } --ZFS_MODULE_DESCRIPTION("Generic AVL tree implementation"); --ZFS_MODULE_AUTHOR(ZFS_META_AUTHOR); --ZFS_MODULE_LICENSE(ZFS_META_LICENSE); --ZFS_MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); -- -EXPORT_SYMBOL(avl_create); -EXPORT_SYMBOL(avl_find); -EXPORT_SYMBOL(avl_insert); @@ -41,11 +36,6 @@ index f761a8ae7..18dbe1b99 100644 -EXPORT_SYMBOL(avl_update_lt); -EXPORT_SYMBOL(avl_update_gt); -EXPORT_SYMBOL(avl_update); -+ZFS_MODULE_DESCRIPTION("Generic AVL tree implementation") -+ZFS_MODULE_AUTHOR(ZFS_META_AUTHOR) -+ZFS_MODULE_LICENSE(ZFS_META_LICENSE) -+ZFS_MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE) -+ +EXPORT_SYMBOL(avl_create) +EXPORT_SYMBOL(avl_find) +EXPORT_SYMBOL(avl_insert) @@ -65,10 +55,10 @@ index f761a8ae7..18dbe1b99 100644 +EXPORT_SYMBOL(avl_update_gt) +EXPORT_SYMBOL(avl_update) diff --git a/module/nvpair/nvpair.c b/module/nvpair/nvpair.c -index 9834dedd8..6dfebb0ec 100644 +index d9449e47e..5626e2025 100644 --- a/module/nvpair/nvpair.c +++ b/module/nvpair/nvpair.c -@@ -3256,13 +3256,13 @@ nvs_xdr_nvp_##type(XDR *xdrs, void *ptr, ...) \ +@@ -3281,13 +3281,13 @@ nvs_xdr_nvp_##type(XDR *xdrs, void *ptr, ...) \ #endif /* BEGIN CSTYLED */ @@ -89,18 +79,9 @@ index 9834dedd8..6dfebb0ec 100644 /* END CSTYLED */ /* -@@ -3672,121 +3672,121 @@ module_init(nvpair_init); - module_exit(nvpair_fini); - #endif - --ZFS_MODULE_DESCRIPTION("Generic name/value pair implementation"); --ZFS_MODULE_AUTHOR(ZFS_META_AUTHOR); --ZFS_MODULE_LICENSE(ZFS_META_LICENSE); --ZFS_MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); -+ZFS_MODULE_DESCRIPTION("Generic name/value pair implementation") -+ZFS_MODULE_AUTHOR(ZFS_META_AUTHOR) -+ZFS_MODULE_LICENSE(ZFS_META_LICENSE) -+ZFS_MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE) +@@ -3681,116 +3681,116 @@ nvs_xdr(nvstream_t *nvs, nvlist_t *nvl, char *buf, size_t *buflen) + return (err); + } -EXPORT_SYMBOL(nv_alloc_init); -EXPORT_SYMBOL(nv_alloc_reset); @@ -325,7 +306,7 @@ index 9834dedd8..6dfebb0ec 100644 +EXPORT_SYMBOL(nvpair_value_nvlist_array) +EXPORT_SYMBOL(nvpair_value_hrtime) diff --git a/module/zcommon/zfs_namecheck.c b/module/zcommon/zfs_namecheck.c -index 7ecce451b..5f6b8a3b9 100644 +index 273b219a9..41099c7f0 100644 --- a/module/zcommon/zfs_namecheck.c +++ b/module/zcommon/zfs_namecheck.c @@ -453,15 +453,15 @@ pool_namecheck(const char *pool, namecheck_err_t *why, char *what) @@ -355,22 +336,12 @@ index 7ecce451b..5f6b8a3b9 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 b4e8fcf1f..9de54aa44 100644 +index 3db6fd13f..13c63a36c 100644 --- a/module/zcommon/zfs_prop.c +++ b/module/zcommon/zfs_prop.c -@@ -1054,32 +1054,32 @@ module_exit(zcommon_fini); - +@@ -1076,26 +1076,26 @@ module_exit(zcommon_fini); #endif --ZFS_MODULE_DESCRIPTION("Generic ZFS support"); --ZFS_MODULE_AUTHOR(ZFS_META_AUTHOR); --ZFS_MODULE_LICENSE(ZFS_META_LICENSE); --ZFS_MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); -+ZFS_MODULE_DESCRIPTION("Generic ZFS support") -+ZFS_MODULE_AUTHOR(ZFS_META_AUTHOR) -+ZFS_MODULE_LICENSE(ZFS_META_LICENSE) -+ZFS_MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE) - /* zfs dataset property functions */ -EXPORT_SYMBOL(zfs_userquota_prop_prefixes); -EXPORT_SYMBOL(zfs_prop_init); diff --git a/pkg/zfs/patch/0009-Avoid-use-of-long-double-function.patch b/pkg/zfs/patch/0008-Avoid-use-of-long-double-function.patch index ea4ca5a9..ea4ca5a9 100644 --- a/pkg/zfs/patch/0009-Avoid-use-of-long-double-function.patch +++ b/pkg/zfs/patch/0008-Avoid-use-of-long-double-function.patch diff --git a/pkg/zfs/patch/0010-Avoid-unnecessary-VLA.patch b/pkg/zfs/patch/0009-Avoid-unnecessary-VLA.patch index 13a902da..d90e4c81 100644 --- a/pkg/zfs/patch/0010-Avoid-unnecessary-VLA.patch +++ b/pkg/zfs/patch/0009-Avoid-unnecessary-VLA.patch @@ -1,4 +1,4 @@ -From 2218ade9b12bc42f61d96a4613328a6f627805a1 Mon Sep 17 00:00:00 2001 +From fac76bb5a8d1b03db9aa68c3bd72999ce76b8ca5 Mon Sep 17 00:00:00 2001 From: Michael Forney <mforney@mforney.org> Date: Sat, 21 Jan 2023 17:41:15 -0800 Subject: [PATCH] Avoid unnecessary VLA @@ -8,12 +8,12 @@ Subject: [PATCH] Avoid unnecessary VLA 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/cmd/zpool/zpool_vdev.c b/cmd/zpool/zpool_vdev.c -index 3d83da641..521086366 100644 +index fbd4b81df..a45ab7af5 100644 --- a/cmd/zpool/zpool_vdev.c +++ b/cmd/zpool/zpool_vdev.c -@@ -891,8 +891,7 @@ check_replication(nvlist_t *config, nvlist_t *newroot) +@@ -910,8 +910,7 @@ check_replication(nvlist_t *config, nvlist_t *newroot) static int - zero_label(char *path) + zero_label(const char *path) { - const int size = 4096; - char buf[size]; @@ -21,7 +21,7 @@ index 3d83da641..521086366 100644 int err, fd; if ((fd = open(path, O_WRONLY|O_EXCL)) < 0) { -@@ -901,20 +900,20 @@ zero_label(char *path) +@@ -920,20 +919,20 @@ zero_label(const char *path) return (-1); } diff --git a/pkg/zfs/patch/0011-Avoid-arithmetic-on-void-pointer.patch b/pkg/zfs/patch/0010-Avoid-arithmetic-on-void-pointer.patch index 662c4b11..c6309370 100644 --- a/pkg/zfs/patch/0011-Avoid-arithmetic-on-void-pointer.patch +++ b/pkg/zfs/patch/0010-Avoid-arithmetic-on-void-pointer.patch @@ -1,4 +1,4 @@ -From 8a2689c718e4fdf96a5b73e4095866ddf4826135 Mon Sep 17 00:00:00 2001 +From dad6fa581122eaf3eb5c65839a3fd294887ba139 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 7a9de4a43..2faee46fe 100644 +index 619ddef02..a99865b2a 100644 --- a/module/zcommon/zfs_fletcher.c +++ b/module/zcommon/zfs_fletcher.c -@@ -569,7 +569,7 @@ fletcher_4_incremental_impl(boolean_t native, const void *buf, uint64_t size, +@@ -581,7 +581,7 @@ fletcher_4_incremental_impl(boolean_t native, const void *buf, uint64_t size, fletcher_4_incremental_combine(zcp, len, &nzc); size -= len; diff --git a/pkg/zfs/patch/0011-zstream-Disable-recompress-and-decompress.patch b/pkg/zfs/patch/0011-zstream-Disable-recompress-and-decompress.patch new file mode 100644 index 00000000..0d2ed285 --- /dev/null +++ b/pkg/zfs/patch/0011-zstream-Disable-recompress-and-decompress.patch @@ -0,0 +1,39 @@ +From 35672849425882c7a8c24a085c4613beb62d1996 Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Fri, 22 Mar 2024 19:18:59 -0700 +Subject: [PATCH] zstream: Disable recompress and decompress + +These require building a lot more sources, so disable them for now. +--- + cmd/zstream/zstream.c | 8 -------- + 1 file changed, 8 deletions(-) + +diff --git a/cmd/zstream/zstream.c b/cmd/zstream/zstream.c +index b1509c1f2..a228f45fa 100644 +--- a/cmd/zstream/zstream.c ++++ b/cmd/zstream/zstream.c +@@ -40,10 +40,6 @@ zstream_usage(void) + "\tzstream dump [-vCd] FILE\n" + "\t... | zstream dump [-vCd]\n" + "\n" +- "\tzstream decompress [-v] [OBJECT,OFFSET[,TYPE]] ...\n" +- "\n" +- "\tzstream recompress [ -l level] TYPE\n" +- "\n" + "\tzstream token resume_token\n" + "\n" + "\tzstream redup [-v] FILE | ...\n"); +@@ -65,10 +61,6 @@ main(int argc, char *argv[]) + + if (strcmp(subcommand, "dump") == 0) { + return (zstream_do_dump(argc - 1, argv + 1)); +- } else if (strcmp(subcommand, "decompress") == 0) { +- return (zstream_do_decompress(argc - 1, argv + 1)); +- } else if (strcmp(subcommand, "recompress") == 0) { +- return (zstream_do_recompress(argc - 1, argv + 1)); + } else if (strcmp(subcommand, "token") == 0) { + return (zstream_do_token(argc - 1, argv + 1)); + } else if (strcmp(subcommand, "redup") == 0) { +-- +2.37.3 + |
