OpenZFS/src 9acedbaconfig kernel-blkdev.m4

config: Fix LLVM-21 -Wuninitialized-const-pointer warning

LLVM-21 enables -Wuninitialized-const-pointer which results in the
following compiler warning and the bdev_file_open_by_path() interface
not being detected for 6.9 and newer kernels.  The blk_holder_ops
are not used by the ZFS code so we can safely use a NULL argument
for this check.

    bdev_file_open_by_path/bdev_file_open_by_path.c:110:54: error:
    variable 'h' is uninitialized when passed as a const pointer
    argument here [-Werror,-Wuninitialized-const-pointer]

Reviewed-by: Rob Norris <robn at despairlabs.com>
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes #17682
Closes #17684
DeltaFile
+3-6config/kernel-blkdev.m4
+3-61 files

OpenZFS/src 5a8ba45man/man1 arcstat.1 cstyle.1, man/man4 spl.4 zfs.4

manuals: Audit/bump dates for last content change

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Alexander Ziaee <ziaee at FreeBSD.org>
Closes #17676
DeltaFile
+1-1man/man1/arcstat.1
+1-1man/man1/cstyle.1
+1-1man/man1/zhack.1
+1-1man/man1/ztest.1
+1-1man/man4/spl.4
+1-1man/man4/zfs.4
+6-666 files not shown
+72-7272 files

OpenZFS/src ccf5a8aconfig user-statx.m4, include/os/linux/spl/sys stat.h

linux: use sys/stat.h instead of linux/stat.h

glibc includes linux/stat.h for statx, but musl defines its own statx
struct and associated constants, which does not include STATX_MNT_ID
yet. Thus, including linux/stat.h directly should be avoided for
maximum libc compatibility.

Tested on:
  - glibc: x86_64, i686, aarch64, armv7l, armv6l
  - musl: x86_64, aarch64, armv7l, armv6l

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Tested-By: Achill Gilgenast <achill at achill.org>
Signed-off-by: classabbyamp <dev at placeviolette.net>
Closes #17675
DeltaFile
+3-3config/user-statx.m4
+1-1include/os/linux/spl/sys/stat.h
+1-1lib/libspl/include/os/linux/sys/stat.h
+5-53 files

OpenZFS/src 1da2c30contrib/pam_zfs_key pam_zfs_key.c

Update pam_zfs_key.c defaultt path for FreeBSD

As described in https://github.com/freebsd/freebsd-src/pull/1305,
FreeBSD's installer defaults to zroot/home for user home directories.

For FreeBSD only, set the default prefix for pam_zfs_key to match.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Eric A. Borisch <eborisch at gmail.com>
Closes #17600
DeltaFile
+4-0contrib/pam_zfs_key/pam_zfs_key.c
+4-01 files

OpenZFS/src 976f765cmd/zpool Makefile.am, cmd/zpool/compatibility.d openzfs-2.4

Update compatibility.d files

Add an openzfs-2.4 compatibility file for the next release.

While there are no compatibility difference between Linux and
FreeBSD for 2.4 symlinks for the -linux and -freebsd names are
created for any scripts expecting that convention.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: ofthesun9 <olivier at ofthesun.net>
Closes #17672
Closes #17673
DeltaFile
+48-0cmd/zpool/compatibility.d/openzfs-2.4
+4-1cmd/zpool/Makefile.am
+52-12 files

OpenZFS/src ee7c362man/man8 zfs-list.8

Add description of default sorting behavior to zfs_list.8

The sorting logic is all in cmd/zfs/zfs_iter.c.  I borrowed
where I could from the comments in the source code, but please
note that the comment to zfs_sort() is a little imprecise, or at
least incomplete, because it doesn't give any indication of the
chronological sort that will be used by default for snapshots in
zfs_compare().

While adding this description, I took the liberty to copy-edit
the rest of the file lightly.

In those edits, I've removed "If specified, you can list
property information by the absolute pathname or the relative
pathname" because, in context, it seems more confusing than
helpful.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: George Melikov <mail at gmelikov.ru>

    [4 lines not shown]
DeltaFile
+27-18man/man8/zfs-list.8
+27-181 files

OpenZFS/src 14bad10config always-compiler-options.m4 zfs-build.m4, module Kbuild.in

