OpenZFS/src c5905b2include libzfs_core.h, lib/libzfs libzfs_sendrecv.c

Implement lzc_send_progress

This commit adds an implementation of lzc_send_progress, which
existed in the libzfs_core header, but not in ABI and lacked
an actual implementation. The libzfs_send_progress function
is altered so that it wraps around the lzc operation. This
fills a functional gap in libzfs core.

Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Ameer Hamza <ahamza at ixsystems.com>
Signed-off-by: Andrew Walker <andrew.walker at truenas.com>
Closes #18288
DeltaFile
+33-0lib/libzfs_core/libzfs_core.c
+2-15lib/libzfs/libzfs_sendrecv.c
+8-0lib/libzfs_core/libzfs_core.abi
+1-1include/libzfs_core.h
+44-164 files

OpenZFS/src c58b8b7config toolchain-cfi.m4 zfs-build.m4, module/icp/asm-aarch64/blake3 b3_aarch64_sse2.S b3_aarch64_sse41.S

Fix check for .cfi_negate_ra_state on aarch64

Checking for LD_VERSION in unreliable as not all distros define it on
the compiler's preprocessor.

Explicitly check it via autoconf.

This fixes support for Ubuntu 18.04 on arm64.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Juhyung Park <qkrwngud825 at gmail.com>
Closes #18262
DeltaFile
+33-0config/toolchain-cfi.m4
+2-2module/icp/asm-aarch64/blake3/b3_aarch64_sse2.S
+2-2module/icp/asm-aarch64/blake3/b3_aarch64_sse41.S
+1-0config/zfs-build.m4
+38-44 files

OpenZFS/src e73ada7lib/libzpool zfs_file_os.c kernel.c

libzpool: lift zfs_file ops out to separate source file

So its easier to remove and replace on non-Unix platforms.

Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Jorgen Lundman <lundman at lundman.net>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18281
DeltaFile
+420-0lib/libzpool/zfs_file_os.c
+0-388lib/libzpool/kernel.c
+1-0lib/libzpool/Makefile.am
+421-3883 files

OpenZFS/src d979457cmd/zstream zstream_util.c zstream_util.h

zstream: consolidate shared code

zstream currently contains three identical copies of dump_record(),
which appear to all be drawn from libzfs_sendrecv.c. The original
is marked internal.

This PR adds zstream_util.[hc] and puts the shared code there along with
a couple of other items in common.

No functional changes.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Garth Snyder <garth at garthsnyder.com>
Closes #18284
DeltaFile
+106-0cmd/zstream/zstream_util.c
+60-0cmd/zstream/zstream_util.h
+1-53cmd/zstream/zstream_redup.c
+1-25cmd/zstream/zstream_recompress.c
+1-25cmd/zstream/zstream_decompress.c
+1-12cmd/zstream/zstream_dump.c
+170-1152 files not shown
+173-1198 files

OpenZFS/src 5dad945cmd/zfs zfs_main.c, include libzfs.h

Add --no-preserve-encryption flag

* Add an option to send datasets with params or replicate
without preserving encryption
* Add a test case for the new functionality

Reviewed-by: Paul Dagnelie <paul.dagnelie at klarasystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Chris Jacobs <idefix2020dev at gmail.com>
Closes #18240
DeltaFile
+31-15lib/libzfs/libzfs_sendrecv.c
+13-4man/man8/zfs-send.8
+7-3cmd/zfs/zfs_main.c
+8-0tests/zfs-tests/tests/functional/rsend/send_encrypted_props.ksh
+3-0include/libzfs.h
+62-225 files

OpenZFS/src c329530config Rules.am, include Makefile.am

Add simd_config.h and HAVE_SIMD() selector

We need to select which SIMD variable to check based on the compilation
target: HAVE_KERNEL_xxx for the Linux kernel, HAVE_TOOLCHAIN_xxx for
other platforms.

This adds a HAVE_SIMD() macro returns the right result depending on the
definedness or value of the variable for this target.

