OpenZFS/src 0372defmodule/os/freebsd/zfs vdev_geom.c

vdev_geom: converted injected EIO errors to ENXIO

By the assertion, vdev_geom_io_done() only expects ENXIO on an error
when the geom is a top-level (allocating) vdev[1][2]. However, zinject
currently can't insert ENXIO directly, possibly because on Solaris
outright disk failures were reported with EIO[2][3].

This is a narrow workaround to convert EIO to ENXIO when injections are
enabled, to avoid the assertion and allow the test suite to test
behaviour related to probe failure on FreeBSD.

1. freebsd/freebsd-src at 37ec52ca7a2a
2. freebsd/freebsd-src at cd730bd6b2b1
3. illumos/illumos-gate at ea8dc4b6d2

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <mav at FreeBSD.org>

    [3 lines not shown]
DeltaFile
+10-1module/os/freebsd/zfs/vdev_geom.c
+10-11 files

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

ZTS: test dmu_tx response when pool suspends

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <mav at FreeBSD.org>
Reviewed-by: Paul Dagnelie <paul.dagnelie at klarasystems.com>
Signed-off-by: Rob Norris <rob.norris at klarasystems.com>
Closes #17355
DeltaFile
+102-0tests/zfs-tests/tests/functional/failmode/failmode_dmu_tx_continue.ksh
+98-0tests/zfs-tests/tests/functional/failmode/failmode_dmu_tx_wait.ksh
+30-0tests/zfs-tests/tests/functional/failmode/cleanup.ksh
+28-0tests/zfs-tests/tests/functional/failmode/setup.ksh
+4-0tests/runfiles/common.run
+4-0tests/zfs-tests/tests/Makefile.am
+266-06 files

OpenZFS/src 55d035emodule/zfs zil.c vdev_rebuild.c

dmu_tx_assign: make all VERIFY0 calls use DMU_TX_SUSPEND

This is the cheap way to keep non-user functions working after
break-on-suspend becomes default.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <mav at FreeBSD.org>
Reviewed-by: Paul Dagnelie <paul.dagnelie at klarasystems.com>
Signed-off-by: Rob Norris <rob.norris at klarasystems.com>
Closes #17355
DeltaFile
+7-5module/zfs/zil.c
+3-3module/zfs/vdev_rebuild.c
+2-2module/zfs/vdev_initialize.c
+2-2module/zfs/vdev_trim.c
+2-1module/zfs/vdev_removal.c
+2-1module/zfs/vdev_raidz.c
+18-145 files not shown
+23-1911 files

OpenZFS/src 4653e2finclude/sys dmu.h dmu_tx.h, module/zfs dmu_tx.c

dmu_tx: break tx assign/wait when pool suspends

This adjusts dmu_tx_assign/dmu_tx_wait to be interruptable if the pool
suspends while they're waiting, rather than just on the initial check
before falling back into a wait.

Since that's not always wanted, add a DMU_TX_SUSPEND flag to ignore
suspend entirely, effectively returning to the previous behaviour.

With that, it shouldn't be possible for anything with a standard
dmu_tx_assign/wait/abort loop to block under failmode=continue.

Also should be a bit tighter than the old behaviour, where a
VERIFY0(dmu_tx_assign(DMU_TX_WAIT)) could technically fail if the pool
is already suspended and failmode=continue.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>

    [4 lines not shown]
DeltaFile
+87-18module/zfs/dmu_tx.c
+8-2include/sys/dmu.h
+4-0include/sys/dmu_tx.h
+99-203 files

OpenZFS/src ac2e579include/sys dmu.h dmu_tx.h, module/zfs dmu_tx.c

dmu_tx: make DMU_TX_* flags an enum

Mostly for a little more type checking and debugging visibility.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <mav at FreeBSD.org>
Reviewed-by: Paul Dagnelie <paul.dagnelie at klarasystems.com>
Signed-off-by: Rob Norris <rob.norris at klarasystems.com>
Closes #17355
DeltaFile
+19-4include/sys/dmu.h
+1-1include/sys/dmu_tx.h
+1-1module/zfs/dmu_tx.c
+21-63 files

OpenZFS/src 468d22dinclude/sys txg.h, module/zfs txg.c zio.c

txg_wait_synced_flags: add TXG_WAIT_SUSPEND flag to not wait if pool suspended

