commit: 3ef96f81af16fa887830d544462ab218d0933016
parent ac59f6699bf1e050f2cbdfac9d9ee9c1b1dbd5d5
Author: Michael Forney <mforney@mforney.org>
Date: Wed, 29 Jan 2025 02:21:26 -0800
zfs: Update to 2.3.0
Diffstat:
14 files changed, 505 insertions(+), 329 deletions(-)
diff --git a/pkg/zfs/.gitignore b/pkg/zfs/.gitignore
@@ -1,2 +1,2 @@
/src
-/zfs-2.2.3.tar.gz
+/zfs-2.3.0.tar.gz
diff --git a/pkg/zfs/bitutil.c b/pkg/zfs/bitutil.c
@@ -0,0 +1,54 @@
+#include <stdint.h>
+
+/*
+ * 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);
+
+ static const char debruijn[64] = {
+ 1, 36, 2, 57, 37, 22, 3, 61,
+ 58, 50, 38, 32, 23, 17, 4, 62,
+ 55, 59, 30, 53, 51, 45, 39, 33,
+ 47, 27, 24, 18, 41, 12, 5, 63,
+ 35, 56, 21, 60, 49, 31, 16, 54,
+ 29, 52, 44, 46, 26, 40, 11, 34,
+ 20, 48, 15, 28, 43, 25, 10, 19,
+ 14, 42, 9, 13, 8, 7, 6, 64
+ };
+ i |= i >> 1;
+ i |= i >> 2;
+ i |= i >> 4;
+ i |= i >> 8;
+ i |= i >> 16;
+ i |= i >> 32;
+ return (debruijn[(i * 0x03F79C6D30BACA89) >> 58 & 0x3F]);
+}
+
+/*
+ * 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);
+
+ static const char debruijn[64] = {
+ 1, 2, 37, 3, 58, 38, 23, 4,
+ 62, 59, 51, 39, 33, 24, 18, 5,
+ 63, 56, 60, 31, 54, 52, 46, 40,
+ 34, 48, 28, 25, 19, 42, 13, 6,
+ 64, 36, 57, 22, 61, 50, 32, 17,
+ 55, 30, 53, 45, 47, 27, 41, 12,
+ 35, 21, 49, 16, 29, 44, 26, 11,
+ 20, 15, 43, 10, 14, 9, 8, 7,
+ };
+ i &= -i;
+ return (debruijn[(i * 0x03F79C6D30BACA89) >> 58 & 0x3F]);
+}
diff --git a/pkg/zfs/config.h b/pkg/zfs/config.h
@@ -1,15 +1,7 @@
/* #undef ENABLE_NLS */
-/* #undef HAVE_1ARG_BIO_END_IO_T */
+/* #undef HAVE_1ARG_ASSIGN_STR */
/* #undef HAVE_1ARG_LOOKUP_BDEV */
-/* #undef HAVE_1ARG_SUBMIT_BIO */
-/* #undef HAVE_2ARGS_BDI_SETUP_AND_REGISTER */
-/* #undef HAVE_2ARGS_VFS_GETATTR */
-/* #undef HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE */
-/* #undef HAVE_3ARGS_BDI_SETUP_AND_REGISTER */
-/* #undef HAVE_3ARGS_VFS_GETATTR */
-/* #undef HAVE_4ARGS_VFS_GETATTR */
/* #undef HAVE_ACCESS_OK_TYPE */
-/* #undef HAVE_ACL_REFCOUNT */
/* #undef HAVE_ADD_DISK_RET */
/* #undef HAVE_AES */
#define HAVE_AIO_H 1
@@ -24,115 +16,85 @@
/* #undef HAVE_AVX512PF */
/* #undef HAVE_AVX512VBMI */
/* #undef HAVE_AVX512VL */
+/* #undef HAVE_BACKTRACE */
/* #undef HAVE_BDEVNAME */
/* #undef HAVE_BDEV_CHECK_MEDIA_CHANGE */
+/* #undef HAVE_BDEV_FILE_OPEN_BY_PATH */
/* #undef HAVE_BDEV_IO_ACCT_63 */
/* #undef HAVE_BDEV_IO_ACCT_OLD */
/* #undef HAVE_BDEV_KOBJ */
/* #undef HAVE_BDEV_MAX_DISCARD_SECTORS */
/* #undef HAVE_BDEV_MAX_SECURE_ERASE_SECTORS */
+/* #undef HAVE_BDEV_NR_BYTES */
/* #undef HAVE_BDEV_OPEN_BY_PATH */
/* #undef HAVE_BDEV_RELEASE */
/* #undef HAVE_BDEV_SUBMIT_BIO_RETURNS_VOID */
/* #undef HAVE_BDEV_WHOLE */
/* #undef HAVE_BIO_ALLOC_4ARG */
/* #undef HAVE_BIO_BDEV_DISK */
-/* #undef HAVE_BIO_BI_OPF */
-/* #undef HAVE_BIO_BI_STATUS */
-/* #undef HAVE_BIO_BVEC_ITER */
/* #undef HAVE_BIO_IO_ACCT */
/* #undef HAVE_BIO_MAX_SEGS */
-/* #undef HAVE_BIO_SET_DEV */
/* #undef HAVE_BIO_SET_DEV_GPL_ONLY */
/* #undef HAVE_BIO_SET_DEV_MACRO */
/* #undef HAVE_BIO_SET_OP_ATTRS */
/* #undef HAVE_BLKDEV_GET_BY_PATH_4ARG */
/* #undef HAVE_BLKDEV_GET_ERESTARTSYS */
-/* #undef HAVE_BLKDEV_ISSUE_DISCARD */
-/* #undef HAVE_BLKDEV_ISSUE_DISCARD_ASYNC */
+/* #undef HAVE_BLKDEV_ISSUE_DISCARD_ASYNC_FLAGS */
+/* #undef HAVE_BLKDEV_ISSUE_DISCARD_ASYNC_NOFLAGS */
+/* #undef HAVE_BLKDEV_ISSUE_DISCARD_FLAGS */
+/* #undef HAVE_BLKDEV_ISSUE_DISCARD_NOFLAGS */
/* #undef HAVE_BLKDEV_ISSUE_SECURE_ERASE */
+/* #undef HAVE_BLKDEV_PUT */
/* #undef HAVE_BLKDEV_PUT_HOLDER */
+/* #undef HAVE_BLKDEV_QUEUE_LIMITS_FEATURES */
/* #undef HAVE_BLKDEV_REREAD_PART */
/* #undef HAVE_BLKG_TRYGET */
/* #undef HAVE_BLKG_TRYGET_GPL_ONLY */
/* #undef HAVE_BLK_ALLOC_DISK */
+/* #undef HAVE_BLK_ALLOC_DISK_2ARG */
/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN */
/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN_RH */
/* #undef HAVE_BLK_CLEANUP_DISK */
/* #undef HAVE_BLK_MODE_T */
-/* #undef HAVE_BLK_MQ */
+/* #undef HAVE_BLK_MQ_RQ_HCTX */
/* #undef HAVE_BLK_QUEUE_BDI_DYNAMIC */
/* #undef HAVE_BLK_QUEUE_DISCARD */
-/* #undef HAVE_BLK_QUEUE_FLAG_CLEAR */
-/* #undef HAVE_BLK_QUEUE_FLAG_SET */
-/* #undef HAVE_BLK_QUEUE_FLUSH */
-/* #undef HAVE_BLK_QUEUE_FLUSH_GPL_ONLY */
-/* #undef HAVE_BLK_QUEUE_SECDISCARD */
+/* #undef HAVE_BLK_QUEUE_DISK_BDI */
/* #undef HAVE_BLK_QUEUE_SECURE_ERASE */
/* #undef HAVE_BLK_QUEUE_UPDATE_READAHEAD */
-/* #undef HAVE_BLK_QUEUE_WRITE_CACHE */
-/* #undef HAVE_BLK_QUEUE_WRITE_CACHE_GPL_ONLY */
/* #undef HAVE_BLK_STS_RESV_CONFLICT */
/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG */
/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK */
-/* #undef HAVE_CFLOCALECOPYCURRENT */
-/* #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES */
-/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */
/* #undef HAVE_CHECK_DISK_CHANGE */
-/* #undef HAVE_CLEAR_INODE */
-/* #undef HAVE_CONST_DENTRY_OPERATIONS */
-/* #undef HAVE_COPY_FROM_ITER */
/* #undef HAVE_COPY_SPLICE_READ */
-/* #undef HAVE_COPY_TO_ITER */
/* #undef HAVE_CPU_HAS_FEATURE_GPL_ONLY */
-/* #undef HAVE_CPU_HOTPLUG */
-/* #undef HAVE_CURRENT_TIME */
/* #undef HAVE_DCGETTEXT */
/* #undef HAVE_DECLARE_EVENT_CLASS */
-/* #undef HAVE_DENTRY_D_U_ALIASES */
+/* #undef HAVE_DEQUEUE_SIGNAL_3ARG_TYPE */
/* #undef HAVE_DEQUEUE_SIGNAL_4ARG */
/* #undef HAVE_DEVT_LOOKUP_BDEV */
-/* #undef HAVE_DIRTY_INODE_WITH_FLAGS */
/* #undef HAVE_DISK_CHECK_MEDIA_CHANGE */
/* #undef HAVE_DISK_IO_ACCT */
/* #undef HAVE_DISK_UPDATE_READAHEAD */
#define HAVE_DLFCN_H 1
-/* #undef HAVE_D_MAKE_ROOT */
-/* #undef HAVE_D_PRUNE_ALIASES */
-/* #undef HAVE_D_REVALIDATE_NAMEIDATA */
-/* #undef HAVE_ENCODE_FH_WITH_INODE */
-/* #undef HAVE_EVICT_INODE */
-/* #undef HAVE_FALLOC_FL_ZERO_RANGE */
+#define HAVE_EXECVPE 1
/* #undef HAVE_FAULT_IN_IOV_ITER_READABLE */
-/* #undef HAVE_FILEMAP_RANGE_HAS_PAGE */
-/* #undef HAVE_FILE_AIO_FSYNC */
-/* #undef HAVE_FILE_DENTRY */
-/* #undef HAVE_FILE_FADVISE */
-/* #undef HAVE_FILE_INODE */
+/* #undef HAVE_FILE_F_VERSION */
/* #undef HAVE_FLUSH_DCACHE_PAGE_GPL_ONLY */
-/* #undef HAVE_FOLLOW_LINK_COOKIE */
-/* #undef HAVE_FOLLOW_LINK_NAMEIDATA */
#define HAVE_FORMAT_OVERFLOW 1
/* #undef HAVE_FSYNC_BDEV */
-/* #undef HAVE_FSYNC_RANGE */
-/* #undef HAVE_FSYNC_WITHOUT_DENTRY */
/* #undef HAVE_GENERIC_FADVISE */
/* #undef HAVE_GENERIC_FILLATTR_IDMAP */
/* #undef HAVE_GENERIC_FILLATTR_IDMAP_REQMASK */
/* #undef HAVE_GENERIC_FILLATTR_USERNS */
-/* #undef HAVE_GENERIC_IO_ACCT_3ARG */
/* #undef HAVE_GENERIC_IO_ACCT_4ARG */
-/* #undef HAVE_GENERIC_READLINK */
-/* #undef HAVE_GENERIC_SETXATTR */
-/* #undef HAVE_GENERIC_WRITE_CHECKS_KIOCB */
+/* #undef HAVE_GENHD_FL_EXT_DEVT */
+/* #undef HAVE_GENHD_FL_NO_PART */
/* #undef HAVE_GETTEXT */
+#define HAVE_GETTID 1
/* #undef HAVE_GET_ACL */
/* #undef HAVE_GET_ACL_RCU */
/* #undef HAVE_GET_INODE_ACL */
-/* #undef HAVE_GET_LINK_COOKIE */
-/* #undef HAVE_GET_LINK_DELAYED */
-/* #undef HAVE_GROUP_INFO_GID */
-/* #undef HAVE_HAS_CAPABILITY */
/* #undef HAVE_IATTR_VFSID */
/* #undef HAVE_ICONV */
/* #undef HAVE_IDMAP_IOPS_GETATTR */
@@ -144,19 +106,14 @@
/* #undef HAVE_INODE_GET_ATIME */
/* #undef HAVE_INODE_GET_CTIME */
/* #undef HAVE_INODE_GET_MTIME */
-/* #undef HAVE_INODE_LOCK_SHARED */
/* #undef HAVE_INODE_OWNER_OR_CAPABLE */
/* #undef HAVE_INODE_OWNER_OR_CAPABLE_IDMAP */
/* #undef HAVE_INODE_OWNER_OR_CAPABLE_USERNS */
/* #undef HAVE_INODE_SET_ATIME_TO_TS */
/* #undef HAVE_INODE_SET_CTIME_TO_TS */
-/* #undef HAVE_INODE_SET_FLAGS */
-/* #undef HAVE_INODE_SET_IVERSION */
/* #undef HAVE_INODE_SET_MTIME_TO_TS */
-/* #undef HAVE_INODE_TIMESPEC64_TIMES */
/* #undef HAVE_INODE_TIMESTAMP_TRUNCATE */
#define HAVE_INTTYPES_H 1
-/* #undef HAVE_IN_COMPAT_SYSCALL */
/* #undef HAVE_IOPS_CREATE_IDMAP */
/* #undef HAVE_IOPS_CREATE_USERNS */
/* #undef HAVE_IOPS_MKDIR_IDMAP */
@@ -167,106 +124,65 @@
/* #undef HAVE_IOPS_PERMISSION_USERNS */
/* #undef HAVE_IOPS_RENAME_IDMAP */
/* #undef HAVE_IOPS_RENAME_USERNS */
-/* #undef HAVE_IOPS_SETATTR */
/* #undef HAVE_IOPS_SYMLINK_IDMAP */
/* #undef HAVE_IOPS_SYMLINK_USERNS */
-/* #undef HAVE_IOV_ITER_ADVANCE */
-/* #undef HAVE_IOV_ITER_COUNT */
-/* #undef HAVE_IOV_ITER_FAULT_IN_READABLE */
-/* #undef HAVE_IOV_ITER_REVERT */
/* #undef HAVE_IOV_ITER_TYPE */
-/* #undef HAVE_IOV_ITER_TYPES */
-/* #undef HAVE_IO_SCHEDULE_TIMEOUT */
#define HAVE_ISSETUGID 1
/* #undef HAVE_ITER_IOV */
+/* #undef HAVE_ITER_IS_UBUF */
/* #undef HAVE_KERNEL_FPU */
/* #undef HAVE_KERNEL_FPU_API_HEADER */
/* #undef HAVE_KERNEL_FPU_INTERNAL */
/* #undef HAVE_KERNEL_FPU_INTERNAL_HEADER */
-/* #undef HAVE_KERNEL_GET_ACL_HANDLE_CACHE */
#define HAVE_KERNEL_INFINITE_RECURSION 1
+/* #undef HAVE_KERNEL_INTPTR_T */
/* #undef HAVE_KERNEL_NEON */
/* #undef HAVE_KERNEL_OBJTOOL */
/* #undef HAVE_KERNEL_OBJTOOL_HEADER */
-/* #undef HAVE_KERNEL_READ_PPOS */
/* #undef HAVE_KERNEL_STRLCPY */
-/* #undef HAVE_KERNEL_STRSCPY */
-/* #undef HAVE_KERNEL_TIMER_FUNCTION_TIMER_LIST */
-/* #undef HAVE_KERNEL_TIMER_LIST_FLAGS */
-/* #undef HAVE_KERNEL_TIMER_SETUP */
-/* #undef HAVE_KERNEL_WRITE_PPOS */
-/* #undef HAVE_KMEM_CACHE_CREATE_USERCOPY */
-/* #undef HAVE_KSTRTOUL */
-/* #undef HAVE_KTIME_GET_COARSE_REAL_TS64 */
-/* #undef HAVE_KTIME_GET_RAW_TS64 */
-/* #undef HAVE_KVMALLOC */
+/* #undef HAVE_KMAP_LOCAL_PAGE */
/* #undef HAVE_LIBAIO */
#define HAVE_LIBBLKID 1
-#define HAVE_LIBCRYPTO 1
+/* #undef HAVE_LIBCRYPTO */
#define HAVE_LIBTIRPC 1
/* #undef HAVE_LIBUDEV */
+/* #undef HAVE_LIBUNWIND */
+/* #undef HAVE_LIBUNWIND_ELF */
#define HAVE_LIBUUID 1
-/* #undef HAVE_LINUX_BLK_CGROUP_HEADER */
-/* #undef HAVE_LSEEK_EXECUTE */
+/* #undef HAVE_LINUX_EXPERIMENTAL */
/* #undef HAVE_MAKEDEV_IN_MKDEV */
#define HAVE_MAKEDEV_IN_SYSMACROS 1
/* #undef HAVE_MAKE_REQUEST_FN_RET_QC */
-/* #undef HAVE_MAKE_REQUEST_FN_RET_VOID */
-/* #undef HAVE_MKDIR_UMODE_T */
#define HAVE_MLOCKALL 1
-/* #undef HAVE_MODE_LOOKUP_BDEV */
+/* #undef HAVE_MM_PAGE_FLAG_ERROR */
+/* #undef HAVE_MM_PAGE_MAPPING */
+/* #undef HAVE_MM_PAGE_SIZE */
#define HAVE_MOVBE 1
-/* #undef HAVE_NEW_SYNC_READ */
/* #undef HAVE_PAGEMAP_FOLIO_WAIT_BIT */
/* #undef HAVE_PART_TO_DEV */
/* #undef HAVE_PATH_IOPS_GETATTR */
#define HAVE_PCLMULQDQ 1
-/* #undef HAVE_PERCPU_COUNTER_ADD_BATCH */
-/* #undef HAVE_PERCPU_COUNTER_INIT_WITH_GFP */
-/* #undef HAVE_POSIX_ACL_CHMOD */
-/* #undef HAVE_POSIX_ACL_FROM_XATTR_USERNS */
-/* #undef HAVE_POSIX_ACL_RELEASE */
-/* #undef HAVE_POSIX_ACL_RELEASE_GPL_ONLY */
-/* #undef HAVE_POSIX_ACL_VALID_WITH_NS */
+/* #undef HAVE_PIN_USER_PAGES_UNLOCKED */
+/* #undef HAVE_PROC_HANDLER_CTL_TABLE_CONST */
/* #undef HAVE_PROC_OPS_STRUCT */
-/* #undef HAVE_PUT_LINK_COOKIE */
-/* #undef HAVE_PUT_LINK_DELAYED */
-/* #undef HAVE_PUT_LINK_NAMEIDATA */
/* #undef HAVE_PYTHON */
/* #undef HAVE_QAT */
/* #undef HAVE_RECLAIM_STATE_RECLAIMED */
/* #undef HAVE_REGISTER_SHRINKER_VARARG */
+/* #undef HAVE_REGISTER_SYSCTL_SZ */
/* #undef HAVE_REGISTER_SYSCTL_TABLE */
-/* #undef HAVE_RENAME2 */
-/* #undef HAVE_RENAME2_OPERATIONS_WRAPPER */
/* #undef HAVE_RENAME_WANTS_FLAGS */
-/* #undef HAVE_REQ_DISCARD */
-/* #undef HAVE_REQ_FLUSH */
-/* #undef HAVE_REQ_OP_DISCARD */
-/* #undef HAVE_REQ_OP_FLUSH */
-/* #undef HAVE_REQ_OP_SECURE_ERASE */
-/* #undef HAVE_REQ_PREFLUSH */
/* #undef HAVE_REVALIDATE_DISK */
/* #undef HAVE_REVALIDATE_DISK_SIZE */
-/* #undef HAVE_RWSEM_ACTIVITY */
-/* #undef HAVE_RWSEM_ATOMIC_LONG_COUNT */
-/* #undef HAVE_SCHED_SIGNAL_HEADER */
/* #undef HAVE_SECURITY_PAM_MODULES_H */
/* #undef HAVE_SETATTR_PREPARE_IDMAP */
/* #undef HAVE_SETATTR_PREPARE_NO_USERNS */
/* #undef HAVE_SETATTR_PREPARE_USERNS */
-/* #undef HAVE_SET_ACL */
/* #undef HAVE_SET_ACL_IDMAP_DENTRY */
/* #undef HAVE_SET_ACL_USERNS */
/* #undef HAVE_SET_ACL_USERNS_DENTRY_ARG2 */
-/* #undef HAVE_SET_CACHED_ACL_USABLE */
-/* #undef HAVE_SET_SPECIAL_STATE */
/* #undef HAVE_SHRINKER_REGISTER */
-/* #undef HAVE_SHRINK_CONTROL_STRUCT */
/* #undef HAVE_SIGINFO */
-/* #undef HAVE_SIGNAL_STOP */
-/* #undef HAVE_SINGLE_SHRINKER_CALLBACK */
-/* #undef HAVE_SPLIT_SHRINKER_CALLBACK */
/* #undef HAVE_SSE */
/* #undef HAVE_SSE2 */
/* #undef HAVE_SSE3 */
@@ -285,13 +201,10 @@
/* #undef HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS */
/* #undef HAVE_SUPER_BLOCK_S_SHRINK */
/* #undef HAVE_SUPER_BLOCK_S_SHRINK_PTR */
-/* #undef HAVE_SUPER_SETUP_BDI_NAME */
-/* #undef HAVE_SUPER_USER_NS */
/* #undef HAVE_SYNC_BLOCKDEV */
/* #undef HAVE_SYSFS_DEFAULT_GROUPS */
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TYPES_H 1
-/* #undef HAVE_TMPFILE */
/* #undef HAVE_TMPFILE_DENTRY */
/* #undef HAVE_TMPFILE_IDMAP */
/* #undef HAVE_TMPFILE_USERNS */
@@ -302,43 +215,20 @@
#define HAVE_UNISTD_H 1
/* #undef HAVE_USERNS_IOPS_GETATTR */
/* #undef HAVE_USERNS_IOPS_SETATTR */
-/* #undef HAVE_USER_NS_COMMON_INUM */
-/* #undef HAVE_VFSMOUNT_IOPS_GETATTR */
/* #undef HAVE_VFS_CLONE_FILE_RANGE */
-/* #undef HAVE_VFS_COPY_FILE_RANGE */
/* #undef HAVE_VFS_DEDUPE_FILE_RANGE */
-/* #undef HAVE_VFS_DIRECT_IO_IOVEC */
-/* #undef HAVE_VFS_DIRECT_IO_ITER */
-/* #undef HAVE_VFS_DIRECT_IO_ITER_OFFSET */
-/* #undef HAVE_VFS_DIRECT_IO_ITER_RW_OFFSET */
/* #undef HAVE_VFS_FILEMAP_DIRTY_FOLIO */
-/* #undef HAVE_VFS_FILE_OPERATIONS_EXTEND */
/* #undef HAVE_VFS_GENERIC_COPY_FILE_RANGE */
-/* #undef HAVE_VFS_IOV_ITER */
-/* #undef HAVE_VFS_ITERATE */
-/* #undef HAVE_VFS_ITERATE_SHARED */
-/* #undef HAVE_VFS_READDIR */
+/* #undef HAVE_VFS_MIGRATE_FOLIO */
/* #undef HAVE_VFS_READPAGES */
/* #undef HAVE_VFS_READ_FOLIO */
/* #undef HAVE_VFS_REMAP_FILE_RANGE */
-/* #undef HAVE_VFS_RW_ITERATE */
/* #undef HAVE_VFS_SET_PAGE_DIRTY_NOBUFFERS */
+/* #undef HAVE_VFS_SPLICE_COPY_FILE_RANGE */
/* #undef HAVE_VMALLOC_PAGE_KERNEL */
-/* #undef HAVE_WAIT_ON_BIT_ACTION */
-/* #undef HAVE_WAIT_QUEUE_ENTRY_T */
-/* #undef HAVE_WAIT_QUEUE_HEAD_ENTRY */
/* #undef HAVE_WRITEPAGE_T_FOLIO */
-/* #undef HAVE_XATTR_GET_DENTRY */
-/* #undef HAVE_XATTR_GET_DENTRY_INODE */
/* #undef HAVE_XATTR_GET_DENTRY_INODE_FLAGS */
-/* #undef HAVE_XATTR_GET_HANDLER */
-/* #undef HAVE_XATTR_HANDLER_NAME */
-/* #undef HAVE_XATTR_LIST_DENTRY */
-/* #undef HAVE_XATTR_LIST_HANDLER */
-/* #undef HAVE_XATTR_LIST_SIMPLE */
-/* #undef HAVE_XATTR_SET_DENTRY */
/* #undef HAVE_XATTR_SET_DENTRY_INODE */
-/* #undef HAVE_XATTR_SET_HANDLER */
/* #undef HAVE_XATTR_SET_IDMAP */
/* #undef HAVE_XATTR_SET_USERNS */
#define HAVE_XSAVE 1
@@ -346,7 +236,6 @@
#define HAVE_XSAVES 1
/* #undef HAVE_ZERO_PAGE_GPL_ONLY */
#define HAVE_ZLIB 1
-/* #undef HAVE___POSIX_ACL_CHMOD */
/* #undef KERNEL_EXPORTS_X86_FPU */
#define LIBFETCH_DYNAMIC 0
#define LIBFETCH_IS_FETCH 0
@@ -354,48 +243,27 @@
#define LIBFETCH_SONAME ""
#define LT_OBJDIR ".libs/"
/* #undef MAKE_REQUEST_FN_RET */
-#define PACKAGE "zfs"
-#define PACKAGE_BUGREPORT ""
-#define PACKAGE_NAME "zfs"
-#define PACKAGE_STRING "zfs 2.2.3"
-#define PACKAGE_TARNAME "zfs"
-#define PACKAGE_URL ""
-#define PACKAGE_VERSION "2.2.3"
-/* #undef SHRINK_CONTROL_HAS_NID */
/* #undef SPL_KTHREAD_COMPLETE_AND_EXIT */
#define SPL_META_ALIAS ZFS_META_ALIAS
#define SPL_META_RELEASE ZFS_META_RELEASE
#define SPL_META_VERSION ZFS_META_VERSION
/* #undef SPL_PDE_DATA */
-#define STDC_HEADERS 1
/* #undef SYSTEM_FREEBSD */
#define SYSTEM_LINUX 1
-#define VERSION "2.2.3"
/* #undef ZFS_DEBUG */
/* #undef ZFS_DEVICE_MINOR */
-/* #undef ZFS_ENUM_NODE_STAT_ITEM_NR_FILE_PAGES */
-/* #undef ZFS_ENUM_NODE_STAT_ITEM_NR_INACTIVE_ANON */
-/* #undef ZFS_ENUM_NODE_STAT_ITEM_NR_INACTIVE_FILE */
-/* #undef ZFS_ENUM_ZONE_STAT_ITEM_NR_FILE_PAGES */
-/* #undef ZFS_ENUM_ZONE_STAT_ITEM_NR_INACTIVE_ANON */
-/* #undef ZFS_ENUM_ZONE_STAT_ITEM_NR_INACTIVE_FILE */
-/* #undef ZFS_GENHD_FL_EXT_DEVT */
-/* #undef ZFS_GENHD_FL_NO_PART */
-/* #undef ZFS_GLOBAL_NODE_PAGE_STATE */
-/* #undef ZFS_GLOBAL_ZONE_PAGE_STATE */
-/* #undef ZFS_IS_GPL_COMPATIBLE */
-#define ZFS_META_ALIAS "zfs-2.2.3-1"
+#define ZFS_META_ALIAS "zfs-2.3.0-1"
#define ZFS_META_AUTHOR "OpenZFS"
/* #undef ZFS_META_DATA */
-#define ZFS_META_KVER_MAX "6.7"
-#define ZFS_META_KVER_MIN "3.10"
+#define ZFS_META_KVER_MAX "6.12"
+#define ZFS_META_KVER_MIN "4.18"
#define ZFS_META_LICENSE "CDDL"
/* #undef ZFS_META_LT_AGE */
/* #undef ZFS_META_LT_CURRENT */
/* #undef ZFS_META_LT_REVISION */
#define ZFS_META_NAME "zfs"
#define ZFS_META_RELEASE "1"
-#define ZFS_META_VERSION "2.2.3"
+#define ZFS_META_VERSION "2.3.0"
/* #undef ZFS_PERCPU_REF_COUNT_IN_DATA */
#define ZFSEXECDIR "/libexec/zfs"
diff --git a/pkg/zfs/gen.lua b/pkg/zfs/gen.lua
@@ -7,8 +7,9 @@ cflags{
'-I $srcdir/module/icp/include',
'-I $srcdir/lib/libspl/include',
'-I $srcdir/lib/libspl/include/os/linux',
- '-I $srcdir/lib/libzutil',
'-I $srcdir/lib/libshare',
+ '-I $srcdir/lib/libzpool/include',
+ '-I $srcdir/lib/libzutil',
'-I $srcdir/cmd/zpool',
'-isystem $builddir/pkg/bearssl/include',
'-isystem $builddir/pkg/libtirpc/include',
@@ -38,6 +39,7 @@ lib('libshare.a', [[
lib('libspl.a', [[
lib/libspl/(
assert.c
+ backtrace.c
atomic.c
getexecname.c
list.c
@@ -115,6 +117,7 @@ lib('libzfs_core.a', [[
libzutil.a.d
]])
+build('cc', '$outdir/bitutil.c.o', '$dir/bitutil.c')
lib('libzfs.a', [[
lib/libzfs/(
libzfs_changelist.c
@@ -145,10 +148,12 @@ lib('libzfs.a', [[
zfs_fletcher_superscalar4.c
zfs_namecheck.c
zfs_prop.c
+ zfs_valstr.c
zpool_prop.c
zprop_common.c
)
)
+ bitutil.c.o
libnvpair.a.d
libuutil.a.d
libshare.a.d
diff --git 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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
+
diff --git a/pkg/zfs/sha256 b/pkg/zfs/sha256
@@ -1 +1 @@
-30a512f34ec5c841b8b2b32cc9c1a03fd49391b26c9164d3fb30573fb5d81ac3 zfs-2.2.3.tar.gz
+6e8787eab55f24c6b9c317f3fe9b0da9a665eb34c31df88ff368d9a92e9356a6 zfs-2.3.0.tar.gz
diff --git a/pkg/zfs/url b/pkg/zfs/url
@@ -1 +1 @@
-url = "https://github.com/openzfs/zfs/releases/download/zfs-2.2.3/zfs-2.2.3.tar.gz"
+url = "https://github.com/openzfs/zfs/releases/download/zfs-2.3.0/zfs-2.3.0.tar.gz"
diff --git a/pkg/zfs/ver b/pkg/zfs/ver
@@ -1 +1 @@
-2.2.3 r0
+2.3.0 r0