The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=53a2e2635ab2d17bed1de7b4e0d782dd23ceb6ea
commit 53a2e2635ab2d17bed1de7b4e0d782dd23ceb6ea Merge: 7acae33bc950 a9410ccbd9f0 Author: Martin Matuska <m...@freebsd.org> AuthorDate: 2025-08-20 08:57:58 +0000 Commit: Martin Matuska <m...@freebsd.org> CommitDate: 2025-08-20 09:00:29 +0000 zfs: merge openzfs/zfs@a9410ccbd Notable upstream pull request merges: #17058 -multiple Port AVX2 implementation of aes-gcm from BoringSSL #17602 077269bfe Fix Assert in dbuf_undirty, which triggers during usage zap shrink #17613 d15143207 ZIL: Make allocations more flexible #17618 5061f959d Retire zfs_autoimport_disable kmod option #17166 d3c1d27af zdb: better handling for corrupt block pointers #17616 1ccae433e Allow vmem_alloc backed multilists #17619 e0e60d319 Better pack struct zio_prop #17620 152e34822 Silence zstd large allocation warning #17622 -multiple ZIL: restore some things lost in "ZIL-crash" review #17625 -multiple zvol: cleanup & fixup zvol destruction sequence and locking #17631 885d929cf Fix missed assertion update in physical rewrite patch #17642 a9410ccbd Make zpool_find_config() report errors #17647 30a915efe zfs-send.8: mention combination of -c/-e flags and zstd_compress feature #17649 2c877e845 FreeBSD: Set st_rdev to NODEV, not 0, when not a device (already backported) Obtained from: OpenZFS OpenZFS commit: a9410ccbd9f0375a7eeb6bc35eb55efe9c21493e sys/conf/kern.pre.mk | 3 +- .../.github/workflows/scripts/qemu-2-start.sh | 2 +- .../.github/workflows/scripts/qemu-4-build-vm.sh | 23 +- .../.github/workflows/zfs-qemu-packages.yml | 13 +- sys/contrib/openzfs/.mailmap | 4 + sys/contrib/openzfs/AUTHORS | 13 + sys/contrib/openzfs/META | 2 +- sys/contrib/openzfs/cmd/zdb/zdb.c | 61 +- sys/contrib/openzfs/config/kernel-mkdir.m4 | 2 + sys/contrib/openzfs/config/toolchain-simd.m4 | 44 + sys/contrib/openzfs/contrib/debian/control | 8 +- .../openzfs/contrib/icp/gcm-simd/boringssl/LICENSE | 253 ++++ .../openzfs/contrib/icp/gcm-simd/boringssl/README | 11 + .../gcm-simd/boringssl/aes-gcm-avx2-x86_64-linux.S | 1328 ++++++++++++++++++++ sys/contrib/openzfs/contrib/initramfs/scripts/zfs | 3 +- .../include/os/linux/kernel/linux/simd_x86.h | 26 + .../openzfs/include/os/linux/zfs/sys/trace_zil.h | 6 +- sys/contrib/openzfs/include/sys/spa.h | 2 - sys/contrib/openzfs/include/sys/zil_impl.h | 18 +- sys/contrib/openzfs/include/sys/zio.h | 29 +- sys/contrib/openzfs/include/sys/zvol_impl.h | 5 +- sys/contrib/openzfs/lib/libicp/Makefile.am | 1 + sys/contrib/openzfs/lib/libspl/include/sys/simd.h | 28 +- sys/contrib/openzfs/lib/libzpool/kernel.c | 75 ++ sys/contrib/openzfs/lib/libzutil/zutil_import.c | 39 +- sys/contrib/openzfs/man/man4/zfs.4 | 4 - sys/contrib/openzfs/man/man8/zdb.8 | 14 +- sys/contrib/openzfs/man/man8/zfs-send.8 | 24 +- sys/contrib/openzfs/module/Kbuild.in | 1 + sys/contrib/openzfs/module/icp/algs/modes/gcm.c | 371 ++++-- sys/contrib/openzfs/module/icp/algs/modes/modes.c | 2 +- .../asm-x86_64/modes/THIRDPARTYLICENSE.boringssl | 253 ++++ .../modes/THIRDPARTYLICENSE.boringssl.descrip | 1 + .../icp/asm-x86_64/modes/aesni-gcm-avx2-vaes.S | 1323 +++++++++++++++++++ .../openzfs/module/icp/include/modes/modes.h | 13 +- .../openzfs/module/os/freebsd/zfs/kmod_core.c | 7 - .../openzfs/module/os/freebsd/zfs/zvol_os.c | 210 ++-- sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c | 153 ++- sys/contrib/openzfs/module/zcommon/simd_stat.c | 4 + sys/contrib/openzfs/module/zfs/dbuf.c | 7 +- sys/contrib/openzfs/module/zfs/multilist.c | 4 +- sys/contrib/openzfs/module/zfs/spa_config.c | 115 +- sys/contrib/openzfs/module/zfs/spa_misc.c | 8 - sys/contrib/openzfs/module/zfs/zil.c | 349 +++-- sys/contrib/openzfs/module/zfs/zio.c | 51 +- sys/contrib/openzfs/module/zfs/zvol.c | 281 ++--- sys/contrib/openzfs/module/zstd/zfs_zstd.c | 8 +- sys/contrib/openzfs/scripts/spdxcheck.pl | 1 + sys/contrib/openzfs/tests/runfiles/common.run | 2 +- .../openzfs/tests/zfs-tests/cmd/crypto_test.c | 2 + .../openzfs/tests/zfs-tests/tests/Makefile.am | 1 + .../zvol/zvol_stress/zvol_stress_destroy.ksh | 66 + sys/modules/zfs/Makefile | 3 +- sys/modules/zfs/zfs_config.h | 16 +- sys/modules/zfs/zfs_gitrev.h | 2 +- 55 files changed, 4519 insertions(+), 776 deletions(-) diff --cc sys/conf/kern.pre.mk index 78178065e15b,000000000000..1fcfd6467e7f mode 100644,000000..100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@@ -1,351 -1,0 +1,352 @@@ + +# Part of a unified Makefile for building kernels. This part contains all +# of the definitions that need to be before %BEFORE_DEPEND. + +# Allow user to configure things that only effect src tree builds. +# Note: This is duplicated from src.sys.mk to ensure that we include +# /etc/src.conf when building the kernel. Kernels can be built without +# the rest of /usr/src, but they still always process SRCCONF even though +# the normal mechanisms to prevent that (compiling out of tree) won't +# work. To ensure they do work, we have to duplicate thee few lines here. +SRCCONF?= /etc/src.conf +.if (exists(${SRCCONF}) || ${SRCCONF} != "/etc/src.conf") && !target(_srcconf_included_) +.include "${SRCCONF}" +_srcconf_included_: +.endif + +.include <bsd.own.mk> +.include <bsd.compiler.mk> +.include "kern.opts.mk" +.-include <local.kern.pre.mk> + +# The kernel build always occurs in the object directory which is .CURDIR. +.if ${.MAKE.MODE:Unormal:Mmeta} +.MAKE.MODE+= curdirOk=yes +.endif + +# The kernel build always expects .OBJDIR=.CURDIR. +.OBJDIR: ${.CURDIR} + +.if defined(NO_OBJWALK) || ${MK_AUTO_OBJ} == "yes" +NO_OBJWALK= t +NO_MODULES_OBJ= t +.endif +.if !defined(NO_OBJWALK) +_obj= obj +.endif + +# Can be overridden by makeoptions or /etc/make.conf +KERNEL_KO?= kernel +KERNEL?= kernel +KODIR?= /boot/${KERNEL} +LDSCRIPT_NAME?= ldscript.$M +LDSCRIPT?= $S/conf/${LDSCRIPT_NAME} + +M= ${MACHINE} + +AWK?= awk +CP?= cp +ELFDUMP?= elfdump +NM?= nm +OBJCOPY?= objcopy +SIZE?= size + +.if defined(DEBUG) +CTFFLAGS+= -g +.endif +.if ${MACHINE_CPUARCH} == "amd64" && ${COMPILER_TYPE} != "clang" +_COPTFLAGS_EXTRA=-frename-registers +.else +_COPTFLAGS_EXTRA= +.endif +COPTFLAGS?=-O2 -pipe ${_COPTFLAGS_EXTRA} +.if !empty(COPTFLAGS:M-O[23s]) && empty(COPTFLAGS:M-fno-strict-aliasing) +COPTFLAGS+= -fno-strict-aliasing +.endif +.if !defined(NO_CPU_COPTFLAGS) +COPTFLAGS+= ${_CPUCFLAGS} +.endif +NOSTDINC= -nostdinc + +INCLUDES= ${NOSTDINC} ${INCLMAGIC} -I. -I$S -I$S/contrib/ck/include + +CFLAGS= ${COPTFLAGS} ${DEBUG} +CFLAGS+= ${INCLUDES} -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h +CFLAGS_PARAM_INLINE_UNIT_GROWTH?=100 +CFLAGS_PARAM_LARGE_FUNCTION_GROWTH?=1000 +CFLAGS.gcc+= -fms-extensions -finline-limit=${INLINE_LIMIT} +CFLAGS.gcc+= --param inline-unit-growth=${CFLAGS_PARAM_INLINE_UNIT_GROWTH} +CFLAGS.gcc+= --param large-function-growth=${CFLAGS_PARAM_LARGE_FUNCTION_GROWTH} +CFLAGS.gcc+= -fms-extensions +.if defined(CFLAGS_ARCH_PARAMS) +CFLAGS.gcc+=${CFLAGS_ARCH_PARAMS} +.endif +WERROR?= -Werror +# The following should be removed no earlier than LLVM11 being imported into the +# tree, to ensure we don't regress the build. LLVM11 and GCC10 will switch the +# default over to -fno-common, making this redundant. +CFLAGS+= -fno-common + +# XXX LOCORE means "don't declare C stuff" not "for locore.s". +ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS} ${ASM_CFLAGS.${.IMPSRC:T}} + +COMPAT_FREEBSD32_ENABLED!= grep COMPAT_FREEBSD32 opt_global.h || true ; echo + +KASAN_ENABLED!= grep KASAN opt_global.h || true ; echo +KCSAN_ENABLED!= grep KCSAN opt_global.h || true ; echo +KMSAN_ENABLED!= grep KMSAN opt_global.h || true ; echo +KUBSAN_ENABLED!= grep KUBSAN opt_global.h || true ; echo +COVERAGE_ENABLED!= grep COVERAGE opt_global.h || true ; echo + +GCOV_ENABLED!= grep GCOV opt_global.h || true ; echo +.if !empty(GCOV_ENABLED) +.if ${COMPILER_TYPE} == "gcc" +GCOV_CFLAGS+= -fprofile-arcs -ftest-coverage +.endif +.endif + +CFLAGS+= ${GCOV_CFLAGS} + +# Put configuration-specific C flags last so that they can override +# the others. +CFLAGS+= ${CONF_CFLAGS} + +.if defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mbuild-id} +LDFLAGS+= --build-id=sha1 +.endif + +.if (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ + ${MACHINE_CPUARCH} == "i386" || ${MACHINE} == "powerpc") && \ + defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mifunc} == "" && \ + !make(install) +.error amd64/arm64/i386/ppc* kernel requires linker ifunc support +.endif +.if ${MACHINE_CPUARCH} == "amd64" +LDFLAGS+= -z max-page-size=2097152 +.if ${LINKER_TYPE} != "lld" +LDFLAGS+= -z common-page-size=4096 +.else +.if defined(LINKER_FEATURES) && !${LINKER_FEATURES:Mifunc-noplt} +.warning "Linker ${LD} does not support -z ifunc-noplt -> ifunc calls are unoptimized." +.else +LDFLAGS+= -z notext -z ifunc-noplt +.endif +.endif +.endif # ${MACHINE_CPUARCH} == "amd64" + +.if ${MACHINE_CPUARCH} == "riscv" +# Hack: Work around undefined weak symbols being out of range when linking with +# LLD (address is a PC-relative calculation, and BFD works around this by +# rewriting the instructions to generate an absolute address of 0); -fPIE +# avoids this since it uses the GOT for all extern symbols, which is overly +# inefficient for us. Drop once undefined weak symbols work with medany. +.if ${LINKER_TYPE} == "lld" +CFLAGS+= -fPIE +.endif +.endif + +NORMAL_C= ${CC} -c ${CFLAGS} ${WERROR} ${.IMPSRC} +NORMAL_S= ${CC:N${CCACHE_BIN}} -c ${ASM_CFLAGS} ${WERROR} ${.IMPSRC} +NORMAL_C_NOWERROR= ${CC} -c ${CFLAGS} ${.IMPSRC} + +NORMAL_M= ${AWK} -f $S/tools/makeobjops.awk ${.IMPSRC} -c ; \ + ${CC} -c ${CFLAGS} ${WERROR} ${.PREFIX}.c + +NORMAL_FW= uudecode -o ${.TARGET} ${.ALLSRC} +NORMAL_FWO= ${CC:N${CCACHE_BIN}} -c ${ASM_CFLAGS} ${WERROR} -o ${.TARGET} \ + $S/kern/firmw.S -DFIRMW_FILE=\""${.ALLSRC:M*.fw}"\" \ + -DFIRMW_SYMBOL="${.ALLSRC:M*.fw:C/[-.\/]/_/g}" + +# Remove sanitizer arguments. Some -fno-sanitize* and -fasan-shadow-offset* +# arguments become an error if the appropriate sanitizer is not enabled. +NOSAN_C= ${NORMAL_C:N-fsanitize*:N-fno-sanitize*:N-fasan-shadow-offset*} + +# for ZSTD in the kernel (include zstd/lib/freebsd before other CFLAGS) +ZSTD_C= ${CC} -c -DZSTD_HEAPMODE=1 -I$S/contrib/zstd/lib/freebsd ${CFLAGS} \ + -I$S/contrib/zstd/lib -I$S/contrib/zstd/lib/common ${WERROR} \ + -Wno-missing-prototypes -U__BMI__ -DZSTD_NO_INTRINSICS ${.IMPSRC} +# https://github.com/facebook/zstd/commit/812e8f2a [zstd 1.4.1] +# "Note that [GCC] autovectorization still does not do a good job on the +# optimized version, so it's turned off via attribute and flag. I found +# that neither attribute nor command-line flag were entirely successful in +# turning off vectorization, which is why there were both." +.if ${COMPILER_TYPE} == "gcc" +ZSTD_DECOMPRESS_BLOCK_FLAGS= -fno-tree-vectorize +.endif + +ZINCDIR=$S/contrib/openzfs/include +# Common for dtrace / zfs +CDDL_CFLAGS= \ + -DFREEBSD_NAMECACHE \ + -D_SYS_VMEM_H_ \ + -D__KERNEL \ + -D__KERNEL__ \ + -nostdinc \ + -include $S/modules/zfs/static_ccompile.h \ + -I${ZINCDIR} \ + -I${ZINCDIR}/os/freebsd \ + -I${ZINCDIR}/os/freebsd/spl \ + -I${ZINCDIR}/os/freebsd/zfs \ + -I$S/modules/zfs \ + -I$S/contrib/openzfs/module/zstd/include \ + ${CFLAGS} \ + -Wno-cast-qual \ + -Wno-duplicate-decl-specifier \ + -Wno-missing-braces \ + -Wno-missing-prototypes \ + -Wno-parentheses \ + -Wno-pointer-arith \ + -Wno-strict-prototypes \ + -Wno-switch \ + -Wno-undef \ + -Wno-uninitialized \ + -Wno-unknown-pragmas \ + -Wno-unused \ + -include ${ZINCDIR}/os/freebsd/spl/sys/ccompile.h \ + -I$S/cddl/contrib/opensolaris/uts/common \ + -I$S -I$S/cddl/compat/opensolaris +CDDL_C= ${CC} -c ${CDDL_CFLAGS} ${WERROR} ${.IMPSRC} + +# Special flags for managing the compat compiles for ZFS +ZFS_CFLAGS+= -I$S/contrib/openzfs/module/icp/include \ + ${CDDL_CFLAGS} -DBUILDING_ZFS -DHAVE_UIO_ZEROCOPY \ + -DWITH_NETDUMP -D__KERNEL__ -D_SYS_CONDVAR_H_ -DSMP + +.if ${MACHINE_ARCH} == "amd64" +ZFS_CFLAGS+= -D__x86_64 -DHAVE_SSE2 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 \ - -DHAVE_AVX -DHAVE_AVX2 -DHAVE_AVX512F -DHAVE_AVX512VL -DHAVE_AVX512BW ++ -DHAVE_AVX -DHAVE_AVX2 -DHAVE_AVX512F -DHAVE_AVX512VL -DHAVE_AVX512BW \ ++ -DHAVE_VAES -DHAVE_VPCLMULQDQ +.endif + +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" || \ + ${MACHINE_ARCH} == "powerpcspe" || ${MACHINE_ARCH} == "arm" +ZFS_CFLAGS+= -DBITS_PER_LONG=32 +.else +ZFS_CFLAGS+= -DBITS_PER_LONG=64 +.endif + + +ZFS_ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${ZFS_CFLAGS} +ZFS_C= ${CC} -c ${ZFS_CFLAGS} ${WERROR} ${.IMPSRC} +ZFS_RPC_C= ${CC} -c ${ZFS_CFLAGS} -DHAVE_RPC_TYPES ${WERROR} ${.IMPSRC} +ZFS_S= ${CC} -c ${ZFS_ASM_CFLAGS} ${WERROR} ${.IMPSRC} + +# ATH driver +ATH_CFLAGS= -I${SRCTOP}/sys/dev/ath ${NO_WUNUSED_BUT_SET_VARIABLE} +ATH_C= ${CC} -c ${CFLAGS} ${WERROR} ${ATH_CFLAGS} ${.IMPSRC} + +# Special flags for managing the compat compiles for DTrace +DTRACE_CFLAGS= -DBUILDING_DTRACE ${CDDL_CFLAGS} -I$S/cddl/dev/dtrace -I$S/cddl/dev/dtrace/${MACHINE_CPUARCH} +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" +DTRACE_CFLAGS+= -I$S/cddl/contrib/opensolaris/uts/intel -I$S/cddl/dev/dtrace/x86 +.endif +DTRACE_CFLAGS+= -I$S/cddl/contrib/opensolaris/common/util -I$S -DDIS_MEM -DSMP -I$S/cddl/compat/opensolaris +DTRACE_CFLAGS+= -I$S/cddl/contrib/opensolaris/uts/common +DTRACE_ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${DTRACE_CFLAGS} +DTRACE_C= ${CC} -c ${DTRACE_CFLAGS} ${WERROR} ${.IMPSRC} +DTRACE_S= ${CC} -c ${DTRACE_ASM_CFLAGS} ${WERROR} ${.IMPSRC} + +# zlib code supports systems that are quite old, but will fix this issue once C2x gets radified. +# see https://github.com/madler/zlib/issues/633 for details +ZLIB_CFLAGS= -Wno-cast-qual ${NO_WDEPRECATED_NON_PROTOTYPE} ${NO_WSTRICT_PROTOTYPES} +ZLIB_C= ${CC} -c ${CFLAGS} ${WERROR} ${ZLIB_CFLAGS} ${.IMPSRC} + +# Special flags for managing the compat compiles for DTrace/FBT +FBT_CFLAGS= -DBUILDING_DTRACE -nostdinc -I$S/cddl/dev/fbt/${MACHINE_CPUARCH} -I$S/cddl/dev/fbt ${CDDL_CFLAGS} -I$S/cddl/compat/opensolaris -I$S/cddl/contrib/opensolaris/uts/common +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" +FBT_CFLAGS+= -I$S/cddl/dev/fbt/x86 +.endif +FBT_C= ${CC} -c ${FBT_CFLAGS} ${WERROR} ${.IMPSRC} + +.if ${MK_CTF} != "no" +NORMAL_CTFCONVERT= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.elif ${MAKE_VERSION} >= 5201111300 +NORMAL_CTFCONVERT= +.else +NORMAL_CTFCONVERT= @: +.endif + +# Linux Kernel Programming Interface C-flags +LINUXKPI_INCLUDES= -I$S/compat/linuxkpi/common/include \ + -I$S/compat/linuxkpi/dummy/include \ + -include $S/compat/linuxkpi/common/include/linux/kconfig.h +LINUXKPI_C= ${NORMAL_C} ${LINUXKPI_INCLUDES} + +# Infiniband C flags. Correct include paths and omit errors that linux +# does not honor. +OFEDINCLUDES= -I$S/ofed/include -I$S/ofed/include/uapi ${LINUXKPI_INCLUDES} +OFEDNOERR= -Wno-cast-qual -Wno-pointer-arith +OFEDCFLAGS= ${CFLAGS:N-I*} -DCONFIG_INFINIBAND_USER_MEM \ + ${OFEDINCLUDES} ${CFLAGS:M-I*} ${OFEDNOERR} +OFED_C_NOIMP= ${CC} -c -o ${.TARGET} ${OFEDCFLAGS} ${WERROR} +OFED_C= ${OFED_C_NOIMP} ${.IMPSRC} + +# mlxfw C flags. +MLXFW_C= ${OFED_C_NOIMP} \ + -I${SRCTOP}/sys/contrib/xz-embedded/freebsd \ + -I${SRCTOP}/sys/contrib/xz-embedded/linux/lib/xz \ + ${.IMPSRC} +# BNXT Driver +BNXT_CFLAGS= -I$S/dev/bnxt/bnxt_en ${OFEDCFLAGS} +BNXT_C_NOIMP= ${CC} -c -o ${.TARGET} ${BNXT_CFLAGS} ${WERROR} +BNXT_C= ${BNXT_C_NOIMP} ${.IMPSRC} + +# IP Filter +IPFILTER_CFLAGS= -I$S/netpfil/ipfilter +IPFILTER_C= ${NORMAL_C} ${IPFILTER_CFLAGS} + +GEN_CFILES= $S/$M/$M/genassym.c ${MFILES:T:S/.m$/.c/} +SYSTEM_CFILES= config.c env.c hints.c vnode_if.c +SYSTEM_DEP= Makefile ${SYSTEM_OBJS} +SYSTEM_OBJS= locore.o ${MDOBJS} ${OBJS} +SYSTEM_OBJS+= ${SYSTEM_CFILES:.c=.o} +SYSTEM_OBJS+= force-dynamic-hack.pico + +KEYMAP=kbdcontrol -P ${SRCTOP}/share/vt/keymaps -P ${SRCTOP}/share/syscons/keymaps +KEYMAP_FIX=sed -e 's/^static keymap_t.* = /static keymap_t key_map = /' -e 's/^static accentmap_t.* = /static accentmap_t accent_map = /' + +MD_ROOT_SIZE_CONFIGURED!= grep MD_ROOT_SIZE opt_md.h || true ; echo +.if ${MFS_IMAGE:Uno} != "no" +.if empty(MD_ROOT_SIZE_CONFIGURED) +SYSTEM_OBJS+= embedfs_${MFS_IMAGE:T:R}.o +.endif +.endif +SYSTEM_LD_BASECMD= \ + ${LD} -m ${LD_EMULATION} -Bdynamic -L $S/conf -T ${LDSCRIPT} ${_LDFLAGS} \ + --no-warn-mismatch --warn-common --export-dynamic \ + --dynamic-linker /red/herring -X +SYSTEM_LD= @${SYSTEM_LD_BASECMD} -o ${.TARGET} ${SYSTEM_OBJS} vers.o +SYSTEM_LD_TAIL= @${SIZE} ${.TARGET} ; chmod 755 ${.TARGET} +SYSTEM_DEP+= ${LDSCRIPT} + +# Calculate path for .m files early, if needed. +.if !defined(NO_MODULES) && !defined(__MPATH) && !make(install) && \ + (empty(.MAKEFLAGS:M-V) || defined(NO_SKIP_MPATH)) +__MPATH!=find ${S:tA}/ -name \*_if.m +.endif + +# MKMODULESENV is set here so that port makefiles can augment +# them. + +MKMODULESENV+= MAKEOBJDIRPREFIX=${.OBJDIR}/modules KMODDIR=${KODIR} +MKMODULESENV+= MACHINE_CPUARCH=${MACHINE_CPUARCH} +MKMODULESENV+= MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH} +MKMODULESENV+= MODULES_EXTRA="${MODULES_EXTRA}" WITHOUT_MODULES="${WITHOUT_MODULES}" +MKMODULESENV+= ARCH_FLAGS="${ARCH_FLAGS}" +.if (${KERN_IDENT} == LINT) +MKMODULESENV+= ALL_MODULES=LINT +.endif +.if defined(MODULES_OVERRIDE) +MKMODULESENV+= MODULES_OVERRIDE="${MODULES_OVERRIDE}" +.endif +.if defined(DEBUG) +MKMODULESENV+= DEBUG_FLAGS="${DEBUG}" +.endif +.if !defined(NO_MODULES) +MKMODULESENV+= __MPATH="${__MPATH}" +.endif + +# Detect kernel config options that force stack frames to be turned on. +DDB_ENABLED!= grep DDB opt_ddb.h || true ; echo +DTRACE_ENABLED!=grep KDTRACE_FRAME opt_kdtrace.h || true ; echo +HWPMC_ENABLED!= grep HWPMC opt_hwpmc_hooks.h || true ; echo diff --cc sys/contrib/openzfs/.mailmap index b6d942c000b8,000000000000..e6f09c6c9d43 mode 100644,000000..100644 --- a/sys/contrib/openzfs/.mailmap +++ b/sys/contrib/openzfs/.mailmap @@@ -1,225 -1,0 +1,229 @@@ +# This file maps the name+email seen in a commit back to a canonical +# name+email. Git will replace the commit name/email with the canonical version +# wherever it sees it. +# +# If there is a commit in the history with a "wrong" name or email, list it +# here. If you regularly commit with an alternate name or email address and +# would like to ensure that you are always listed consistently in the repo, add +# mapping here. +# +# On the other hand, if you use multiple names or email addresses legitimately +# (eg you use a company email address for your paid OpenZFS work, and a +# personal address for your evening side projects), then don't map one to the +# other here. +# +# The most common formats are: +# +# Canonical Name <canonical-email> +# Canonical Name <canonical-email> <commit-email> +# Canonical Name <canonical-email> Commit Name <commit-email> +# +# See https://git-scm.com/docs/gitmailmap for more info. + +# These maps are making names consistent where they have varied but the email +# address has never changed. In most cases, the full name is in the +# Signed-off-by of a commit with a matching author. ++Achill Gilgenast <ach...@achill.org> +Ahelenia Ziemiańska <nabijaczlew...@gmail.com> +Ahelenia Ziemiańska <nabijaczlew...@nabijaczleweli.xyz> +Alex John <a...@stty.io> +Andreas Dilger <adil...@dilger.ca> +Andrew Walker <awal...@ixsystems.com> +Benedikt Neuffer <git...@itfriend.de> +Chengfei Zhu <chengfeix....@intel.com> +ChenHao Lu <18302010...@fudan.edu.cn> +Chris Lindee <chris.lindee+git...@gmail.com> +Colm Buckley <c...@tuatha.org> +Crag Wang <crag0...@gmail.com> +Damian Szuberski <szuberskidam...@gmail.com> +Daniel Kolesa <dan...@octaforge.org> +Debabrata Banerjee <dbava...@gmail.com> ++Diwakar Kristappagari <diwaka...@hpe.com> +Finix Yan <yanchong...@hotmail.com> +Gaurav Kumar <gauravk...@gmail.com> +Gionatan Danti <g.da...@assyoma.it> +Glenn Washburn <developm...@efficientek.com> +Gordan Bobic <gordan.bo...@gmail.com> +Gregory Bartholomew <gregory.lee.bartholo...@gmail.com> +hedong zhang <h_d_zh...@163.com> +Ilkka Sovanto <git...@ilkka.kapsi.fi> +InsanePrawn <insane.pra...@gmail.com> +Jason Cohen <jwittlinco...@gmail.com> +Jason Harmening <jason.harmen...@gmail.com> +Jeremy Faulkner <gldisa...@gmail.com> +Jinshan Xiong <jinshan.xi...@gmail.com> +John Poduska <jpodu...@datto.com> +Justin Scholz <g...@justinscholz.de> +Ka Ho Ng <khng...@gmail.com> +Kash Pande <git...@tripleback.net> +Kay Pedersen <christianp...@gmail.com> +KernelOfTruth <kerneloftr...@gmail.com> +Liu Hua <liu.hua...@zte.com.cn> +Liu Qing <win...@gmail.com> +loli10K <ezomori.noz...@gmail.com> +Mart Frauenlob <allk...@fastest.cc> +Matthias Blankertz <matth...@blankertz.org> +Michael Gmelin <gre...@freebsd.org> +Olivier Mazouffre <olivier.mazouf...@ims-bordeaux.fr> +Piotr Kubaj <pku...@anongoth.pl> +Quentin Zdanis <zdan...@gmail.com> +Roberto Ricci <ri...@disroot.org> +Rob Norris <r...@despairlabs.com> +Rob Norris <rob.nor...@klarasystems.com> +Sam Lunt <samuel.j.l...@gmail.com> +Sanjeev Bagewadi <sanjeev.bagew...@gmail.com> +Sebastian Wuerl <s.wu...@mailbox.org> +SHENGYI HONG <aokbl...@freebsd.org> +Stoiko Ivanov <git...@nomore.at> +Tamas TEVESZ <i...@extreme.hu> +WHR <msl0000023...@gmail.com> +Yanping Gao <yanping....@xtaotech.com> +Youzhong Yang <youzh...@gmail.com> + +# Signed-off-by: overriding Author: +Alexander Ziaee <zi...@freebsd.org> <concussi...@runbox.com> +Felix Schmidt <felixschmid...@aol.com> <f.sch.protot...@gmail.com> +Olivier Certner <o...@freebsd.org> <olce.free...@certner.fr> +Phil Sutter <p...@nwl.cc> <p.git...@nwl.cc> +poscat <pos...@poscat.moe> <poscat0...@outlook.com> +Qiuhao Chen <chenqiuhao1...@gmail.com> <haohao0...@126.com> +Ryan <errornointer...@envs.net> <error.nointer...@gmail.com> +Sietse <sie...@wizdom.nu> <uglymo...@wizdom.nu> +Yuxin Wang <yuxinwang9...@gmail.com> <bi11gates9...@gmail.com> +Zhenlei Huang <z...@freebsd.org> <zlei.hu...@gmail.com> + +# Commits from strange places, long ago +Brian Behlendorf <behlendo...@llnl.gov> <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c> +Brian Behlendorf <behlendo...@llnl.gov> <behlendo@fedora-17-amd64.(none)> +Brian Behlendorf <behlendo...@llnl.gov> <behlendo@myhost.(none)> +Brian Behlendorf <behlendo...@llnl.gov> <ubu...@ip-172-31-16-145.us-west-1.compute.internal> +Brian Behlendorf <behlendo...@llnl.gov> <ubu...@ip-172-31-20-6.us-west-1.compute.internal> +Herb Wartens <warte...@llnl.gov> <wartens2@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c> +Ned Bass <ba...@llnl.gov> <bass6@zeno1.(none)> +Tulsi Jain <tulsi.j...@delphix.com> <tulsi.jain@Tulsi-Jains-MacBook-Pro.local> + +# Mappings from Github no-reply addresses +ajs124 <g...@ajs124.de> <ajs...@users.noreply.github.com> +Alek Pinchuk <apinc...@axcient.com> <ale...@users.noreply.github.com> +Aleksandr Liber <aleksandr.li...@perforce.com> <61714074+aleksandrli...@users.noreply.github.com> +Alexander Lobakin <aloba...@pm.me> <solbj...@users.noreply.github.com> +Alexey Smirnoff <fl...@member.fsf.org> <fli...@users.noreply.github.com> +Allen Holl <allen.m.h...@gmail.com> <65494904+alle...@users.noreply.github.com> +Alphan Yılmaz <alphanyil...@gmail.com> <a1ea...@users.noreply.github.com> +Ameer Hamza <aha...@ixsystems.com> <106930537+ixha...@users.noreply.github.com> +Andrew J. Hesford <a...@sideband.org> <48421688+ahesf...@users.noreply.github.com>> +Andrew Sun <m...@andrewsun.com> <as-...@users.noreply.github.com> +Aron Xu <happyaron...@gmail.com> <happya...@users.noreply.github.com> +Arun KV <arun...@datacore.com> <65647132+arun...@users.noreply.github.com> +Ben Wolsieffer <benwolsief...@gmail.com> <lopside...@users.noreply.github.com> +bernie1995 <bernie.pi...@gmail.com> <42413912+bernie1...@users.noreply.github.com> +Bojan Novković <bnov...@freebsd.org> <72801811+bnov...@users.noreply.github.com> +Boris Protopopov <boris.protopo...@actifio.com> <bprotopo...@users.noreply.github.com> +Brad Forschinger <git...@bnjf.id.au> <b...@users.noreply.github.com> +Brandon Thetford <bran...@dodecatec.com> <dodexahed...@users.noreply.github.com> +buzzingwires <buzzingwi...@outlook.com> <131118055+buzzingwi...@users.noreply.github.com> +Cedric Maunoury <cedric.mauno...@gmail.com> <38213715+cedricmauno...@users.noreply.github.com> +Charles Suh <charles....@gmail.com> <charles...@users.noreply.github.com> +Chris Peredun <chris.pere...@ixsystems.com> <126915832+chrispere...@users.noreply.github.com> +Dacian Reece-Stremtan <dacianstrem...@gmail.com> <35844628+dacianstrem...@users.noreply.github.com> +Damian Szuberski <szuberskidam...@gmail.com> <30863496+szube...@users.noreply.github.com> +Daniel Hiepler <d-...@coderdu.de> <32984777+hee...@users.noreply.github.com> +Daniel Kobras <d.kob...@science-computing.de> <sckob...@users.noreply.github.com> +Daniel Reichelt <hack...@nachtgeist.net> <nachtge...@users.noreply.github.com> +David Quigley <david.quig...@intel.com> <dpqu...@users.noreply.github.com> +Dennis R. Friedrichsen <dennis.r.friedrich...@gmail.com> <31087738+dennisfriedrich...@users.noreply.github.com> +Dex Wood <slash2...@gmail.com> <slash2...@users.noreply.github.com> +DHE <g...@dehacked.net> <dehac...@users.noreply.github.com> +Dmitri John Ledkov <dimitri.led...@canonical.com> <19779+x...@users.noreply.github.com> +Dries Michiels <driesm.michi...@gmail.com> <32487486+drie...@users.noreply.github.com> +Edmund Nadolski <edmund.nadol...@ixsystems.com> <137826107+ednadolski...@users.noreply.github.com> +Érico Nogueira <erico....@gmail.com> <34201958+eric...@users.noreply.github.com> +Fedor Uporov <fuporov.vst...@gmail.com> <60701163+fuporovvst...@users.noreply.github.com> +Felix Dörre <fe...@dogcraft.de> <felixdoe...@users.noreply.github.com> +Felix Neumärker <xdc...@posteo.de> <34678034+xdc...@users.noreply.github.com> +Finix Yan <ya...@info2soft.com> <finix1...@users.noreply.github.com> +Friedrich Weber <f.we...@proxmox.com> <56110206+fr...@users.noreply.github.com> +Gaurav Kumar <gauravk...@gmail.com> <gaurk...@users.noreply.github.com> +George Gaydarov <g...@gg7.io> <g...@users.noreply.github.com> +Georgy Yakovlev <gyakov...@gentoo.org> <168902+gyakov...@users.noreply.github.com> +Gerardwx <gera...@alum.mit.edu> <gerar...@users.noreply.github.com> ++Germano Massullo <germano.massu...@gmail.com> <germa...@users.noreply.github.com> +Gian-Carlo DeFazio <defaz...@llnl.gov> <defaziogianca...@users.noreply.github.com> +Giuseppe Di Natale <dinata...@llnl.gov> <dinata...@users.noreply.github.com> +Hajo Möller <das...@gmail.com> <das...@users.noreply.github.com> +Harry Mallon <hjmal...@gmail.com> <1816667+hjmal...@users.noreply.github.com> +Hiếu Lê <leorize+...@disroot.org> <alav...@users.noreply.github.com> +Jake Howard <g...@theorangeone.net> <realorange...@users.noreply.github.com> +James Cowgill <james.cowg...@mips.com> <jcowg...@users.noreply.github.com> +Jaron Kent-Dobias <ja...@kent-dobias.com> <kentdob...@users.noreply.github.com> +Jason King <jason.k...@joyent.com> <jasonbk...@users.noreply.github.com> +Jeff Dike <jd...@akamai.com> <52420226+jd...@users.noreply.github.com> +Jitendra Patidar <jitendra.pati...@nutanix.com> <53164267+jsa...@users.noreply.github.com> +João Carlos Mendes Luís <jo...@jonny.eng.br> <dion...@users.noreply.github.com> +John Eismeier <john.eisme...@gmail.com> <32205350+jeis2497...@users.noreply.github.com> +John L. Hammond <john.hamm...@intel.com> <35266395+jhammond-in...@users.noreply.github.com> +John-Mark Gurney <j...@funkthat.com> <jmgur...@users.noreply.github.com> +John Ramsden <johnrams...@riseup.net> <johnrams...@users.noreply.github.com> +Jonathon Fernyhough <jonat...@m2x.dev> <559369+jonath...@users.noreply.github.com> +Jose Luis Duran <jldu...@gmail.com> <jldu...@users.noreply.github.com> +Justin Hibbits <chmeeed...@gmail.com> <chmeeed...@users.noreply.github.com> ++Kaitlin Hoang <ktho...@amazon.com> <khoan...@users.noreply.github.com> +Kevin Greene <kevin.gre...@delphix.com> <104801862+kxgre...@users.noreply.github.com> +Kevin Jin <lostking2...@hotmail.com> <33590050+jxdk...@users.noreply.github.com> +Kevin P. Fleming <ke...@km6g.us> <kpflem...@users.noreply.github.com> +Krzysztof Piecuch <piec...@kpiecuch.pl> <3964215+pikrzysz...@users.noreply.github.com> +Kyle Evans <kev...@freebsd.org> <kevan...@users.noreply.github.com> +Laurențiu Nicola <lnic...@dend.ro> <lnic...@users.noreply.github.com> +loli10K <ezomori.noz...@gmail.com> <loli...@users.noreply.github.com> +Lorenz Hüdepohl <d...@stellardeath.org> <lhuedep...@users.noreply.github.com> +Luís Henriques <hen...@camandro.org> <73643340+lumi...@users.noreply.github.com> +Marcin Skarbek <g...@skarbek.name> <mskar...@users.noreply.github.com> +Matt Fiddaman <git...@m.fiddaman.uk> <81489167+matt-f...@users.noreply.github.com> +Maxim Filimonov <c...@bein.link> <part1z...@users.noreply.github.com> +Max Zettlmeißl <m...@zettlmeissl.de> <6818198+m...@users.noreply.github.com> +Michael Niewöhner <f...@mniewoehner.de> <c0d3z...@users.noreply.github.com> +Michael Zhivich <mzhiv...@akamai.com> <33133421+mzhiv...@users.noreply.github.com> +MigeljanImeri <imerimi...@gmail.com> <78048439+migeljanim...@users.noreply.github.com> +Mo Zhou <cdlumin...@gmail.com> <5723047+cdlumin...@users.noreply.github.com> +Nick Mattis <nickm...@gmail.com> <nmat...@users.noreply.github.com> +omni <omni+vag...@hack.org> <79493359+omnivag...@users.noreply.github.com> +Pablo Correa Gómez <ablocor...@hotmail.com> <32678034+pablo...@users.noreply.github.com> +Paul Zuchowski <pzuchow...@datto.com> <31706010+paulz...@users.noreply.github.com> +Peter Ashford <ashf...@accs.com> <pashf...@users.noreply.github.com> +Peter Dave Hello <h...@peterdavehello.org> <peterdavehe...@users.noreply.github.com> +Peter Wirdemo <peter.wird...@gmail.com> <4224155+p...@users.noreply.github.com> +Petros Koutoupis <pet...@petroskoutoupis.com> <pkoutou...@users.noreply.github.com> +Ping Huang <huangp...@smartx.com> <101400146+hpin...@users.noreply.github.com> +Piotr P. Stefaniak <ps...@freebsd.org> <ps...@users.noreply.github.com> +Richard Allen <belper...@gmail.com> <33836503+belper...@users.noreply.github.com> +Rich Ercolani <rincebr...@gmail.com> <214141+rincebr...@users.noreply.github.com> +Rick Macklem <rmack...@uoguelph.ca> <64620010+rmack...@users.noreply.github.com> +Rob Wing <rob.w...@klarasystems.com> <98866084+rob-w...@users.noreply.github.com> +Roman Strashkin <roman.strash...@nexenta.com> <ram...@users.noreply.github.com> +Ryan Hirasaki <ryanhiras...@gmail.com> <4690732+ryan...@users.noreply.github.com> +Samuel Wycliffe J <sam...@hpe.com> <115969550+sam...@users.noreply.github.com> +Samuel Wycliffe <samuelwycli...@gmail.com> <50765275+npc...@users.noreply.github.com> +Savyasachee Jha <h...@savyasacheejha.com> <savya...@users.noreply.github.com> +Scott Colby <sc...@scolby.com> <scolb...@users.noreply.github.com> +Sean Eric Fagan <kith...@mac.com> <kith...@users.noreply.github.com> +Spencer Kinny <spencerkinny1...@gmail.com> <30333052+spencer-ki...@users.noreply.github.com> +Srikanth N S <srikanth.nagasubbaraoseethara...@hpe.com> <75025422+nssrika...@users.noreply.github.com> +Stefan Lendl <s.le...@proxmox.com> <1321542+s...@users.noreply.github.com> +Thomas Bertschinger <bertschin...@lanl.gov> <101425190+bertschin...@users.noreply.github.com> +Thomas Geppert <ge...@digitx.de> <ge...@users.noreply.github.com> +Tim Crawford <tcrawf...@datto.com> <crawf...@users.noreply.github.com> +Todd Seidelmann <18294602+seide...@users.noreply.github.com> +Tom Matthews <t...@axiom-partners.com> <tomtas...@users.noreply.github.com> +Tony Perkins <tperk...@datto.com> <62951051+tony-...@users.noreply.github.com> +Torsten Wörtwein <twoertw...@gmail.com> <twoertw...@users.noreply.github.com> +Tulsi Jain <tulsi.j...@delphix.com> <tulsij...@users.noreply.github.com> +Václav Skála <sk...@vshosting.cz> <33496485+vaclavsk...@users.noreply.github.com> +Vaibhav Bhanawat <vaibhav.bhana...@delphix.com> <88050553+vaibhav-delp...@users.noreply.github.com> +Vandana Rungta <vrun...@amazon.com> <46906819+vandanarun...@users.noreply.github.com> +Violet Purcell <vimpro...@inventati.org> <66446404+vimpro...@users.noreply.github.com> +Vipin Kumar Verma <vipin.ve...@hpe.com> <75025470+vermavipinku...@users.noreply.github.com> +Wolfgang Bumiller <w.bumil...@proxmox.com> <b...@users.noreply.github.com> +XDTG <click1...@163.com> <35128600+x...@users.noreply.github.com> +xtouqh <xto...@hotmail.com> <72357159+xto...@users.noreply.github.com> +Yuri Pankov <yur...@freebsd.org> <113725409+yur...@users.noreply.github.com> +Yuri Pankov <yur...@freebsd.org> <82001006+yur...@users.noreply.github.com> diff --cc sys/contrib/openzfs/contrib/icp/gcm-simd/boringssl/LICENSE index 000000000000,04c03a37e0cb..04c03a37e0cb mode 000000,100644..100644 --- a/sys/contrib/openzfs/contrib/icp/gcm-simd/boringssl/LICENSE +++ b/sys/contrib/openzfs/contrib/icp/gcm-simd/boringssl/LICENSE diff --cc sys/contrib/openzfs/contrib/icp/gcm-simd/boringssl/README index 000000000000,aa6fb6d477fa..aa6fb6d477fa mode 000000,100644..100644 --- a/sys/contrib/openzfs/contrib/icp/gcm-simd/boringssl/README +++ b/sys/contrib/openzfs/contrib/icp/gcm-simd/boringssl/README diff --cc sys/contrib/openzfs/contrib/icp/gcm-simd/boringssl/aes-gcm-avx2-x86_64-linux.S index 000000000000,e7327c9de872..e7327c9de872 mode 000000,100644..100644 --- a/sys/contrib/openzfs/contrib/icp/gcm-simd/boringssl/aes-gcm-avx2-x86_64-linux.S +++ b/sys/contrib/openzfs/contrib/icp/gcm-simd/boringssl/aes-gcm-avx2-x86_64-linux.S diff --cc sys/contrib/openzfs/module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.boringssl index 000000000000,04c03a37e0cb..04c03a37e0cb mode 000000,100644..100644 --- a/sys/contrib/openzfs/module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.boringssl +++ b/sys/contrib/openzfs/module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.boringssl diff --cc sys/contrib/openzfs/module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.boringssl.descrip index 000000000000,f63a67a4d2ae..f63a67a4d2ae mode 000000,100644..100644 --- a/sys/contrib/openzfs/module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.boringssl.descrip +++ b/sys/contrib/openzfs/module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.boringssl.descrip diff --cc sys/contrib/openzfs/module/icp/asm-x86_64/modes/aesni-gcm-avx2-vaes.S index 000000000000,3d1b045127e2..3d1b045127e2 mode 000000,100644..100644 --- a/sys/contrib/openzfs/module/icp/asm-x86_64/modes/aesni-gcm-avx2-vaes.S +++ b/sys/contrib/openzfs/module/icp/asm-x86_64/modes/aesni-gcm-avx2-vaes.S diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/zvol/zvol_stress/zvol_stress_destroy.ksh index 000000000000,669b59fac01f..669b59fac01f mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/zvol/zvol_stress/zvol_stress_destroy.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/zvol/zvol_stress/zvol_stress_destroy.ksh diff --cc sys/modules/zfs/Makefile index 2dd9e2be3f56,000000000000..0dc85e3fa684 mode 100644,000000..100644 --- a/sys/modules/zfs/Makefile +++ b/sys/modules/zfs/Makefile @@@ -1,533 -1,0 +1,534 @@@ +SRCDIR=${SRCTOP}/sys/contrib/openzfs/module +INCDIR=${SRCTOP}/sys/contrib/openzfs/include + +KMOD= zfs + +.PATH: ${SRCDIR}/avl \ + ${SRCDIR}/lua \ + ${SRCDIR}/nvpair \ + ${SRCDIR}/icp/algs/blake3 \ + ${SRCDIR}/icp/algs/edonr \ + ${SRCDIR}/icp/algs/sha2 \ + ${SRCDIR}/icp/asm-aarch64/blake3 \ + ${SRCDIR}/icp/asm-aarch64/sha2 \ + ${SRCDIR}/icp/asm-arm/sha2 \ + ${SRCDIR}/icp/asm-ppc64/sha2 \ + ${SRCDIR}/icp/asm-ppc64/blake3 \ + ${SRCDIR}/icp/asm-x86_64/blake3 \ + ${SRCDIR}/icp/asm-x86_64/sha2 \ + ${SRCDIR}/os/freebsd/spl \ + ${SRCDIR}/os/freebsd/zfs \ + ${SRCDIR}/unicode \ + ${SRCDIR}/zcommon \ + ${SRCDIR}/zfs \ + ${SRCDIR}/zstd \ + ${SRCDIR}/zstd/lib/common \ + ${SRCDIR}/zstd/lib/compress \ + ${SRCDIR}/zstd/lib/decompress + +CFLAGS+= -I${INCDIR} +CFLAGS+= -I${SRCDIR}/icp/include +CFLAGS+= -I${INCDIR}/os/freebsd +CFLAGS+= -I${INCDIR}/os/freebsd/spl +CFLAGS+= -I${INCDIR}/os/freebsd/zfs +CFLAGS+= -I${SRCDIR}/zstd/include +CFLAGS+= -I${.CURDIR} + +CFLAGS+= -D__KERNEL__ -DFREEBSD_NAMECACHE -DBUILDING_ZFS \ + -DHAVE_UIO_ZEROCOPY -DWITHOUT_NETDUMP -D__KERNEL -D_SYS_CONDVAR_H_ \ + -D_SYS_VMEM_H_ + +.if ${MACHINE_ARCH} == "amd64" +CFLAGS+= -D__x86_64 -DHAVE_SSE2 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 \ - -DHAVE_AVX -DHAVE_AVX2 -DHAVE_AVX512F -DHAVE_AVX512VL -DHAVE_AVX512BW ++ -DHAVE_AVX -DHAVE_AVX2 -DHAVE_AVX512F -DHAVE_AVX512VL -DHAVE_AVX512BW \ ++ -DHAVE_VAES HAVE_VPCLMULQDQ +.endif + +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" || \ + ${MACHINE_ARCH} == "powerpcspe" || ${MACHINE_ARCH} == "arm" +CFLAGS+= -DBITS_PER_LONG=32 +.else +CFLAGS+= -DBITS_PER_LONG=64 +.endif + +SRCS= vnode_if.h device_if.h bus_if.h + +# avl +SRCS+= avl.c + +# icp +SRCS+= edonr.c + +#icp/algs/blake3 +SRCS+= blake3.c \ + blake3_generic.c \ + blake3_impl.c + + +.if ${MACHINE_ARCH} == "aarch64" +#icp/asm-aarch64/blake3 +SRCS+= b3_aarch64_sse2.S \ + b3_aarch64_sse41.S +.endif + +.if ${MACHINE_ARCH} == "powerpc64le" +#icp/asm-ppc64/blake3 +SRCS+= b3_ppc64le_sse2.S \ + b3_ppc64le_sse41.S +.endif + +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" +#icp/asm-x86_64/blake3 +SRCS+= blake3_avx2.S \ + blake3_avx512.S \ + blake3_sse2.S \ + blake3_sse41.S +.endif + +#icp/algs/sha2 +SRCS+= sha2_generic.c \ + sha256_impl.c \ + sha512_impl.c + +.if ${MACHINE_ARCH} == "armv7" +#icp/asm-arm/sha2 +SRCS+= sha256-armv7.S \ + sha512-armv7.S +.endif + +.if ${MACHINE_ARCH} == "aarch64" +#icp/asm-aarch64/sha2 +OBJS+= zfs-sha256-armv8.o \ + zfs-sha512-armv8.o +.endif + +.if ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "powerpc64le" +#icp/asm-ppc64/sha2 +SRCS+= sha256-p8.S \ + sha512-p8.S \ + sha256-ppc.S \ + sha512-ppc.S +.endif + +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" +#icp/asm-x86_64/sha2 +OBJS+= zfs-sha256-x86_64.o \ + zfs-sha512-x86_64.o +.endif + +#lua +SRCS+= lapi.c \ + lauxlib.c \ + lbaselib.c \ + lcode.c \ + lcompat.c \ + lcorolib.c \ + lctype.c \ + ldebug.c \ + ldo.c \ + lfunc.c \ + lgc.c \ + llex.c \ + lmem.c \ + lobject.c \ + lopcodes.c \ + lparser.c \ + lstate.c \ + lstring.c \ + lstrlib.c \ + ltable.c \ + ltablib.c \ + ltm.c \ + lvm.c \ + lzio.c + +#nvpair +SRCS+= nvpair.c \ + fnvpair.c \ + nvpair_alloc_spl.c \ + nvpair_alloc_fixed.c + +#os/freebsd/spl +SRCS+= acl_common.c \ + callb.c \ + list.c \ + spl_acl.c \ + spl_cmn_err.c \ + spl_dtrace.c \ + spl_kmem.c \ + spl_kstat.c \ + spl_misc.c \ + spl_policy.c \ + spl_procfs_list.c \ + spl_string.c \ + spl_sunddi.c \ + spl_sysevent.c \ + spl_taskq.c \ + spl_uio.c \ + spl_vfs.c \ + spl_vm.c \ + spl_zlib.c \ + spl_zone.c + + +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" || \ + ${MACHINE_ARCH} == "powerpcspe" || ${MACHINE_ARCH} == "arm" +SRCS+= spl_atomic.c +.endif + +#os/freebsd/zfs +SRCS+= abd_os.c \ + arc_os.c \ + crypto_os.c \ + dmu_os.c \ + event_os.c \ + hkdf.c \ + kmod_core.c \ + spa_os.c \ + sysctl_os.c \ + vdev_geom.c \ + vdev_label_os.c \ + zfs_acl.c \ + zfs_ctldir.c \ + zfs_crrd.c \ + zfs_debug.c \ + zfs_dir.c \ + zfs_ioctl_compat.c \ + zfs_ioctl_os.c \ + zfs_racct.c \ + zfs_vfsops.c \ + zfs_vnops_os.c \ + zfs_znode_os.c \ + zio_crypt.c \ + zvol_os.c + +#unicode +SRCS+= u8_textprep.c + +#zcommon +SRCS+= zfeature_common.c \ + zfs_comutil.c \ + zfs_deleg.c \ + zfs_fletcher.c \ + zfs_fletcher_avx512.c \ + zfs_fletcher_intel.c \ + zfs_fletcher_sse.c \ + zfs_fletcher_superscalar.c \ + zfs_fletcher_superscalar4.c \ + zfs_namecheck.c \ + zfs_prop.c \ + zfs_valstr.c \ + zpool_prop.c \ + zprop_common.c + +#zfs +SRCS+= abd.c \ + aggsum.c \ + arc.c \ + blake3_zfs.c \ + blkptr.c \ + bplist.c \ + bpobj.c \ + brt.c \ + btree.c \ + cityhash.c \ + dbuf.c \ + dbuf_stats.c \ + bptree.c \ + bqueue.c \ + dataset_kstats.c \ + ddt.c \ + ddt_log.c \ + ddt_stats.c \ + ddt_zap.c \ + dmu.c \ + dmu_direct.c \ + dmu_diff.c \ + dmu_object.c \ + dmu_objset.c \ + dmu_recv.c \ + dmu_redact.c \ + dmu_send.c \ + dmu_traverse.c \ + dmu_tx.c \ + dmu_zfetch.c \ + dnode.c \ + dnode_sync.c \ + dsl_dataset.c \ + dsl_deadlist.c \ *** 1172 LINES SKIPPED ***