OpenZFS/src 919bc4dman/man8 zfs-destroy.8

zfs-destroy.8: Fix minor formatting typo

The warning at the end of the second example in the description section
was actually inside the options table. Move the El macro to match what
is done in the first section for improved readability.

Reviewed-by: Alexander Motin <mav at FreeBSD.org>
Reviewed-by: Rob Norris <robn at despairlabs.com>
Signed-off-by: Alexander Ziaee <ziaee at FreeBSD.org>
Closes #16962
DeltaFile
+1-1man/man8/zfs-destroy.8
+1-11 files

OpenZFS/src 788e69c. RELEASES.md

Update RELEASES.md LTS release to 2.2

2.3.0 is out now, so make 2.2.x the LTS release.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <mav at FreeBSD.org>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: Tony Hutter <hutter2 at llnl.gov>
Closes #16945
Closes #16948
DeltaFile
+1-1RELEASES.md
+1-11 files

OpenZFS/src aaeb7fainclude/sys sa.h

style: remove unnecessary spaces in sa.h

Removed three unnecessary spaces in the definition of the
sa_attr_reg_t structure to improve code style consistency
and adhere to OpenZFS coding standards.

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: Peng Liu <littlenewton6 at gmail.com>
Closes #16955
DeltaFile
+4-4include/sys/sa.h
+4-41 files

OpenZFS/src fe44c5amodule Makefile.in

Makefile.in: pass ARCH for modules_install as well

To do a cross-build using only kbuild rather than a full source tree,
ARCH= needs to be passed for the kbuild Makefile to find the
archspecific Makefile.

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <robn at despairlabs.com>
Closes #16944 
DeltaFile
+1-0module/Makefile.in
+1-01 files

OpenZFS/src bc06d81module/zfs zfs_vnops.c

Linux: Enable Direct IO by default

Aligns the 2.3 release branch with the well tested default behavior
in the master branch.

Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
DeltaFile
+7-0module/zfs/zfs_vnops.c
+7-01 files

OpenZFS/src 76745cf. META

Tag 2.3.0-1

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

OpenZFS/src 2aa3fbecmd/zinject zinject.c, include/sys zfs_ioctl.h

zinject: count matches and injections for each handler

When building tests with zinject, it can be quite difficult to work out
if you're producing the right kind of IO to match the rules you've set
up.

So, here we extend injection records to count the number of times a
handler matched the operation, and how often an error was actually
injected (ie after frequency and other exclusions are applied).

Then, display those counts in the `zinject` output.

Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Reviewed-by: Alexander Motin <mav at FreeBSD.org>
Signed-off-by: Rob Norris <rob.norris at klarasystems.com>
Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Closes #16938
DeltaFile
+142-0tests/zfs-tests/tests/functional/cli_root/zinject/zinject_counts.ksh
+40-26cmd/zinject/zinject.c
+49-11module/zfs/zio_inject.c
+3-1include/sys/zfs_ioctl.h
+1-1tests/runfiles/common.run
+1-0tests/zfs-tests/tests/Makefile.am
+236-396 files

OpenZFS/src fae4c66module/os/freebsd/zfs vdev_label_os.c

FreeBSD: Use ashift in vdev_check_boot_reserve()

We should not hardcode 512-byte read size when checking for loader
in the boot area before RAIDZ expansion.  Disk might be unable to
handle that I/O as is, and the code zio_vdev_io_start() handling
the padding asserts doing it only for top-level vdev.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by:  Alexander Motin <mav at FreeBSD.org>
Sponsored by:   iXsystems, Inc.
Closes #16942
DeltaFile
+1-1module/os/freebsd/zfs/vdev_label_os.c
+1-11 files

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

ZTS: remove empty zpool_add--allow-ashift-mismatch test

Added in b1e46f869, but empty, so no point keeping it around.

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: Rob Norris <robn at despairlabs.com>
Closes #16931
DeltaFile
+1-2tests/runfiles/common.run
+0-1tests/zfs-tests/tests/Makefile.am
+0-0tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add--allow-ashift-mismatch.ksh
+1-33 files

OpenZFS/src 9f1c5e0tests/runfiles common.run

Remove duplicate dedup_legacy_create in common.run

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: Robert Evans <evansr at google.com>
Closes #16926
DeltaFile
+2-2tests/runfiles/common.run
+2-21 files

OpenZFS/src 307fd0dconfig kernel.m4 zfs-build.m4, module Makefile.in

Support for cross-compiling kernel modules

In order to correctly cross-compile, one has to pass ARCH and
CROSS_COMPILE make flags to kernel module build calls. Facilitate this
in the same way as for custom CC flag by recognizing KERNEL_-prefixed
configure environment variables of same name.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Phil Sutter <phil at nwl.cc>
Closes #16924 
DeltaFile
+5-0config/kernel.m4
+3-1rpm/generic/zfs-kmod.spec.in
+3-1rpm/redhat/zfs-kmod.spec.in
+2-0config/zfs-build.m4
+2-0module/Makefile.in
+15-25 files

OpenZFS/src 0c88ae6. META