The macro is in simd_config.h, which is forcibly included in every
compiler call (like zfs_config.h), to ensure that it can be used
directly without further includes.

Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18285
DeltaFile
+102-0include/sys/simd_config.h
+5-2module/Makefile.bsd
+2-0module/Kbuild.in
+1-0include/Makefile.am
+1-0config/Rules.am
+111-25 files

OpenZFS/src 35f74f8include zfs_fletcher.h, include/sys vdev_raidz_impl.h

Convert all HAVE_<name> SIMD gates to HAVE_SIMD(<name>)

The original names no longer exist, and the new ones will need to be
selectable based on the current compilation target.

Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18285
DeltaFile
+8-8module/icp/algs/blake3/blake3_impl.c
+8-8include/zfs_fletcher.h
+8-8module/icp/algs/sha2/sha256_impl.c
+8-8module/icp/asm-x86_64/modes/aesni-gcm-x86_64.S
+6-6module/icp/algs/sha2/sha512_impl.c
+5-5include/sys/vdev_raidz_impl.h
+43-4327 files not shown
+113-11233 files

OpenZFS/src 92a6ab4config toolchain-simd.m4 kernel.m4

config: also do SIMD checks on the kernel toolchain

The kernel may be built with a different compiler, and also includes
objtool, which may fail on unknwon instructions sequences. So, we want
to run the checks a second time for that toolchain too.

Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18285
DeltaFile
+55-23config/toolchain-simd.m4
+2-0config/kernel.m4
+57-232 files

OpenZFS/src c183268config toolchain-simd.m4 zfs-build.m4

config: generate SIMD checks from table

No need to repeat all that boilerplate each time!

Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18285
DeltaFile
+44-372config/toolchain-simd.m4
+1-1config/zfs-build.m4
+45-3732 files

OpenZFS/src 23bd583config toolchain-simd.m4, module Makefile.bsd

config: remove checks for unused SIMD gates

Specifically, we don't have any code gated on:

    HAVE_SSE
    HAVE_SSE3
    HAVE_SSE4_2
    HAVE_AVX512CD
    HAVE_AVX512DQ
    HAVE_AVX512IFMA
    HAVE_AVX512VBMI
    HAVE_AVX512PF
    HAVE_AVX512ER

So we can remove them and the checks that probe and generate them.

Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18285
DeltaFile
+0-196config/toolchain-simd.m4
+1-1module/Makefile.bsd
+1-1972 files

OpenZFS/src e4b8d6ainclude/os/linux/kernel/linux simd_x86.h

linux/simd_x86: remove obsolete kernel feature gates

Most of the X86_FEATURE_* defines we use were introduced in kernels much
older than those we support, so there's no need to check for them.

For the history, these are the ones being removed, and the kernel
versions/commits where they were introduced:

    <4.6  torvalds/linux at cd4d09ec6f6c (refactor/consolidation commit)
        OSXSAVE
        BMI1
        BMI2
        AES
        PCLMULQDQ
        MOVBE
        SHA_NI
        AVX512F
        AVX512CD
        AVX512ER

    [19 lines not shown]
DeltaFile
+14-103include/os/linux/kernel/linux/simd_x86.h
+14-1031 files

OpenZFS/src 1e1d64dmodule/zfs zil.c vdev_removal.c, tests/runfiles common.run

Fix log vdev removal issues

When we clear the log, we should clear all the fields, not only
zh_log.  Otherwise remaining ZIL_REPLAY_NEEDED will prevent the
vdev removal.  Handle it also from the other side, when zh_log
is already cleared, while zh_flags is not.

spa_vdev_remove_log() asserts that allocated space on removed log
device is zero.  While it should be so in perfect world, it might
be not if space leaked at any point.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Alexander Motin <alexander.motin at TrueNAS.com>
Closes #18277
DeltaFile
+95-0tests/zfs-tests/tests/functional/removal/removal_with_missing_log.ksh
+16-4module/zfs/zil.c
+1-1tests/runfiles/common.run
+1-0tests/zfs-tests/tests/Makefile.am
+0-1module/zfs/vdev_removal.c
+113-65 files

OpenZFS/src f6205fdtests/zfs-tests/tests/functional/mmp mmp_on_uberblocks.ksh

