OpenZFS/src f041375include/os/linux/spl/sys kmem.h, module/os/linux/spl spl-kmem-cache.c

kmem: don't add __GFP_COMP for KM_VMEM allocations

It hasn't been necessary since Linux 3.13
(torvalds/linux at a57a49887eb33), and since 6.19 the kernel warns if you
use it.

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <robn at despairlabs.com>
Closes #18053
DeltaFile
+4-1include/os/linux/spl/sys/kmem.h
+1-1module/os/linux/spl/spl-kmem-cache.c
+5-22 files

OpenZFS/src f95e306module/os/linux/spl spl-kmem.c spl-kmem-cache.c

kmem: don't pass __GFP_HIGHMEM to __vmalloc

Since Linux 4.12 (torvalds/linux at 19809c2da28ae) __GFP_HIGHMEM has been
automatically added to calls to __vmalloc() internally, so we don't need
it anymore. This is good, because since 6.19 the kernel warns if you use
__GFP_HIGHMEM.

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <robn at despairlabs.com>
Closes #18053
DeltaFile
+2-2module/os/linux/spl/spl-kmem.c
+1-1module/os/linux/spl/spl-kmem-cache.c
+3-32 files

OpenZFS/src 3c8665cconfig kernel-inode-state.m4 kernel.m4, include/os/linux/kernel/linux vfs_compat.h

Linux 6.19: replace i_state access with inode_state_read_once()

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <robn at despairlabs.com>
Closes #18053
DeltaFile
+23-0config/kernel-inode-state.m4
+8-0include/os/linux/kernel/linux/vfs_compat.h
+2-1module/os/linux/zfs/zfs_vnops_os.c
+2-0config/kernel.m4
+35-14 files

OpenZFS/src 3c41933cmd/zed/zed.d history_event-zfs-list-cacher.sh.in, contrib/dracut/90zfs mount-zfs.sh.in

zed.d, contrib: fix shellcheck errors in scripts

Not sure why this was not caught by CI; perhaps my shellcheck is new
enough to catch more things.

Signed-off-by: Ivan Shapovalov <intelfx at intelfx.name>
DeltaFile
+1-1contrib/dracut/90zfs/mount-zfs.sh.in
+1-0cmd/zed/zed.d/history_event-zfs-list-cacher.sh.in
+2-12 files

OpenZFS/src 1e7280ccmd/zfs zfs_main.c

zfs_main: cosmetic: add missing flag to the comment for create

Signed-off-by: Ivan Shapovalov <intelfx at intelfx.name>
DeltaFile
+1-1cmd/zfs/zfs_main.c
+1-11 files

OpenZFS/src e28d980man/man8 zfs-create.8 zfs-rename.8

man: cosmetic: fix typos; use consistent spelling for "non-existing"

Signed-off-by: Ivan Shapovalov <intelfx at intelfx.name>
DeltaFile
+1-1man/man8/zfs-create.8
+1-1man/man8/zfs-rename.8
+2-22 files

OpenZFS/src 9880ac3module/zcommon zfs_prop.c

zvol: cosmetic: fix up `volthreading` property short name

Signed-off-by: Ivan Shapovalov <intelfx at intelfx.name>
DeltaFile
+2-2module/zcommon/zfs_prop.c
+2-21 files

OpenZFS/src 654e762lib/libzpool Makefile.am, module Kbuild.in Makefile.bsd

u8_textprep: move into module/zfs

Now that it's built into the main zfs module in all cases, there's no
reason to put it in its own dir.

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <robn at despairlabs.com>
Closes #18071
DeltaFile
+0-2,171module/unicode/u8_textprep.c
+2,171-0module/zfs/u8_textprep.c
+1-6module/Kbuild.in
+1-3module/Makefile.bsd
+1-2lib/libzpool/Makefile.am
+2,174-2,1825 files

OpenZFS/src 309006alib Makefile.am, lib/libunicode Makefile.am

libunicode: merge into libzpool

It's a single source file that is not used anywhere else, so there's no
reason to keep it separate.

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <robn at despairlabs.com>
Closes #18071
DeltaFile
+0-6lib/libunicode/Makefile.am
+2-1lib/libzpool/Makefile.am
+0-1lib/Makefile.am
+2-83 files

OpenZFS/src 648a9a2.github/workflows zfs-qemu-packages.yml, .github/workflows/scripts qemu-test-repo-vm.sh

CI: Test 2.4.x in qemu-test-repo-vm.sh, quick mode

The qemu-test-repo-vm.sh script tests installs ZFS from different
repos.  Have it test from the new 2.4.x repos as well.

