OpenZFS/src 54c7b32tests/runfiles linux.run, tests/zfs-tests/tests Makefile.am

ZTS: snapdir: ensure mounts only occur when accessing beyond the snapdir

On Linux, automount only occurs for paths that are "beyond" the snapdir.
Accessing the snapdir itself eg with `stat()` does not itself trigger
the automount. Confirm that this is the case.

Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Ameer Hamza <ahamza at ixsystems.com>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18705
DeltaFile
+57-0tests/zfs-tests/tests/functional/snapdir/snapdir_stat_no_mount.ksh
+2-1tests/runfiles/linux.run
+1-0tests/zfs-tests/tests/Makefile.am
+60-13 files

OpenZFS/src 7fe8f8btests/runfiles linux.run, tests/zfs-tests/include tunables.cfg

ZTS: snapdir: ensure the SNAPSHOT_NO_SUID tunable performs correctly

When set, zfs_snapshot_no_setuid will add the nosuid option to new
snapdir mounts, preventing setuid executables from being run as a
different user.

Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Ameer Hamza <ahamza at ixsystems.com>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18705
DeltaFile
+62-0tests/zfs-tests/tests/functional/snapdir/snapdir_mount_no_setuid.ksh
+1-1tests/runfiles/linux.run
+1-0tests/zfs-tests/tests/Makefile.am
+1-0tests/zfs-tests/include/tunables.cfg
+65-14 files

OpenZFS/src 89dad44tests/runfiles linux.run, tests/zfs-tests/include tunables.cfg

ZTS: snapdir: test that snapdir mounts are expired when idle

A snapdir mount that has not been used for some time should be
automatically unmounted. Test that that happens, and also that accessing
the mount resets the timer.

Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Ameer Hamza <ahamza at ixsystems.com>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18705
DeltaFile
+66-0tests/zfs-tests/tests/functional/snapdir/snapdir_mount_expire_busy.ksh
+56-0tests/zfs-tests/tests/functional/snapdir/snapdir_mount_expire_idle.ksh
+2-1tests/runfiles/linux.run
+2-0tests/zfs-tests/tests/Makefile.am
+1-0tests/zfs-tests/include/tunables.cfg
+127-15 files

OpenZFS/src 9b83297tests/runfiles common.run, tests/zfs-tests/tests Makefile.am

ZTS: snapdir: test that explicit unmount allows new automount

It's always possible to manually unmount a snapdir mount. When that
happens, the next access should mount the snapshot again, even though
the snapmount system may have no knowledge that the unmount actually
happened.

Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Ameer Hamza <ahamza at ixsystems.com>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18705
DeltaFile
+49-0tests/zfs-tests/tests/functional/snapdir/snapdir_mount_unmount.ksh
+35-0tests/zfs-tests/tests/functional/snapdir/snapdir.kshlib
+1-1tests/runfiles/common.run
+2-0tests/zfs-tests/tests/Makefile.am
+87-14 files

OpenZFS/src 9c5f5c8tests/runfiles linux.run, tests/zfs-tests/tests Makefile.am

ZTS: snapdir: test ADMIN_SNAPSHOT=0 prevents snapdir admin ops

Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Ameer Hamza <ahamza at ixsystems.com>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18705
DeltaFile
+67-0tests/zfs-tests/tests/functional/snapdir/snapdir_admin_disabled.ksh
+2-1tests/runfiles/linux.run
+1-0tests/zfs-tests/tests/Makefile.am
+70-13 files

OpenZFS/src 84b2aaatests/zfs-tests/tests/functional/snapshot snapshot_007_pos.ksh snapshot_003_pos.ksh

ZTS: snapshot: remove need for snapdir admin feature in snapshot tests

The only reason it was enabled/used was to remove the snapshot automount
dirs during cleanup. Those are already removed when the snapshot is
destroyed, so it doesn't need to be done at all.

Disabling it also helps to ensure that we aren't accidentally using it
or relying on side-effects in the snapshot tests proper. Those effects
should be tested separately in a snapdir test.

Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Ameer Hamza <ahamza at ixsystems.com>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18705
DeltaFile
+0-8tests/zfs-tests/tests/functional/snapshot/snapshot_007_pos.ksh
+0-5tests/zfs-tests/tests/functional/snapshot/snapshot_003_pos.ksh
+0-4tests/zfs-tests/tests/functional/snapshot/snapshot_006_pos.ksh
+0-4tests/zfs-tests/tests/functional/snapshot/cleanup.ksh
+0-4tests/zfs-tests/tests/functional/snapshot/setup.ksh
+0-4tests/zfs-tests/tests/functional/snapshot/snapshot_005_pos.ksh
+0-292 files not shown
+1-328 files