ZTS: Adjust mmp_on_uberblocks threshold

Decrease the number of required uberblock blocks write slightly due
to observed variation when running in the CI.  This should help
avoid future false positives.

Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes #18280
DeltaFile
+1-1tests/zfs-tests/tests/functional/mmp/mmp_on_uberblocks.ksh
+1-11 files

OpenZFS/src 75659a4tests/test-runner/bin zts-report.py.in

ZTS: Add additional exceptions

The following tests have been observed to occasionally fail when
running under the CI.  Updated our exceptions list to track them.

Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes #18274
DeltaFile
+3-0tests/test-runner/bin/zts-report.py.in
+3-01 files

OpenZFS/src 1e2c94acmd/zed zed_strings.c, cmd/zfs zfs_main.c

More consistent use of TREE_* macros in AVL comparators

Where is it appropriate and obvious, use TREE_CMP(), TREE_ISIGN() and
TREE_PCMP() instead or direct comparisons. It can make the code a lot
smaller, less error prone, and easier to read.

Sponsored-by: TrueNAS
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18259
DeltaFile
+15-22module/zfs/zio.c
+10-22lib/libzdb/libzdb.c
+13-19cmd/zfs/zfs_main.c
+5-19module/os/linux/zfs/zfs_ctldir.c
+9-13module/zfs/dmu_redact.c
+3-19cmd/zed/zed_strings.c
+55-11413 files not shown
+88-19919 files

OpenZFS/src 0f90a79module/zfs vdev_rebuild.c

Fix vdev_rebuild_range() tx commit

The spa_sync thread waits on ->spa_txg_zio and will set ZIO_WAIT_DONE
before running the sync tasks.  The dmu_tx_commit() call must be done
after we add the child zio to the ->spa_txg_zio parent otherwise its
possible the child is added after txg_sync has waited.

Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes #18276
DeltaFile
+3-1module/zfs/vdev_rebuild.c
+3-11 files

OpenZFS/src ac0fd40include/sys/fs zfs.h, lib/libzfs libzfs.abi

Add zpool properties for allocation class space

The existing zpool properties accounting pool space (size, allocated,
fragmentation, expandsize, free, capacity) are based on the normal
metaslab class or are cumulative properties of several classes combined.

Add properties reporting the space accounting metrics for each metaslab
class individually.

Also introduce pool-wide AVAIL, USABLE, and USED properties reporting
values corresponding to FREE, SIZE, and ALLOC deflated for raidz.

Update ZTS to recognize the new properties and validate reported values.

While in zpool_get_parsable.cfg, add "fragmentation" to the list of
parsable properties.

Sponsored-by: Klara, Inc.
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>

    [4 lines not shown]
DeltaFile
+416-0tests/zfs-tests/tests/functional/cli_root/zpool_get/zpool_get_006_pos.ksh
+148-3man/man7/zpoolprops.7
+64-21module/zfs/spa.c
+81-0include/sys/fs/zfs.h
+72-3tests/zfs-tests/tests/functional/cli_root/zpool_get/zpool_get_parsable.cfg
+58-1lib/libzfs/libzfs.abi
+839-288 files not shown
+1,047-3614 files

OpenZFS/src 6ba3f91module/zcommon zpool_prop.c

zcommon: Fix description of vdev capacity format

Capacity is reported as a percentage not a size.

Sponsored-by: Klara, Inc.
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Ameer Hamza <ahamza at ixsystems.com>
Signed-off-by: Ryan Moeller <ryan.moeller at klarasystems.com>
Closes #18238
DeltaFile
+1-1module/zcommon/zpool_prop.c
+1-11 files

OpenZFS/src f8e5af5module/zfs vdev_rebuild.c

Fix redundant declaration of dsl_pool_t

Remove redundant dsl_pool variable and duplicate spa_get_dsl()
call in vdev_rebuild_thread.

Reviewed-by: Alexander Motin <mav at FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Akash B <akash-b at hpe.com>
Closes #18263
DeltaFile
+5-6module/zfs/vdev_rebuild.c
+5-61 files