Also add a checkbox to run in "lookup mode".  This just does a
quick lookup to see what version is installed in each repo.  It does
not do a test install and module load.  It only takes 3min to run vs
over an hour for the full version.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Tino Reichardt <milky-zfs at mcmilk.de>
Signed-off-by: Tony Hutter <hutter2 at llnl.gov>
Closes #18070
DeltaFile
+23-4.github/workflows/scripts/qemu-test-repo-vm.sh
+12-1.github/workflows/zfs-qemu-packages.yml
+35-52 files

OpenZFS/src af9ae62tests/zfs-tests/tests/functional/raidz raidz_001_neg.ksh

ZFS: Enable more logs for raidz_001_neg

The output is not so big here, so lets collect something useful.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Rob Norris <robn at despairlabs.com>
Signed-off-by: Alexander Motin <alexander.motin at TrueNAS.com>
Closes #17977
DeltaFile
+1-1tests/zfs-tests/tests/functional/raidz/raidz_001_neg.ksh
+1-11 files

OpenZFS/src e3fe429.github/workflows zfs-qemu-packages.yml, .github/workflows/scripts qemu-test-repo-vm.sh

CI: zfs-test-packages: Add in new repos

Test install from our new repos: zfs-latest, zfs-legacy,
zfs-2.3, zfs-2.2, from the zfs-test-packages workflow.
This on-demand workflow is use to verify that the zfs RPMs
in the repos are correct.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Tony Hutter <hutter2 at llnl.gov>
Closes #17956
DeltaFile
+12-6.github/workflows/scripts/qemu-test-repo-vm.sh
+1-1.github/workflows/zfs-qemu-packages.yml
+13-72 files

OpenZFS/src 0afe9b6scripts commitcheck.sh

CI: exclude signed-off-by/reviewed-by from 72 char limit

Allow an author or reviewer's name and email address to exceed
the 72 character limit enforced by the commitcheck target.

Reviewed-by: RageLtMan <rageltman at sempervictus>
Reviewed-by: Rob Norris <robn at despairlabs.com>
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes #18030
DeltaFile
+3-1scripts/commitcheck.sh
+3-11 files

OpenZFS/src 0dcb882module/os/linux/zfs abd_os.c

Fix interaction of abd_iter_map()/abd_iter_unmap() with HIGHMEM

HIGHMEM kmap interfaces operate on only a single page at a time
yet ZFS hadn't accounted for this, resulting in crashes and
potential memory corruption on HIGHMEM (typically 32-bit) systems.
This was caught by PaX's KERNSEAL feature as it makes use of
HIGHMEM functionality on x64.

On typical 64-bit systems, this issue wouldn't have been observed,
as the map interfaces simply fall back to returning an address in
lowmem where the contiguous pages can be accessed directly.

Joint work with the PaX Team, tested by Mark van Dijk

Reviewed-by: RageLtMan <rageltman at sempervictus>
Reviewed-by: Rob Norris <robn at despairlabs.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: bspengler-oss <94915855+bspengler-oss at users.noreply.github.com>
Closes #15668
Closes #18030
DeltaFile
+15-2module/os/linux/zfs/abd_os.c
+15-21 files

OpenZFS/src 44e6a07include/os/freebsd/spl/sys mod_os.h, man/man4 zfs.4

ZIO: Set minimum number of free issue threads to 32

Free issue threads might block waiting for synchronous DDT, BRT or
GANG header reads. So unlike other taskqs using ZTI_SCALE to scale
with number of CPUs, here we also need some amount of threads to
potentially saturate pool reads.  I am not sure we always want the
96 threads we had before ZTI_SCALE introduction at #11966 on small
systems, but lets make it at least 32.

While here, make free taskqs configurable, similar to read and
write ones.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Rob Norris <robn at despairlabs.com>
Signed-off-by: Alexander Motin <alexander.motin at TrueNAS.com>
Closes #17903
DeltaFile
+86-18module/zfs/spa.c
+38-0man/man4/zfs.4
+3-0include/os/freebsd/spl/sys/mod_os.h
+127-183 files

OpenZFS/src 08d34f2lib/libzfs libzfs_status.c

Suppress some ashift warnings

Do not warn about vdev ashifts being smaller then physical ashifts
in a pool status if the pool ashift property set and vdev ashift
satisfies it (bigger or equal), since user explicitly requested
this.  The ashift of individual vdevs are still reported.