This allows a caller to request a wait for txg sync, with an appropriate
error return if the pool is suspended or becomes suspended during the
wait.

To support this, txg_wait_kick() is added to signal the sync condvar,
which wakes up the waiters, causing them to loop and reconsider their
wait conditions again. zio_suspend() now calls this to trigger the break
if the pool suspends while waiting.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <mav at FreeBSD.org>
Reviewed-by: Paul Dagnelie <paul.dagnelie at klarasystems.com>
Signed-off-by: Rob Norris <rob.norris at klarasystems.com>
Closes #17355
DeltaFile
+20-1module/zfs/txg.c
+9-0include/sys/txg.h
+2-0module/zfs/zio.c
+31-13 files

OpenZFS/src 8487945module/zfs zcp_get.c, tests/runfiles common.run

zcp: get_prop: fix encryptionroot and encryption

It was reported that channel programs' zfs.get_prop doesn't work for
dataset properties encryption and encryptionroot.

They are handled in get_special_prop due to the need to call
dsl_dataset_crypt_stats to load those dsl props.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <mav at FreeBSD.org>
Signed-off-by: Pavel Snajdr <snajpa at snajpa.net>
Co-authored-by: Graham Christensen <graham at grahamc.com>
Closes #17280
DeltaFile
+43-0tests/zfs-tests/tests/functional/channel_program/lua_core/tst.encryption.ksh
+29-3module/zfs/zcp_get.c
+23-0tests/zfs-tests/tests/functional/channel_program/lua_core/tst.encryption.zcp
+5-4tests/zfs-tests/tests/functional/channel_program/lua_core/tst.exists.ksh
+2-0tests/zfs-tests/tests/Makefile.am
+1-1tests/runfiles/common.run
+103-81 files not shown
+104-97 files

OpenZFS/src 06fa8f3include/sys zfs_ioctl.h, lib/libzfs libzfs.abi

zfs_cmd: reorganise zfs_cmd_t to match original size

2aa3fbe761 extended zinject_record_t, and in doing so inadvertently
extended zfs_cmd_t, which broke compatibility with userspace tools
without the change.

This fixes that by using some of the unused space in zfs_cmd_t for the
extra fields. We also add an assert to trigger a compile error if the
size ever changes.

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <mav at FreeBSD.org>
Signed-off-by: Rob Norris <robn at despairlabs.com>
Closes #17367
DeltaFile
+74-52lib/libzfs/libzfs.abi
+60-31lib/libzfs_core/libzfs_core.abi
+30-4include/sys/zfs_ioctl.h
+164-873 files

OpenZFS/src 087d7d8module/os/freebsd/zfs zvol_os.c

ZVOL: Comment platform-specific empty functions bodies on FreeBSD side

Reviewed-by: Alexander Motin <mav at FreeBSD.org>
Signed-off-by: Fedor Uporov <fuporov.vstack at gmail.com>
Closes #17383
DeltaFile
+10-2module/os/freebsd/zfs/zvol_os.c
+10-21 files

OpenZFS/src fc61764man/man4 zfs.4, module/os/linux/zfs vdev_disk.c

vdev_disk: remove zfs_vdev_scheduler option

It has existed as a warning since 0.8.3, 5+ years ago. I think people
have had enough time.

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <mav at FreeBSD.org>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by: Pavel Snajdr <snajpa at snajpa.net>
Signed-off-by: Rob Norris <robn at despairlabs.com>
Closes #17376
DeltaFile
+0-23module/os/linux/zfs/vdev_disk.c
+0-4man/man4/zfs.4
+0-272 files

OpenZFS/src 284580cman/man4 zfs.4, module/zfs dmu_traverse.c

dmu_traverse: remove 'ignore_hole_birth' tunable alias

It's been many years, we can probably do without.

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <mav at FreeBSD.org>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by: Pavel Snajdr <snajpa at snajpa.net>
Signed-off-by: Rob Norris <robn at despairlabs.com>
Closes #17376
DeltaFile
+1-5man/man4/zfs.4
+0-6module/zfs/dmu_traverse.c
+1-112 files

OpenZFS/src 050517cmodule/icp/algs/modes modes.c

icp: Use explicit_memset() exclusively in gcm_clear_ctx()