OpenZFS/src 79d0411tests/zfs-tests/tests/functional/snapdir snapdir_admin_create_destroy.ksh snapdir_admin_rename_destroy.ksh

ZTS: snapdir: limit ADMIN_SNAPSHOT tunable use to the tests that need it

Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Ameer Hamza <ahamza at ixsystems.com>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18705
DeltaFile
+10-0tests/zfs-tests/tests/functional/snapdir/snapdir_admin_create_destroy.ksh
+10-0tests/zfs-tests/tests/functional/snapdir/snapdir_admin_rename_destroy.ksh
+0-4tests/zfs-tests/tests/functional/snapdir/cleanup.ksh
+0-4tests/zfs-tests/tests/functional/snapdir/setup.ksh
+20-84 files

OpenZFS/src d903a35tests/zfs-tests/tests/functional/snapdir snapshot_015_pos.ksh snapdir_admin_create_destroy.ksh

ZTS: snapdir: cleanup

Rename tests to match their group and function, and removed unused
config vars.

Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Ameer Hamza <ahamza at ixsystems.com>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18705
DeltaFile
+0-122tests/zfs-tests/tests/functional/snapdir/snapshot_015_pos.ksh
+122-0tests/zfs-tests/tests/functional/snapdir/snapdir_admin_create_destroy.ksh
+0-97tests/zfs-tests/tests/functional/snapdir/snapshot_016_pos.ksh
+97-0tests/zfs-tests/tests/functional/snapdir/snapdir_admin_rename_destroy.ksh
+0-82tests/zfs-tests/tests/functional/snapdir/snapshot_019_pos.ksh
+82-0tests/zfs-tests/tests/functional/snapdir/snapdir_mount_parallel.ksh
+301-3015 files not shown
+307-32411 files

OpenZFS/src 73ba07ctests/zfs-tests/tests/functional/snapdir snapshot_015_pos.ksh snapshot_016_pos.ksh, tests/zfs-tests/tests/functional/snapshot snapshot_015_pos.ksh snapshot_016_pos.ksh

ZTS: create snapdir test group, move relevant tests from snapshot group

The intent of the snapdir group is to test the behaviour of the snapshot
automount and admin facility itself. The snapshot group is left to test
the behaviour of snapshots and the data within, without worrying about
the behaviour of snapdirs beyond them working to provide access to the
snapshot data via the filesystem.

Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Ameer Hamza <ahamza at ixsystems.com>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18705
DeltaFile
+122-0tests/zfs-tests/tests/functional/snapdir/snapshot_015_pos.ksh
+0-122tests/zfs-tests/tests/functional/snapshot/snapshot_015_pos.ksh
+97-0tests/zfs-tests/tests/functional/snapdir/snapshot_016_pos.ksh
+0-97tests/zfs-tests/tests/functional/snapshot/snapshot_016_pos.ksh
+0-82tests/zfs-tests/tests/functional/snapshot/snapshot_019_pos.ksh
+82-0tests/zfs-tests/tests/functional/snapdir/snapshot_019_pos.ksh
+301-3017 files not shown
+453-30813 files

OpenZFS/src 08a4caalib/libzfs libzfs.abi, lib/libzfs_core libzfs_core.abi

ABI: bump for spacemap condense

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 #16747
DeltaFile
+113-1lib/libzfs_core/libzfs_core.abi
+16-1lib/libzfs/libzfs.abi
+129-22 files

OpenZFS/src f3e7342tests/runfiles common.run, tests/zfs-tests/tests Makefile.am

zts: add test for log spacemap flushall + zpool condense

Sponsored-by: TrueNAS
Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
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 #16747
DeltaFile
+97-0tests/zfs-tests/tests/functional/log_spacemap/log_spacemap_flushall.ksh
+1-1tests/runfiles/common.run
+1-0tests/zfs-tests/tests/Makefile.am
+99-13 files

OpenZFS/src 74f184acmd ztest.c