Tag 2.3.0-rc5

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

OpenZFS/src 18c67d2config kernel.m4 zfs-build.m4, module Makefile.in

Support for cross-compiling kernel modules

In order to correctly cross-compile, one has to pass ARCH and
CROSS_COMPILE make flags to kernel module build calls. Facilitate this
in the same way as for custom CC flag by recognizing KERNEL_-prefixed
configure environment variables of same name.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Phil Sutter <phil at nwl.cc>
Closes #16924 
DeltaFile
+5-0config/kernel.m4
+3-1rpm/generic/zfs-kmod.spec.in
+3-1rpm/redhat/zfs-kmod.spec.in
+2-0config/zfs-build.m4
+2-0module/Makefile.in
+15-25 files

OpenZFS/src 3a445f2tests/runfiles common.run

Remove duplicate dedup_legacy_create in common.run

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: Robert Evans <evansr at google.com>
Closes #16926
DeltaFile
+2-2tests/runfiles/common.run
+2-21 files

OpenZFS/src 47b7dc9scripts Makefile.am

Add Makefile dependencies for scripts/zfs-tests.sh -c

This updates the Makefile to be more correct for parallel make.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: Robert Evans <evansr at google.com>
Closes #16030
Closes #16922
DeltaFile
+1-1scripts/Makefile.am
+1-11 files

OpenZFS/src 5ba50c8config user.m4, include libzutil.h

fix: make zfs_strerror really thread-safe and portable

#15793 wanted to make zfs_strerror threadsafe, unfortunately, it
turned out that strerror_l() usage was wrong, and also, some libc 
implementations dont have strerror_l().

zfs_strerror() now simply calls original strerror() and copies the 
result to a thread-local buffer, then returns that.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <mav at FreeBSD.org>
Signed-off-by: Richard Kojedzinszky <richard at kojedz.in>
Closes #15793
Closes #16640
Closes #16923

DeltaFile
+9-6include/libzutil.h
+1-1config/user.m4
+10-72 files

OpenZFS/src 2556540module/zfs spa.c, tests/runfiles linux.run

Too many vdev probe errors should suspend pool

Similar to what we saw in #16569, we need to consider that a
replacing vdev should not be considered as fully contributing
to the redundancy of a raidz vdev even though current IO has
enough redundancy.

When a failed vdev_probe() is faulting a disk, it now checks
if that disk is required, and if so it suspends the pool until
the admin can return the missing disks.

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: Allan Jude <allan at klarasystems.com>
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Signed-off-by: Don Brady <don.brady at klarasystems.com>
Closes #16864
DeltaFile
+154-0tests/zfs-tests/tests/functional/fault/suspend_on_probe_errors.ksh
+19-6module/zfs/spa.c
+2-2tests/runfiles/linux.run
+1-0tests/zfs-tests/tests/Makefile.am
+176-84 files

OpenZFS/src dc0324bconfig user.m4, include libzutil.h

fix: make zfs_strerror really thread-safe and portable

#15793 wanted to make zfs_strerror threadsafe, unfortunately, it
turned out that strerror_l() usage was wrong, and also, some libc 
implementations dont have strerror_l().

zfs_strerror() now simply calls original strerror() and copies the 
result to a thread-local buffer, then returns that.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <mav at FreeBSD.org>
Signed-off-by: Richard Kojedzinszky <richard at kojedz.in>
Closes #15793
Closes #16640
Closes #16923

DeltaFile
+9-6include/libzutil.h
+1-1config/user.m4
+10-72 files

OpenZFS/src 939e023module/zfs spa.c, tests/runfiles linux.run

Too many vdev probe errors should suspend pool

Similar to what we saw in #16569, we need to consider that a
replacing vdev should not be considered as fully contributing
to the redundancy of a raidz vdev even though current IO has
enough redundancy.

When a failed vdev_probe() is faulting a disk, it now checks
if that disk is required, and if so it suspends the pool until
the admin can return the missing disks.

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: Allan Jude <allan at klarasystems.com>
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Signed-off-by: Don Brady <don.brady at klarasystems.com>
Closes #16864
DeltaFile
+154-0tests/zfs-tests/tests/functional/fault/suspend_on_probe_errors.ksh
+19-6module/zfs/spa.c
+2-2tests/runfiles/linux.run
+1-0tests/zfs-tests/tests/Makefile.am
+176-84 files

OpenZFS/src 50cbb14scripts Makefile.am

Add Makefile dependencies for scripts/zfs-tests.sh -c

This updates the Makefile to be more correct for parallel make.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: Robert Evans <evansr at google.com>
Closes #16030
Closes #16922
DeltaFile
+1-1scripts/Makefile.am
+1-11 files

OpenZFS/src 4425a7bmodule/zfs vdev.c

vdev_open: clear async remove flag after reopen

It's possible for a vdev to be flagged for async remove after the pool
has suspended. If the removed device has been returned when the pool is
resumed, the ASYNC_REMOVE task will still run at the end of txg, and
remove the device from the pool again.