d634d20d1be31dfa8cf06ef2dc96285baf81a2fb had been intended to fix a
potential information leak issue where the compiler's optimization
passes appeared to remove `memset()` operations that sanitize sensitive
data before memory is freed for use by the rest of the kernel.

When I wrote it, I had assumed that the compiler would not remove the
other `memset()` operations, but upon reflection, I have realized that
this was a bad assumption to make. I would rather have a very slight
amount of additional overhead when calling `gcm_clear_ctx()` than risk a
future compiler remove `memset()` calls. This is likely to happen if
someone decides to try doing link time optimization and the person will
not think to audit the assembly output for issues like this, so it is
best to preempt the possibility before it happens.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Rob Norris <robn at despairlabs.com>
Reviewed-by: Alexander Motin <mav at FreeBSD.org>

    [4 lines not shown]
DeltaFile
+2-2module/icp/algs/modes/modes.c
+2-21 files

OpenZFS/src 20bf8c6include/os/linux/kernel/linux page_compat.h, man/man4 zfs.4

Linux: Stop using NR_FILE_PAGES for ARC scaling

I've found that QEMU/KVM guest memory accounted as shared also
included into NR_FILE_PAGES.  But it is actually a non-evictable
anonymous memory.  Using it as a base for zfs_arc_pc_percent
parameter makes ARC to ignore shrinker requests while page cache
does not really have anything to evict, ending up in OOM killer
killing the QEMU process.

Instead use of NR_ACTIVE_FILE + NR_INACTIVE_FILE should represent
the part of a page cache that is actually evictable, which should
be safer to use as a reference for ARC scaling.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Ameer Hamza <ahamza at ixsystems.com>
Reviewed-by: Pavel Snajdr <snajpa at snajpa.net>
Signed-off-by:  Alexander Motin <mav at FreeBSD.org>
Sponsored by:   iXsystems, Inc.
Closes #17334
(cherry picked from commit 0aa83dce99e47ccd533be24b82332268766b68db)
DeltaFile
+2-2include/os/linux/kernel/linux/page_compat.h
+3-1man/man4/zfs.4
+5-32 files

OpenZFS/src 8d19d97config kernel-vfs-migrate_folio.m4 kernel.m4, module/os/linux/zfs zpl_file.c

Use simple folio migration function

Avoids using fallback_migrate_folio, which starts unnecessary writeback
(leading to BUG in migrate_folio_extra).

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Reviewed-by: Brian Atkinson <batkinson at lanl.gov>
Signed-off-by: tstabrawa <59430211+tstabrawa at users.noreply.github.com>
Closes #16568
Closes #16723
(cherry picked from commit 7b6e9675daefcc94393293c46e4672e66490757d)
DeltaFile
+27-0config/kernel-vfs-migrate_folio.m4
+6-0module/os/linux/zfs/zpl_file.c
+2-0config/kernel.m4
+35-03 files

OpenZFS/src 36225bainclude/os/linux/spl/sys uio.h, module/os/linux/zfs zfs_uio.c zpl_file.c

linux/uio: remove "skip" offset for UIO_ITER

For UIO_ITER, we are just wrapping a kernel iterator. It will take care
of its own offsets if necessary. We don't need to do anything, and if we
do try to do anything with it (like advancing the iterator by the skip
in zfs_uio_advance) we're just confusing the kernel iterator, ending up
at the wrong position or worse, off the end of the memory region.

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Reviewed-by: Alexander Motin <mav at FreeBSD.org>
Reviewed-by: Tino Reichardt <milky-zfs at mcmilk.de>
Reviewed-by: Brian Atkinson <batkinson at lanl.gov>
Signed-off-by: Rob Norris <robn at despairlabs.com>
Closes #17298
(cherry picked from commit 2ee5b51a57cb45992fb783ffa95c7fbea19153ed)
DeltaFile
+2-2include/os/linux/spl/sys/uio.h
+0-3module/os/linux/zfs/zfs_uio.c
+2-1module/os/linux/zfs/zpl_file.c
+4-63 files

OpenZFS/src b144b16module/zfs dmu_send.c

Fix 2 bugs in non-raw send with encryption