ztest: periodically start/stop log spacemap flush

Sponsored-by: TrueNAS
Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
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 #16747
DeltaFile
+20-1cmd/ztest.c
+20-11 files

OpenZFS/src a92b9e9include/sys spa_log_spacemap.h, man/man4 zfs.4

log_spacemap: extend pool flushall to have "request" and "export" modes

Normally, log spacemaps are flushed out to the metaslabs when the pool
is exported. For large logs, this can lead to export taking an
inordinate amount of time.

This commit adds a "mode" parameter for the log spacemap "flushall"
operation, and functions for starting and stopping it in a particular
mode. The existing behaviour of flushing everything is now the "export"
mode.

Then, we add a new "request" mode, that can be triggered externally.
This activates the same flushall code, with a few differences:

- we only consider flushing metaslabs that were dirtied on the txg
  before the flushall operation was started

- we close and issue the txg immediately when the flushall is active,
  rather than wait for zfs_txg_timeout each time (similar to how scrub

    [18 lines not shown]
DeltaFile
+186-14module/zfs/spa_log_spacemap.c
+18-2module/zfs/zfs_ioctl.c
+17-2man/man8/zpool-condense.8
+13-1include/sys/spa_log_spacemap.h
+8-1man/man4/zfs.4
+4-2module/zfs/spa.c
+246-225 files not shown
+256-2711 files

OpenZFS/src fad95fainclude/sys spa_log_spacemap.h, module/zfs spa_log_spacemap.c metaslab.c

log_spacemap: add counter for unflushed metaslabs

Useful for understanding, but also a convenient place to grab the
current count without needing to walk over the metaslab list.

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 #16747
DeltaFile
+18-0module/zfs/spa_log_spacemap.c
+7-0module/zfs/metaslab.c
+5-0include/sys/spa_log_spacemap.h
+4-0module/zfs/spa_stats.c
+1-0module/zfs/spa.c
+35-05 files

OpenZFS/src 59dade3include/sys spa.h, module/zfs spa_stats.c spa.c

spa_stats: kstats for unflushed log spacemaps

Sponsored-by: TrueNAS
Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
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 #16747
DeltaFile
+83-0module/zfs/spa_stats.c
+5-1module/zfs/spa.c
+4-1include/sys/spa.h
+92-23 files

OpenZFS/src 58187f2tests/zfs-tests/tests/functional/cli_root/zpool_condense zpool_condense_neg.ksh zpool_condense_basic.ksh, tests/zfs-tests/tests/functional/cli_root/zpool_wait zpool_wait_condense.ksh

zts: zpool-condense sanity tests

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 #16747
DeltaFile
+51-0tests/zfs-tests/tests/functional/cli_root/zpool_condense/zpool_condense_neg.ksh
+48-0tests/zfs-tests/tests/functional/cli_root/zpool_wait/zpool_wait_condense.ksh
+43-0tests/zfs-tests/tests/functional/cli_root/zpool_condense/zpool_condense_basic.ksh
+37-0tests/zfs-tests/tests/functional/cli_root/zpool_condense/zpool_condense.kshlib
+33-0tests/zfs-tests/tests/functional/cli_root/zpool_condense/setup.ksh
+31-0tests/zfs-tests/tests/functional/cli_root/zpool_condense/cleanup.ksh
+243-03 files not shown
+258-19 files

OpenZFS/src 5c0afbdcmd/zpool zpool_main.c, include/sys spa_impl.h

zpool: add condense verb

The idea is to have a single command that could signal to any background
cleanup task that it should do its work faster, or care less about not
getting in the way of user IO, or whatever.

This adds the the `zpool condense` command, the `ZFS_IOC_POOL_CONDENSE`
ioctl and counters so userspace can get progress. Because the type could
be anything, there's no particular unit, just a total number of items to
condense and count of how many done.

Included is a "debug" condense type. In debug builds, issuing condense
with this type will start a background process that will simply bump the
condense counters every second for ten seconds. This is intended for use
by the test suite and for debugging the condense infrastructure itself,
and will be compiled out production builds.

Sponsored-by: TrueNAS
Sponsored-by: Klara, Inc.

    [5 lines not shown]
DeltaFile
+286-4cmd/zpool/zpool_main.c
+144-0module/zfs/spa.c
+75-1module/zfs/zfs_ioctl.c
+73-0man/man8/zpool-condense.8
+39-0module/zfs/vdev_label.c
+27-0include/sys/spa_impl.h
+644-512 files not shown
+726-918 files

OpenZFS/src 1672beftests/zfs-tests/tests/functional/delegate zfs_allow_send.ksh

ZTS: delegate: test send:encrypted

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 #18673
(cherry picked from commit 166a6672502c6398b3ef549d4a17f113f5cb2e8d)
DeltaFile
+12-0tests/zfs-tests/tests/functional/delegate/zfs_allow_send.ksh
+12-01 files

OpenZFS/src b788cb1tests/zfs-tests/tests/functional/delegate zfs_allow_send.ksh

ZTS: delegate: check send permissions on encrypted datasets

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 #18673
(cherry picked from commit bce9a8ef7d0b4c1b8e323ef2b045379177c20410)
DeltaFile
+12-10tests/zfs-tests/tests/functional/delegate/zfs_allow_send.ksh
+12-101 files

OpenZFS/src 9025944tests/zfs-tests/tests/functional/delegate delegate_common.kshlib

ZTS: delegate: add encryption option for test fixture datasets

The delegate test framework doesn't care about the encryption status of
the dataset under test, so by adding an option to create with encryption
the framework can be used to check encryption-related permissions
without any further fanfare.

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 #18673
(cherry picked from commit 8303a36488da79c13d0fcca4365d71d5180407c3)
DeltaFile
+12-3tests/zfs-tests/tests/functional/delegate/delegate_common.kshlib
+12-31 files

OpenZFS/src 633b581tests/zfs-tests/tests/functional/cli_root/zfs_send_delegation zfs_send_test.ksh setup.ksh, tests/zfs-tests/tests/functional/cli_user/zfs_send_delegation_user zfs_send_usertest.ksh setup.ksh

ZTS: remove send_delegation tests

These tests are doing the same tests as delegate/zfs_allow_send, and are
hard to follow and maintain. There's no need for them now, so drop them.

Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18672
(cherry picked from commit 562b96ced9f28b8517913e5e9f7eaf1686db7cd0)
DeltaFile
+0-150tests/zfs-tests/tests/functional/cli_user/zfs_send_delegation_user/zfs_send_usertest.ksh
+0-111tests/zfs-tests/tests/functional/cli_root/zfs_send_delegation/zfs_send_test.ksh
+0-50tests/zfs-tests/tests/functional/cli_root/zfs_send_delegation/setup.ksh
+0-50tests/zfs-tests/tests/functional/cli_user/zfs_send_delegation_user/setup.ksh
+0-43tests/zfs-tests/tests/functional/cli_root/zfs_send_delegation/cleanup.ksh
+0-43tests/zfs-tests/tests/functional/cli_user/zfs_send_delegation_user/cleanup.ksh
+0-4472 files not shown
+0-4618 files

OpenZFS/src 768c8e3cmd/zfs zfs_main.c, include zfs_deleg.h

delegate: add 'send:encrypted' permission

send:encrypted is like send:raw, but only permits encrypted datasets to
be sent - raw send is not permitted for unencrypted datasets.

This commit creates the permission, wires it up, and adds the check for
it in zfs_secpolicy_send_impl(), if it is the last send permission
standing, the dataset is checked for its encryption state.

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 #18673
(cherry picked from commit 97b9ba7a982e36d39a3cf7db271da2fab110769d)
DeltaFile
+10-3cmd/zfs/zfs_main.c
+11-0module/zfs/zfs_ioctl.c
+3-1man/man8/zfs-allow.8
+1-0include/sys/dsl_deleg.h
+1-0include/zfs_deleg.h
+1-0module/zcommon/zfs_deleg.c
+27-46 files

OpenZFS/src b9a8b8btests/runfiles common.run, tests/zfs-tests/tests Makefile.am

ZTS: delegate: add test for send sub-permissions

Regular send and raw send are actually separate operations with separate
permissions. This adds a test to test the combinations properly using
the existing permission test infrastructure.

Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18672
(cherry picked from commit 4d1d00f9fe0c87b2334613a0efaa758275f938b8)
DeltaFile
+43-0tests/zfs-tests/tests/functional/delegate/zfs_allow_send.ksh
+37-0tests/zfs-tests/tests/functional/delegate/delegate_common.kshlib
+3-3tests/runfiles/common.run
+1-0tests/zfs-tests/tests/Makefile.am
+84-34 files

OpenZFS/src ccf236emodule/zfs zfs_ioctl.c

zfs_secpolicy_send: lift checks to common function for both

The permissions checks for send are a little involved because different
permissions grant different abilities, and there's two ways to initiate
a send.

This lifts the common permissions checks into a single function, and
ensures that we maintain a single dataset hold across all checks. This
will become important in the next commit when we need to check a
specific dataset property as part of the permission check.

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 #18673
(cherry picked from commit f0d69e6b16d93ab49f1914a29e64d5df6e4f7bc2)
DeltaFile
+52-13module/zfs/zfs_ioctl.c
+52-131 files

OpenZFS/src bf098c7config kernel-sget-args.m4 kernel.m4, module/os/linux/zfs zpl_super.c

Linux 7.2: zpl_super: convert to sget_fc()

The old sget() superblock matcher has been removed in favour of the
fscontext-based sget_fc(). This converts to it. Its largely a signature
change, no functional change.

sget_fc() has existed since fscontext was introduced, so there's no need
for separate feature tests.

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 #18677
DeltaFile
+0-26config/kernel-sget-args.m4
+7-6module/os/linux/zfs/zpl_super.c
+0-2config/kernel.m4
+7-343 files

OpenZFS/src 5e7f60ainclude/os/linux/zfs/sys abd_os.h, module/os/linux/zfs abd_os.c

linux/abd: remove BIO support functions

Not used since the "classic" vdev_disk implementation was removed in
5764e218ba.

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 #18719
DeltaFile
+0-148module/os/linux/zfs/abd_os.c
+0-8include/os/linux/zfs/sys/abd_os.h
+0-1562 files

OpenZFS/src 4678164.github/workflows/scripts qemu-2-start.sh

Using net/cloud-init to unpin specific python

These days freebsd 15/16 fail when fetching py311-cloud-init.
Switch to net/cloud-init to avoid python version pinning.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: tiehexue <tiehexue at hotmail.com>
Closes #18717
DeltaFile
+1-1.github/workflows/scripts/qemu-2-start.sh
+1-11 files

OpenZFS/src 223b8bcmodule/os/linux/zfs zfs_vnops_os.c

linux: handle mmap read beyond file size

When performing a mmap read past the end of a file there is no data to
read, so simply zero-fill the page and return success.  zfs_getpage()
limits the range lock appropriately to cover the offset being read.

Reported-by: Iliya Polihronov (@vnsavage) (Automattic)
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes #18715
DeltaFile
+20-4module/os/linux/zfs/zfs_vnops_os.c
+20-41 files

OpenZFS/src 0d1f3b1module/zfs vdev_raidz.c

RAIDZ: Fix parity regeneration/check condition

Profiling RAIDZ1/dRAID1 resilver I've noticed that they calculate
the parity twice for most of blocks: first to reconstruct the data
column and then to "verify" the parity column.  Same time it is
obvious that parity generated from data reconstructed from the
parity will be identical to the original.  The code even had this
condition, but it was overridden by ZIO_FLAG_RESILVER check.

I think the ZIO_FLAG_RESILVER condition is not right.  Instead we
should check for parity_errors > 0, when we failed to read some
parity columns that we'll need to rewrite.  It should not matter
if we are resilvering or just doing self healing on regular read.

Profiling shows this saving ~16% of ZFS CPU time when resilvering
RAIDZ1.  RAIDZ2+ are out of luck, unless two disks are replaced
same time, since there is still a parity to verify.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Alexander Motin <alexander.motin at TrueNAS.com>
Closes #18707
DeltaFile
+13-5module/zfs/vdev_raidz.c
+13-51 files

OpenZFS/src 550f18etests/zfs-tests/tests/functional/devices devices_common.kshlib

ZTS: Pass dec instead of hex to mknod

On Ubuntu 26.04 the default mknod command returns an error when
provided the major and minor numbers in hex.  Switch to passing
decimal values.

Reviewed-by: Tino Reichardt <milky-zfs at mcmilk.de>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes #18547
DeltaFile
+6-6tests/zfs-tests/tests/functional/devices/devices_common.kshlib
+6-61 files