OpenZFS/src f8457fbinclude/sys vdev_rebuild.h, module/zfs vdev_rebuild.c spa.c

Fix deadlock on dmu_tx_assign() from vdev_rebuild()

vdev_rebuild() is always called with spa_config_lock held in
RW_WRITER mode. However, when it tries to call dmu_tx_assign()
the latter may hang on dmu_tx_wait() waiting for available txg.
But that available txg may not happen because txg_sync takes
spa_config_lock in order to process the current txg. So we have
a deadlock case here:

 - dmu_tx_assign() waits for txg holding spa_config_lock;
 - txg_sync waits for spa_config_lock not progressing with txg.

Here are the stacks:

    __schedule+0x24e/0x590
    schedule+0x69/0x110
    cv_wait_common+0xf8/0x130 [spl]
    __cv_wait+0x15/0x20 [spl]
    dmu_tx_wait+0x8e/0x1e0 [zfs]

    [21 lines not shown]
DeltaFile
+4-5module/zfs/vdev_rebuild.c
+1-1include/sys/vdev_rebuild.h
+1-1module/zfs/spa.c
+6-73 files

OpenZFS/src f3d4c79config kernel-fst-mount.m4 kernel-fs-context.m4, module/os/linux/zfs zpl_super.c

zpl_super: prefer "new" mount API when available

This API has been available since kernel 5.2, and having it available
(almost) everywhere should give us a lot more flexibility for mount
management in the future.

Sponsored-by: TrueNAS
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18260
DeltaFile
+0-36config/kernel-fst-mount.m4
+33-0config/kernel-fs-context.m4
+12-15module/os/linux/zfs/zpl_super.c
+2-2config/kernel.m4
+47-534 files

OpenZFS/src 09c27a1module/icp/algs/sha2 sha512_impl.c, module/icp/asm-x86_64/sha2 sha512-x86_64.S

icp: add SHA512 implementation using Intel SHA512 extensions

Generated from crypto/sha/asm/sha512-x86_64.pl in
openssl/openssl at 241d4826f8.

Sponsored-by: TrueNAS
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Attila Fülöp <attila at fueloep.org>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18233
DeltaFile
+320-1module/icp/asm-x86_64/sha2/sha512-x86_64.S
+18-0module/icp/algs/sha2/sha512_impl.c
+338-12 files

OpenZFS/src 3547a35config toolchain-simd.m4, include/os/linux/kernel/linux simd_x86.h

simd: detect and surface support for Intel SHA512 extensions

Recent Intel CPUs (starting with Arrow Lake and Lunar Lake) include new
vectorised SHA512 instructions. Detect them and make them available to
the rest of the system.

Note the internal name "sha512ext". This is to disambiguate from other
uses of "sha512".

Sponsored-by: TrueNAS
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Attila Fülöp <attila at fueloep.org>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18233
DeltaFile
+22-0config/toolchain-simd.m4
+15-1lib/libspl/include/sys/simd.h
+14-0include/os/linux/kernel/linux/simd_x86.h
+2-0module/zcommon/simd_stat.c
+53-14 files

OpenZFS/src 6495dafmodule/zfs range_tree.c

range_tree: use zfs_panic_recover() for partial-overlap remove

zfs_range_tree_remove_impl() used a bare panic() when a segment to be
removed was not completely overlapped by an existing tree entry.  Every
other consistency check in range_tree.c uses zfs_panic_recover(), which
respects the zfs_recover tunable and allows pools with on-disk
corruption to be imported and recovered.  This one call was
inconsistent, making the partial-overlap case unrecoverable regardless
of zfs_recover.

Replace panic() with zfs_panic_recover() so that operators can set
zfs_recover=1 to import a corrupted pool and reclaim data, consistent
with all other range tree error paths.

Related-to: https://github.com/openzfs/zfs/issues/13483
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Clemens Fruhwirth <clemens at endorphin.org>
Co-authored-by: Claude Sonnet 4.6 <noreply at anthropic.com>
Closes #18255
DeltaFile
+1-1module/zfs/range_tree.c
+1-11 files