config: add and use KERNEL_CC check for `-Wno-format-zero-length`

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Ivan Shapovalov <intelfx at intelfx.name>
Closes #16997
DeltaFile
+28-0config/always-compiler-options.m4
+1-1module/Kbuild.in
+1-0config/zfs-build.m4
+30-13 files

OpenZFS/src e903177config always-compiler-options.m4

config: cleanup KERNEL_CC checks, fix broken status output

If $KERNEL_CC was not defined, configure status output would print an
empty string where the kernel compiler should have been. Fix this and
simplify the code generally.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Ivan Shapovalov <intelfx at intelfx.name>
Closes #16997
DeltaFile
+16-22config/always-compiler-options.m4
+16-221 files

OpenZFS/src d247538tests/runfiles linux.run, tests/zfs-tests/include commands.cfg

ZTS: add mount_loopback to test zfs behind loop dev

Add a test case to reproduce issue #17277:

1. Make a pool
2. Write a file to the pool
3. Mount the file as a loopback device
4. Make an XFS filesystem on the loopback device
5. Mount the XFS filesystem... <hangs>

Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Reviewed-by: Rob Norris <robn at despairlabs.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Tony Hutter <hutter2 at llnl.gov>
Issue #17277
Closes #17329
DeltaFile
+111-0tests/zfs-tests/tests/functional/mount/mount_loopback.ksh
+1-1tests/runfiles/linux.run
+2-0tests/zfs-tests/include/commands.cfg
+1-0tests/zfs-tests/tests/Makefile.am
+115-14 files

OpenZFS/src 0d54ae2cmd/zdb zdb.c

zdb: Fix format strings on 32-bit systems

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Mark Johnston <markj at FreeBSD.org>
Closes #17665
DeltaFile
+4-4cmd/zdb/zdb.c
+4-41 files

OpenZFS/src b6bd322cmd zhack.c, module/zfs zfeature.c

Synchronize the update of feature refcount

The concurrent execution of feature_sync() can lead to a panic due 
to an unprotected update of the feature refcount.  Resolve this by
using the spa->spa_feat_stats_lock to synchronize the update of the 
refcount.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Youzhong Yang <yyang at mathworks.com>
Closes #17184
Closes #17632 
DeltaFile
+5-0module/zfs/zfeature.c
+4-0cmd/zhack.c
+9-02 files

OpenZFS/src e7485d0contrib/initramfs/hooks zfsunlock.in

Prompt user to unlock when login from dropbear

Update the zfsunlock initramfs hook to provide instructions on how
to unlock the root filesystem when appropriate.  The intent is to
make the dropbear ssh MOTD more user friendly.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Ahelenia Ziemiańska <nabijaczleweli at nabijaczleweli.xyz>
Signed-off-by: Cong Zhang <13283869+congzhangzh at users.noreply.github.com>
Closes #17661
Closes #17662 
DeltaFile
+9-0contrib/initramfs/hooks/zfsunlock.in
+9-01 files

OpenZFS/src f1f7457. META

Update META

Increase the version to 2.4.99 to indicate the master branch is
newer than the 2.4.x release.  This ensures packages built from
master branch are considered to be newer than the last release.

Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
DeltaFile
+2-2META
+2-21 files

OpenZFS/src 00dfa09. META

Tag 2.4.0-rc1

Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
DeltaFile
+2-2META
+2-21 files

OpenZFS/src 28ff575module/os/freebsd/zfs zfs_ctldir.c zfs_vnops_os.c

FreeBSD: satisfy VFS requirements for readdir()

zfsctl_root_readdir(): properly set eof.
readdir(): set *eofp to 1 on eof.
If there were no dirents to copy out, return EINVAL same as UFS.

Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Konstantin Belousov <kib at FreeBSD.org>
Closes #17655
DeltaFile
+28-14module/os/freebsd/zfs/zfs_ctldir.c
+4-2module/os/freebsd/zfs/zfs_vnops_os.c
+32-162 files

OpenZFS/src 94413bccmd/zdb zdb.c

zdb: Filter log spacemaps by vdev

When requested to dump metaslabs only for specific vdev, apply the
filter also to log spacemaps to reduce the output.  Unfortunately
filtering by metaslab numbers is more difficult so leave those.

While there, tune the output formatting.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Alexander Motin <alexander.motin at TrueNAS.com>
Closes #17643
DeltaFile
+22-15cmd/zdb/zdb.c
+22-151 files