Bisecting identified the redacted send/receive as the source of the bug
for issue #12014. Specifically the call to
dsl_dataset_hold_obj(&fromds) has been replaced by
dsl_dataset_hold_obj_flags() which passes a DECRYPT flag and creates
a key mapping. A subsequent dsl_dataset_rele_flag(&fromds) is missing
and the key mapping is not cleared. This may be inadvertedly used, which
results in arc_untransform failing with ECKSUM in:
 arc_untransform+0x96/0xb0 [zfs]
 dbuf_read_verify_dnode_crypt+0x196/0x350 [zfs]
 dbuf_read+0x56/0x770 [zfs]
 dmu_buf_hold_by_dnode+0x4a/0x80 [zfs]
 zap_lockdir+0x87/0xf0 [zfs]
 zap_lookup_norm+0x5c/0xd0 [zfs]
 zap_lookup+0x16/0x20 [zfs]
 zfs_get_zplprop+0x8d/0x1d0 [zfs]
 setup_featureflags+0x267/0x2e0 [zfs]
 dmu_send_impl+0xe7/0xcb0 [zfs]

    [22 lines not shown]
DeltaFile
+3-3module/zfs/dmu_send.c
+3-31 files

OpenZFS/src 3a84c63config kernel-timer.m4 kernel.m4, module/os/linux/spl spl-taskq.c

Linux 6.2/6.15: del_timer_sync() renamed to timer_delete_sync()

Renamed in 6.2, and the compat wrapper removed in 6.15. No signature or
functional change apart from that, so a very minimal update for us.

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Reviewed-by: Pavel Snajdr <snajpa at snajpa.net>
Signed-off-by: Rob Norris <robn at despairlabs.com>
Closes #17229
(cherry picked from commit 841be1d0495224a47d3dbfd8647c7fcbf58b205c)
(cherry picked from commit 1dc9becb962c7355fef0fb2ba42fe23168d8b6b2)
DeltaFile
+32-0config/kernel-timer.m4
+6-1module/os/linux/spl/spl-taskq.c
+2-0config/kernel.m4
+40-13 files

OpenZFS/src 8ff37c6include/os/linux/kernel/linux blkdev_compat.h

linux: zvols: correctly detect flush requests

since 4.10, bio->bi_opf needs to be checked to determine all kinds of
flush requests. this was the case prior to the commit referenced below,
but the order of ifdefs was not the usual one (newest up top), which
might have caused this to slip through.

this fixes a regression when using zvols as Qemu block devices, but
might have broken other use cases as well. the symptoms are that all
sync writes from within a VM configured to use such a virtual block
devices are ignored and treated as async writes by the host ZFS layer.

this can be verified using fio in sync mode inside the VM, for example
with

 fio \
 --filename=/dev/sda --ioengine=libaio --loops=1 --size=10G \
 --time_based --runtime=60 --group_reporting --stonewall --name=cc1 \
 --description="CC1" --rw=write --bs=4k --direct=1 --iodepth=1 \

    [18 lines not shown]
DeltaFile
+1-1include/os/linux/kernel/linux/blkdev_compat.h
+1-11 files

OpenZFS/src 827fd20module/zfs dmu_objset.c

dmu_objset_hold_flags() should call dsl_dataset_rele_flags() on error

This was caught when doing a manual check to see if #17352 needed to be
improved to catch mismatches across stack frames of the kind that were
first found in #17340.

Reviewed-by: George Amanakis <gamanakis at gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <mav at FreeBSD.org>
Signed-off-by: Richard Yao <richard at ryao.dev>
Closes #17353
(cherry picked from commit 83fa80a5500ed7baccedfa90ad55ac879af710c9)
(cherry picked from commit 07d815f2a06573514f51c8601aa60db6fe1a76ad)
DeltaFile
+1-1module/zfs/dmu_objset.c
+1-11 files

OpenZFS/src 3f94332config kernel-mkdir.m4, module/os/linux/zfs zpl_inode.c zpl_ctldir.c

Linux 6.15: mkdir now returns struct dentry *

The intent is that the filesystem may have a reference to an "old"
version of the new directory, eg if it was keeping it alive because a
remote NFS client still had it open.