Do not warn about vdev ashifts in zpool import, since it doesn't
matter much, and we don't even report individual vdevs ashifts
there.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Allan Jude <allan at klarasystems.com>
Reviewed-by: Rob Norris <rob.norris at klarasystems.com>
Signed-off-by: Alexander Motin <alexander.motin at TrueNAS.com>
Closes #17830
DeltaFile
+43-35lib/libzfs/libzfs_status.c
+43-351 files

OpenZFS/src 23d4ce6cmd/raidz_test raidz_test.c raidz_test.h

raidz_test: Set io_offset reasonably

 - io_offset of 1 makes no sense.  Set default to 0.
 - Initialize io_offset in all cases.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Rob Norris <robn at despairlabs.com>
Signed-off-by: Alexander Motin <alexander.motin at TrueNAS.com>
Closes #17977
DeltaFile
+1-1cmd/raidz_test/raidz_test.c
+1-1cmd/raidz_test/raidz_test.h
+2-22 files

OpenZFS/src 4f77b30module/os/linux/zfs zfs_uio.c

Fix HIGHMEM/kmap API violation in zfs_uiomove_bvec_impl()

Fix another instance where ZFS assumes multiple pages can be
mapped at once via zfs_kmap_local(), resulting in crashes and
potential memory corruption on HIGHMEM-enabled (typically 32-bit)
systems.

Reviewed-by: RageLtMan <rageltman at sempervictus>
Reviewed-by: Rob Norris <robn at despairlabs.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: bspengler-oss <94915855+bspengler-oss at users.noreply.github.com>
Closes #15668
Closes #18030
DeltaFile
+6-4module/os/linux/zfs/zfs_uio.c
+6-41 files

OpenZFS/src c87a1f7cmd/raidz_test raidz_test.c

raidz_test: Restore rand_data protection

It feels dirty to modify protection of a memory allocated via libc,
but at least we should try to restore it before freeing.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Rob Norris <robn at despairlabs.com>
Signed-off-by: Alexander Motin <alexander.motin at TrueNAS.com>
Closes #17977
DeltaFile
+2-0cmd/raidz_test/raidz_test.c
+2-01 files

OpenZFS/src b2d052ecmd/raidz_test raidz_test.c

raidz_test: Fix ZIO ABDs initialization

 - When filling ABDs of several segments, consider offset.
 - "Corrupt" ABDs with actually different data to fail something.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Rob Norris <robn at despairlabs.com>
Signed-off-by: Alexander Motin <alexander.motin at TrueNAS.com>
Closes #17977
DeltaFile
+16-3cmd/raidz_test/raidz_test.c
+16-31 files

OpenZFS/src 00ab445.github/workflows zfs-qemu-packages.yml zfs-qemu.yml

CI: Change timeout values

The 'Setup QEMU' CI step updates and installs all packages necessary to
startup QEMU.  Typically the step takes a little over a minute, but
we've seen cases where it can take legitimately take more than 45min
minutes.  Change the timeout to 60 minutes.

In addition, change the 'Install dependencies' timeout to 60min since
we've also seen timeouts there.

Lastly, remove all timeouts from the zfs-qemu-packages workflow.
We do this so that we can always build packages from a branch, even if
the time it takes to do a CI step changes over time.  It's ok to
eliminate the timeouts from the zfs-qemu-packages completely since that
workflow is only run manually.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Tony Hutter <hutter2 at llnl.gov>
Closes #18056
DeltaFile
+0-5.github/workflows/zfs-qemu-packages.yml
+2-2.github/workflows/zfs-qemu.yml
+2-72 files

OpenZFS/src e51c8c0tests/zfs-tests/include libtest.shlib

CI: Fix Ubuntu 22.01 rsend failures

For whatever reason, the single `log_note` in the `directory_diff`
function causes the function to stop executing on Ubuntu 22.  This
causes most of the rsend tests to fail.  Remove the line since it's only
informational.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Tony Hutter <hutter2 at llnl.gov>
Closes #18032
DeltaFile
+0-2tests/zfs-tests/include/libtest.shlib
+0-21 files

OpenZFS/src e35fdeb.github/workflows/scripts qemu-1-setup.sh