OpenZFS/src 574eec2include/sys dnode.h dmu_impl.h, module/zfs dnode.c dbuf.c

dnode: remove dn_dirtyctx and dnode_dirtycontext

Only used for a couple of debug assertions which had very little value.

Setting it required taking certain locks, so we can remove all that too.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Robert Evans <evansr at google.com>
Reviewed-by: Adam Moss <c at yotes.com>
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Rob Norris <rob.norris at klarasystems.com>
Closes #16297
Closes #17652
Closes #17658
DeltaFile
+0-31module/zfs/dnode.c
+0-19module/zfs/dbuf.c
+0-8include/sys/dnode.h
+0-1include/sys/dmu_impl.h
+0-594 files

OpenZFS/src aa6f0f8include/sys dmu_impl.h dnode.h, module/zfs dnode.c

dnode: remove dn_dirtyctx_firstset

Old debug param, not used for anything.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Robert Evans <evansr at google.com>
Reviewed-by: Adam Moss <c at yotes.com>
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Rob Norris <rob.norris at klarasystems.com>
Closes #16297
Closes #17652
Closes #17658
DeltaFile
+0-7module/zfs/dnode.c
+0-1include/sys/dmu_impl.h
+0-1include/sys/dnode.h
+0-93 files

OpenZFS/src eecff1binclude/sys dnode.h dmu_impl.h, module/zfs dnode.c dbuf.c

dnode: remove dn_dirty_txg and DNODE_IS_DIRTY

dn_dirty_txg only existed for DNODE_IS_DIRTY(). In turn, that only
existed to ensure that a dnode was clean before making it eligible for
removal from the array of cached dnodes attached to the object 0 L0
dbuf.

dn_dirtycnt is enough to check that now, so use it directly and remove
the rest.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Robert Evans <evansr at google.com>
Reviewed-by: Adam Moss <c at yotes.com>
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Rob Norris <rob.norris at klarasystems.com>
Closes #16297
Closes #17652
Closes #17658
DeltaFile
+2-8module/zfs/dnode.c
+0-4include/sys/dnode.h
+0-2module/zfs/dbuf.c
+0-1include/sys/dmu_impl.h
+2-154 files

OpenZFS/src f3e49b0module/zfs dnode.c

dnode_is_dirty: reimplement in terms of dn_dirtycnt

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Robert Evans <evansr at google.com>
Reviewed-by: Adam Moss <c at yotes.com>
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Rob Norris <rob.norris at klarasystems.com>
Closes #16297
Closes #17652
Closes #17658
DeltaFile
+7-18module/zfs/dnode.c
+7-181 files

OpenZFS/src 3abf72binclude/sys dnode.h dmu_impl.h, module/zfs dnode.c dmu_objset.c

dnode: add dn_dirtycnt, count of number of txgs this dnode is dirty on

Bumped when we take the dirty hold in dnode_setdirty(), dropped when the
dnode is finally cleaned up after sync in dnode_rele_task() or
userquota_updates_task().

This gives us a way to check if the dnode is dirty on any txg without
having to rely on outside information (eg presence on a dirty list),
which has been a rich source of bugs in the past.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Suggested-by: Robert Evans <evansr at google.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Robert Evans <evansr at google.com>
Reviewed-by: Adam Moss <c at yotes.com>
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Rob Norris <rob.norris at klarasystems.com>
Closes #16297

    [2 lines not shown]
DeltaFile
+23-7module/zfs/dnode.c
+6-0module/zfs/dmu_objset.c
+1-0include/sys/dnode.h
+1-0include/sys/dmu_impl.h
+31-74 files

OpenZFS/src 34f96a1. META

Tag zfs-2.3.4

META file and changelog updated.

Signed-off-by: Tony Hutter <hutter2 at llnl.gov>
DeltaFile
+1-1META
+1-11 files

OpenZFS/src fdb5078.github/workflows zfs-qemu.yml, .github/workflows/scripts qemu-5-setup.sh qemu-2-start.sh

CI: Add Debian 13 to the FULL_OS runner list

This commit adds Debian 13 alias Trixie to the checked operating
systems. The image needs to be run with UEFI support.

Current Debian version overview:
- Debian 11 (Bullseye) -> "oldoldstable"
- Debian 12 (Bookworm) -> "oldstable"
- Debian 13 (Trixie) -> new "stable"