We don't need anything like that, so this really just changes things so
we return error codes encoded in pointers.

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Reviewed-by: Pavel Snajdr <snajpa at snajpa.net>
Signed-off-by: Rob Norris <robn at despairlabs.com>
Closes #17229
(cherry picked from commit bb740d66de2b03a24bd7bfc9cef1844ad3e22a74)
DeltaFile
+42-15config/kernel-mkdir.m4
+14-3module/os/linux/zfs/zpl_inode.c
+11-1module/os/linux/zfs/zpl_ctldir.c
+67-193 files

OpenZFS/src 8da379emodule/os/linux/zfs zvol_os.c

Linux 6.14: BLK_MQ_F_SHOULD_MERGE was removed

According to the upstream change, all callers set it, and all block
devices either honoured it or ignored it, so removing it entirely allows
a bunch of handling for the "unset" case to be removed, and it becomes
effectively implied.

We follow suit, and keep setting it for older kernels.

Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn at despairlabs.com>
Reviewed-by: Alexander Motin <mav at FreeBSD.org>
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
(cherry picked from commit 2ca91ba3cf209c6f1db42247ff2ca3f9ce4f2d4d)
DeltaFile
+10-1module/os/linux/zfs/zvol_os.c
+10-11 files

OpenZFS/src aa6ceb7config kernel-automount.m4, module/os/linux/zfs zpl_ctldir.c

Linux 6.14: dops->d_revalidate now takes four args

This is a convenience for filesystems that need the inode of their
parent or their own name, as its often complicated to get that
information. We don't need those things, so this is just detecting which
prototype is expected and adjusting our callback to match.

Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn at despairlabs.com>
Reviewed-by: Alexander Motin <mav at FreeBSD.org>
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
(cherry picked from commit 7ef6b70e960a7cc504242952699057f0ee616449)
DeltaFile
+39-2config/kernel-automount.m4
+6-0module/os/linux/zfs/zpl_ctldir.c
+45-22 files

OpenZFS/src be72364module/zfs arc.c