CI: Use Ubuntu mirrors instead of azure (#18057)

Use the official Ubuntu apt mirrors instead of
azure.archive.ubuntu.com, since that mirror can be slow:

    https://github.com/actions/runner-images/issues/7048

This can help speed up the 'Setup QEMU' stage.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Tony Hutter <hutter2 at llnl.gov>
Closes #18057
DeltaFile
+14-0.github/workflows/scripts/qemu-1-setup.sh
+14-01 files

OpenZFS/src 4458796module/zfs abd.c

Preserve LIFO ordering of kmap ops in abd_raidz_gen_iterate()

ZFS typically preserves proper LIFO ordering regarding map/unmap
operations that wrap the Linux kernel's kmap interfaces that
require such ordering, but one instance in abd_raidz_gen_iterate()
did not.

Similar issues have been fixed in the Linux kernel in the past,
see for instance CVE-2025-39899 for userfaultfd.

Reviewed-by: RageLtMan <rageltman at sempervictus>
Reviewed-by: Rob Norris <robn at despairlabs.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: bspengler-oss <94915855+bspengler-oss at users.noreply.github.com>
Closes #15668
Closes #18030
DeltaFile
+8-8module/zfs/abd.c
+8-81 files

OpenZFS/src 1397bf1cmd/zpool zpool_vdev.c

Explicit set ashift for non-leaf vdevs

Before this change ashift property was applied only to a leaf
vdevs.  As result, it worked only as a minimal value for parent
vdevs, since bigger physical_ashift value reported by any child
could be used instead when deciding parent's ashift, as if the
ashift property was never set.

This change explicitly passes ZPOOL_CONFIG_ASHIFT to all vdevs,
allowing override for parents only if the passed value is below
logical_ashift and so unacceptable.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Allan Jude <allan at klarasystems.com>
Reviewed-by: Rob Norris <rob.norris at klarasystems.com>
Signed-off-by: Alexander Motin <alexander.motin at TrueNAS.com>
Closes #17826
DeltaFile
+33-31cmd/zpool/zpool_vdev.c
+33-311 files

OpenZFS/src 0d44b58lib/libshare nfs.c, lib/libshare/os/linux nfs.c smb.c

libshare: fold into libzfs and reorg headers a little

libzfs is the only user of libshare, and only internally, so there's no
particular reason to build it separately, nor to export its symbols. So,
pull it into libzfs proper, remove its "public" header, and hide its
symbols.

The bare minimum "public" API is just to count and enumerate the
supported share types. These are moved to libzfs.h with the other share
API.

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <robn at despairlabs.com>
Closes #18072
DeltaFile
+0-587lib/libshare/os/linux/nfs.c
+585-0lib/libzfs/os/linux/libzfs_share_nfs.c
+218-222lib/libzfs/libzfs.abi
+0-407lib/libshare/os/linux/smb.c
+405-0lib/libzfs/os/linux/libzfs_share_smb.c
+0-318lib/libshare/nfs.c
+1,208-1,53421 files not shown
+2,237-2,34927 files

OpenZFS/src 962e688module/zfs dsl_scan.c spa_misc.c

Use reduced precision for scan times

Scan time limits do not need precision beyond 1ms.  Switching
scn_sync_start_time and spa_sync_starttime from gethrtime() to
getlrtime() saves ~3% of CPU time during resilver scan stage.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Alexander Motin <alexander.motin at TrueNAS.com>
Closes #18061
DeltaFile
+13-13module/zfs/dsl_scan.c
+1-1module/zfs/spa_misc.c
+1-1module/zfs/spa.c
+15-153 files

OpenZFS/src a83bb15man/man4 zfs.4, module/zfs dsl_scan.c

Reduce minimal scrub/resilver times

With higher throughput and lower latency of modern devices ZFS can
happily live with pretty short (fractions of a second) TXGs.  But
the two decade old multi-second minimal time limits can almost stop
payload writes by extending TXGs beyond dirty data limits of ARC
ability to amortize it.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Alexander Motin <alexander.motin at TrueNAS.com>
Closes #18060
DeltaFile
+2-2man/man4/zfs.4
+2-2module/zfs/dsl_scan.c
+4-42 files

OpenZFS/src 7433349. META

Tag 2.4.0

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

OpenZFS/src 2143bff.github/workflows zfs-qemu-packages.yml zfs-qemu.yml

CI: Change timeout values

The 'Setup QEMU' CI step updates and installs all packages necessary to
startup QEMU.  Typically the step takes a little over a minute, but
we've seen cases where it can take legitimately take more than 45min
minutes.  Change the timeout to 60 minutes.

In addition, change the 'Install dependencies' timeout to 60min since
we've also seen timeouts there.

Lastly, remove all timeouts from the zfs-qemu-packages workflow.
We do this so that we can always build packages from a branch, even if
the time it takes to do a CI step changes over time.  It's ok to
eliminate the timeouts from the zfs-qemu-packages completely since that
workflow is only run manually.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Tony Hutter <hutter2 at llnl.gov>
Closes #18056
DeltaFile
+0-5.github/workflows/zfs-qemu-packages.yml
+2-2.github/workflows/zfs-qemu.yml
+2-72 files