To fix, we clear the async remove flag at reopen, just as we did for the
async fault flag in 5de3ac223.

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>
Signed-off-by: Rob Norris <rob.norris at klarasystems.com>
Closes #16921 
DeltaFile
+1-0module/zfs/vdev.c
+1-01 files

OpenZFS/src 1257314tests/zfs-tests/tests/functional/pool_checkpoint checkpoint_discard_busy.ksh

ZTS: checkpoint_discard_busy should use save_tunable/restore_tunable

Instead of using hardwired value for SPA_DISCARD_MEMORY_LIMIT,
use save_tunable and restore_tunable to restore the pre-test state.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <mav at FreeBSD.org>
Signed-off-by: Toomas Soome <tsoome at me.com>
Closes #16919 
DeltaFile
+5-4tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_discard_busy.ksh
+5-41 files

OpenZFS/src cfec8f1module/os/freebsd/zfs zfs_vnops_os.c

zfs_vnops_os.c: fallocate is valid but not supported on FreeBSD

This works around
/usr/lib/go-1.18/pkg/tool/linux_amd64/link:
mapping output file failed: invalid argument

It's happened to me under a Linux jail, but it's also happened to other
people, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270247#c4

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <mav at FreeBSD.org>
Signed-off-by: pstef <pstef at users.noreply.github.com>
Closes #16918
DeltaFile
+1-1module/os/freebsd/zfs/zfs_vnops_os.c
+1-11 files

OpenZFS/src e47b033tests/zfs-tests/tests/functional/pam cleanup.ksh

ZTS: remove unused TESTDIRS from pam/cleanup.ksh

Remove TESTDIRS as it is not set for pam tests.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <mav at FreeBSD.org>
Signed-off-by: Toomas Soome <tsoome at me.com>
Closes #16920 
DeltaFile
+1-1tests/zfs-tests/tests/functional/pam/cleanup.ksh
+1-11 files

OpenZFS/src ee3bde9tests/zfs-tests/tests/functional/pool_checkpoint checkpoint_discard_busy.ksh

ZTS: checkpoint_discard_busy should use save_tunable/restore_tunable

Instead of using hardwired value for SPA_DISCARD_MEMORY_LIMIT,
use save_tunable and restore_tunable to restore the pre-test state.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <mav at FreeBSD.org>
Signed-off-by: Toomas Soome <tsoome at me.com>
Closes #16919 
DeltaFile
+5-4tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_discard_busy.ksh
+5-41 files

OpenZFS/src c02e1cfmodule/zfs vdev.c

vdev_open: clear async remove flag after reopen

It's possible for a vdev to be flagged for async remove after the pool
has suspended. If the removed device has been returned when the pool is
resumed, the ASYNC_REMOVE task will still run at the end of txg, and
remove the device from the pool again.

To fix, we clear the async remove flag at reopen, just as we did for the
async fault flag in 5de3ac223.

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>
Signed-off-by: Rob Norris <rob.norris at klarasystems.com>
Closes #16921 
DeltaFile
+1-0module/zfs/vdev.c
+1-01 files

OpenZFS/src e94549dtests/zfs-tests/tests/functional/pam cleanup.ksh

ZTS: remove unused TESTDIRS from pam/cleanup.ksh

Remove TESTDIRS as it is not set for pam tests.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <mav at FreeBSD.org>
Signed-off-by: Toomas Soome <tsoome at me.com>
Closes #16920 
DeltaFile
+1-1tests/zfs-tests/tests/functional/pam/cleanup.ksh
+1-11 files

OpenZFS/src 478b095module/os/freebsd/zfs zfs_vnops_os.c

zfs_vnops_os.c: fallocate is valid but not supported on FreeBSD

This works around
/usr/lib/go-1.18/pkg/tool/linux_amd64/link:
mapping output file failed: invalid argument

It's happened to me under a Linux jail, but it's also happened to other
people, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270247#c4

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <mav at FreeBSD.org>
Signed-off-by: pstef <pstef at users.noreply.github.com>
Closes #16918
DeltaFile
+1-1module/os/freebsd/zfs/zfs_vnops_os.c
+1-11 files

OpenZFS/src e411081tests/zfs-tests/tests/functional/mount cleanup.ksh

ZTS: functional/mount scripts are not removing /var/tmp/testdir.X dirs

cleanup.ksh is assuming we have TESTDIRS set.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <mav at FreeBSD.org>
Signed-off-by: Toomas Soome <tsoome at me.com>
Closes #16915 
DeltaFile
+3-1tests/zfs-tests/tests/functional/mount/cleanup.ksh
+3-11 files

OpenZFS/src a55b6fetests/zfs-tests/tests/functional/cli_root/zfs_mount zfs_mount_all_fail.ksh

ZTS: zfs_mount_all_fail leaves /var/tmp/testrootPIDNUM directory around

Before we can remove test files, we need to unmount datasets
used by test first.

See also: zfs_mount_all_mountpoints.ksh

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <mav at FreeBSD.org>
Signed-off-by: Toomas Soome <tsoome at me.com>
Closes #16914 
DeltaFile
+11-3tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_all_fail.ksh
+11-31 files