The CI will be run on Debian 12 and Debian 13 now.
Debian 11 is kept, but won't be used automatically.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: Tino Reichardt <milky-zfs at mcmilk.de>
Closes #17648
DeltaFile
+12-2.github/workflows/scripts/qemu-5-setup.sh
+13-1.github/workflows/scripts/qemu-2-start.sh
+3-3.github/workflows/zfs-qemu.yml
+1-1.github/workflows/scripts/qemu-3-deps-vm.sh
+29-74 files

OpenZFS/src 8cca55fcontrib/debian rules.in

Debian rules: install scripts/objtool-wrapper.in into dkms tree

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Attila Fülöp <attila at fueloep.org>
Signed-off-by: Shengqi Chen <harry-chen at outlook.com>
Closes #17633
Closes #17646
DeltaFile
+1-1contrib/debian/rules.in
+1-11 files

OpenZFS/src ef1ee94contrib/debian rules.in

objtool-wrapper: Update Debian packaging

6cf17f65 (#17456) introduced a change to `configure.ac` which
breaks the patching done in the Debian packages DKMS source
installation phase. This results in a failed module build.

Adapt the awk script doing the patching to handle the added
`AC_CONFIG_FILE` entry.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Tested-by: Shengqi Chen <harry-chen at outlook.com>
Signed-off-by: Attila Fülöp <attila at fueloep.org>
Closes #17633
Closes #17646
DeltaFile
+2-2contrib/debian/rules.in
+2-21 files

OpenZFS/src 14d2480.github/workflows zfs-qemu.yml, .github/workflows/scripts qemu-2-start.sh qemu-5-setup.sh

CI: Add Debian 13 to the FULL_OS runner list

This commit adds Debian 13 alias Trixie to the checked operating
systems. The image needs to be run with UEFI support.

Current Debian version overview:
- Debian 11 (Bullseye) -> "oldoldstable"
- Debian 12 (Bookworm) -> "oldstable"
- Debian 13 (Trixie) -> new "stable"

The CI will be run on Debian 12 and Debian 13 now.
Debian 11 is kept, but won't be used automatically.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: Tino Reichardt <milky-zfs at mcmilk.de>
Closes #17648
DeltaFile
+13-1.github/workflows/scripts/qemu-2-start.sh
+12-2.github/workflows/scripts/qemu-5-setup.sh
+3-3.github/workflows/zfs-qemu.yml
+1-1.github/workflows/scripts/qemu-3-deps-vm.sh
+29-74 files

OpenZFS/src 79a59aecontrib/debian rules.in

Debian rules: install scripts/objtool-wrapper.in into dkms tree

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Attila Fülöp <attila at fueloep.org>
Signed-off-by: Shengqi Chen <harry-chen at outlook.com>
Closes #17633
Closes #17646
DeltaFile
+1-1contrib/debian/rules.in
+1-11 files

OpenZFS/src 2d79284contrib/debian rules.in

objtool-wrapper: Update Debian packaging

6cf17f65 (#17456) introduced a change to `configure.ac` which
breaks the patching done in the Debian packages DKMS source
installation phase. This results in a failed module build.

Adapt the awk script doing the patching to handle the added
`AC_CONFIG_FILE` entry.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Tested-by: Shengqi Chen <harry-chen at outlook.com>
Signed-off-by: Attila Fülöp <attila at fueloep.org>
Closes #17633
Closes #17646
DeltaFile
+2-2contrib/debian/rules.in
+2-21 files

OpenZFS/src a9410cclib/libzutil zutil_import.c

Make zpool_find_config() report errors

All of zpool_find_config() callers now set lpc_printerr.  Actually
printing the errors when pool can not be found should make zdb a
half percent less confusing.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Alexander Motin <alexander.motin at TrueNAS.com>
Closes #17642
DeltaFile
+29-16lib/libzutil/zutil_import.c
+29-161 files

OpenZFS/src 2c877e8module/os/freebsd/zfs zfs_vnops_os.c zfs_ctldir.c

FreeBSD: Set st_rdev to NODEV, not 0, when not a device

Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Dag-Erling Smørgrav <des at FreeBSD.org>
Closes #17649
DeltaFile
+1-1module/os/freebsd/zfs/zfs_vnops_os.c
+1-1module/os/freebsd/zfs/zfs_ctldir.c
+2-22 files