ARC: Avoid overflows in arc_evict_adj() (#17255)

With certain combinations of target ARC states balance and ghost
hit rates it was possible to get the fractions outside of allowed
range.  This patch limits maximum balance adjustment speed, which
should make it impossible, and also asserts it.

Fixes #17210
Signed-off-by:  Alexander Motin <mav at FreeBSD.org>
Sponsored by:   iXsystems, Inc.
Reviewed-by: Rob Norris <robn at despairlabs.com>
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
(cherry picked from commit b1ccab17213b38aa269e85c6b371d69eb25b6ca9)
(cherry picked from commit 677cb91ffee6d54501c96323c6308a024cb62268)
DeltaFile
+10-5module/zfs/arc.c
+10-51 files

OpenZFS/src c88e5a3config kernel-vfs-migratepage.m4 kernel.m4, module/os/linux/zfs zpl_file.c

Linux 6.0 compat: Check for migratepage VFS

The 6.0 kernel removes the 'migratepage' VFS op. Check for
migratepage.

Signed-off-by: Tony Hutter <hutter2 at llnl.gov>
Reviewed-by: Rob Norris <robn at despairlabs.com>
Reviewed-by: Alexander Motin <mav at FreeBSD.org
Closes #17217
(cherry picked from commit ab9bb193f9937fef5277b18228b74a1de48e40d3)
DeltaFile
+27-0config/kernel-vfs-migratepage.m4
+2-0config/kernel.m4
+1-1module/os/linux/zfs/zpl_file.c
+30-13 files

OpenZFS/src 9631ecfconfig kernel-sb-dying.m4 kernel.m4, module/os/linux/zfs zpl_super.c

Linux: Fix zfs_prune panics v2

It turns out that approach taken in the original version of the patch
was wrong. So now, we're taking approach in-line with how kernel
actually does it - when sb is being torn down, access to it
is serialized via sb->s_umount rwsem, only when that lock is taken
is it okay to work with s_flags - and the other mistake I was doing
was trying to make SB_ACTIVE work, but apparently the kernel checks
the negative variant - not SB_DYING and not SB_BORN.

Kernels pre-6.6 don't have SB_DYING, but check if sb is hashed
instead.

Signed-off-by: Pavel Snajdr <snajpa at snajpa.net>
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes: #17121
(cherry picked from commit a0e62718cfcffd149b797ff9094ae2f009752f43)
DeltaFile
+17-9module/os/linux/zfs/zpl_super.c
+19-0config/kernel-sb-dying.m4
+2-0config/kernel.m4
+38-93 files

OpenZFS/src 2a91d57include libzfs.h, include/sys dmu.h

Expose dataset encryption status via fast stat path

In truenas_pylibzfs, we query list of encrypted datasets several times,
which is expensive. This commit exposes a public API zfs_is_encrypted()
to get encryption status from fast stat path without having to refresh
the properties.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <mav at FreeBSD.org>
Reviewed-by: Rob Norris <robn at despairlabs.com>
Signed-off-by: Ameer Hamza <ahamza at ixsystems.com>
Closes #17368
DeltaFile
+11-0lib/libzfs/libzfs_crypto.c
+8-0lib/libzfs/libzfs.abi
+6-0include/sys/dmu.h
+3-0lib/libzfs_core/libzfs_core.abi
+3-0module/zfs/dsl_dataset.c
+1-0include/libzfs.h
+32-06 files

OpenZFS/src b048bfaman/man7 zpoolconcepts.7 zfsprops.7, module/zcommon zfs_prop.c

Allow opt-in of zvol blocks in special class

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <mav at FreeBSD.org>
Reviewed-by: Kjeld Schouten <kjeld at schouten-lebbing.nl>
Signed-off-by: Don Brady <dev.fs.zfs at gmail.com>
Closes #14876
DeltaFile
+60-0tests/zfs-tests/tests/functional/alloc_class/alloc_class_016_pos.ksh
+3-3module/zfs/spa_misc.c
+3-2man/man7/zpoolconcepts.7
+2-2man/man7/zfsprops.7
+2-1module/zfs/dmu.c
+2-1module/zcommon/zfs_prop.c
+72-92 files not shown
+75-108 files

OpenZFS/src 9d76950module/zfs zfs_log.c zvol.c

ZIL: Improve write log size accounting

Before this change write log size TXG throttling mechanism was
accounting only user payload bytes.  But the actual ZIL both on
disk and especially in memory include headers of hundred(s) of
bytes.  Not accouting those may allow applications like
bonnie++, in their wisdom writing one byte at a time, to consume
excessive amount of memory and ZIL/SLOG in one TXG.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Rob Norris <robn at despairlabs.com>
Signed-off-by:  Alexander Motin <mav at FreeBSD.org>
Sponsored by:   iXsystems, Inc.
Closes #17373
DeltaFile
+6-5module/zfs/zfs_log.c
+6-4module/zfs/zvol.c
+12-92 files

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

ZTS: testing for leaked key mappings in encrypted non-raw send

This test covers a bug fixed by commit ea74cde: performing an
incremental non-raw send from an encrypted filesystem followed by
exporting the pool. Before that commit, exporting the sending pool
in this scenario would trigger a panic:

VERIFY(avl_is_empty(&sk->sk_dsl_keys)) failed
PANIC at dsl_crypt.c:353:spa_keystore_fini()
Call Trace:
 spl_dumpstack+0x29/0x2f [spl]
 spl_panic+0xd1/0xe9 [spl]
 spl_assert.constprop.0+0x1a/0x30 [zfs]
 spa_keystore_fini+0xc2/0xf0 [zfs]
 spa_deactivate+0x25f/0x610 [zfs]
 spa_evict_all+0xf4/0x200 [zfs]
 spa_fini+0x13/0x140 [zfs]
 zfs_kmod_fini+0x72/0xc0 [zfs]
 openzfs_fini_os+0x13/0x3a [zfs]

    [5 lines not shown]
DeltaFile
+82-0tests/zfs-tests/tests/functional/rsend/send_leak_keymaps.ksh
+1-1tests/runfiles/common.run
+1-0tests/zfs-tests/tests/Makefile.am
+84-13 files

OpenZFS/src 92157c8cmd/zpool zpool_main.c, man/man8 zpool-status.8

Refactor man page and CLI help output per mandoc

The man page and the usage statement from the CLI have been refactored
to abide by the ManDoc standard. Style changes include:
 * Upper-case letters before lower-case
 * List short options w/o arguments first
 * Then list short options w/ arguments
 * Then list long arguments

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Cameron Harr <harr1 at llnl.gov>
Closes #17357
DeltaFile
+23-23man/man8/zpool-status.8
+10-10cmd/zpool/zpool_main.c
+33-332 files