OpenZFS/src 4da3f05.github/workflows zfs-qemu.yml zfs-qemu-packages.yml, .github/workflows/scripts qemu-2-start.sh

CI: Remove deprecated Fedora 41

Fedora 41 was deprecated on Dec 15 2025.  Remove it from CI tests.

Reviewed-by: Rob Norris <robn at despairlabs.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: Tony Hutter <hutter2 at llnl.gov>
Closes #18261
DeltaFile
+0-5.github/workflows/scripts/qemu-2-start.sh
+1-1.github/workflows/zfs-qemu.yml
+1-1.github/workflows/zfs-qemu-packages.yml
+2-73 files

OpenZFS/src 991fc56lib/libzfs libzfs.abi, man/man7 zpoolprops.7

Introduce dedupused/dedupsaved pool properties

Currently there is only a dedup ratio reported via pool properties.
If dedup is enabled only for some datasets, it is impossible to say
how much space the ratio actually covers.  Fix this by introducing
dedupused/dedupsaved pool properties, similar to earlier added
block cloning ones.  Combined with work to expose allocation classes
stats, it should give user-space enough visibility to correlate
`zpool list` and `zfs list` space numbers.

Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Reviewed-by: Ryan Moeller <ryan.moeller at klarasystems.com>
Signed-off-by: Alexander Motin <alexander.motin at TrueNAS.com>
Closes #18245
DeltaFile
+15-0module/zfs/ddt_stats.c
+15-0man/man7/zpoolprops.7
+6-0module/zcommon/zpool_prop.c
+4-0module/zfs/spa.c
+3-1lib/libzfs/libzfs.abi
+2-2tests/zfs-tests/tests/functional/cli_root/zpool_get/zpool_get_parsable.cfg
+45-34 files not shown
+53-310 files

OpenZFS/src 3408332cmd zhack.c

zhack: Fix importing large allocation profiles on small pools (#18256)

This patch fixes a segmentation fault in zhack metaslab leak which might
be triggered by feeding zhack with a fragmentation profile that's
exported from a pool larger than the target pool.

Fixes: 8f15d2e4d58525e583277ccfef83f2056be4f72e
Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Paul Dagnelie <paul.dagnelie at klarasystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>

Signed-off-by: Mateusz Piotrowski <mateusz.piotrowski at klarasystems.com>
DeltaFile
+5-2cmd/zhack.c
+5-21 files

OpenZFS/src 0f608aaconfig kernel-fst-mount.m4, module/os/linux/zfs zpl_super.c

Linux 7.0: add shims for the fs_context-based mount API

The traditional mount API has been removed, so detect when its not
available and instead use a small adapter to allow our existing mount
functions to keep working.

Sponsored-by: TrueNAS
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18216
DeltaFile
+66-0module/os/linux/zfs/zpl_super.c
+6-1config/kernel-fst-mount.m4
+72-12 files

OpenZFS/src d34fd6cconfig kernel-acl.m4, include/os/linux/kernel/linux xattr_compat.h

Linux 7.0: posix_acl_to_xattr() now allocates memory

Kernel devs noted that almost all callers to posix_acl_to_xattr() would
check the ACL value size and allocate a buffer before make the call. To
reduce the repetition, they've changed it to allocate this buffer
internally and return it.

Unfortunately that's not true for us; most of our calls are from
xattr_handler->get() to convert a stored ACL to an xattr, and that call
provides a buffer. For now we have no other option, so this commit
detects the new version and wraps to copy the value back into the
provided buffer and then free it.

Sponsored-by: TrueNAS
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18216
DeltaFile
+31-0config/kernel-acl.m4
+17-0include/os/linux/kernel/linux/xattr_compat.h
+48-02 files

OpenZFS/src 204de94config kernel-blk-queue.m4, module/os/linux/zfs vdev_disk.c

Linux 7.0: blk_queue_nonrot() renamed to blk_queue_rot()

It does exactly the same thing, just inverts the return. Detect its
presence or absence and call the right one.

Sponsored-by: TrueNAS
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18216
DeltaFile
+26-0config/kernel-blk-queue.m4
+4-0module/os/linux/zfs/vdev_disk.c
+30-02 files