man: thorough scrub documentation update
Drop the paragraph in the -t option description which details the
resume behavior. This is already covered under the -p option and
there's no need to belabor the point.
Reviewed-by: Alek Pinchuk <Alek.Pinchuk at connectwise.com>
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes #18797
ZTS/block_cloning: test `COPY_FILE_RANGE_CLONE` on FreeBSD 15+
FreeBSD 15 gained a "clone only, never copy" flag for copy_file_range().
This implements it as an option in clonefile, so we can get the test
suite checking it.
Copying the existing FICLONERANGE tests, and changing the clonefile
call to use the copy_file_range(COPY_FILE_RANGE_CLONE) mode available
to ensure correct behaviour on FreeBSD 15.
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Reviewed-by: Christos Longros <chris.longros at gmail.com>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18788
zfs_sync: remove support for impossible scenarios
The superblock pointer will always be set, as will z_log, so remove code
supporting cases that can't occur (on Linux at least).
Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Paul Dagnelie <paul.dagnelie at klarasystems.com>
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 #17420
(cherry picked from commit 52352dd74869d64070e784573d4a01bb55924017)
Signed-off-by: Andriy Tkachuk <atkachuk at wasabi.com>
zfs_sync: return error when pool suspends
If the pool is suspended, we'll just block in zil_commit(). If the
system is shutting down, blocking wouldn't help anyone. So, we should
keep this test for now, but at least return an error for anyone who is
actually interested.
Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Paul Dagnelie <paul.dagnelie at klarasystems.com>
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 #17420
(cherry picked from commit e3f5e317e0ed4da44a10fe202ec80abed1c8cc87)
Signed-off-by: Andriy Tkachuk <atkachuk at wasabi.com>
zts: test syncfs() behaviour when pool suspends
Fairly coarse, but if it returns while the pool suspends, it must be
with an error.
Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Paul Dagnelie <paul.dagnelie at klarasystems.com>
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 #17420
(cherry picked from commit c1b7bc52fe264bf8b96dd667ef55db3bd478c00a)
Signed-off-by: Andriy Tkachuk <atkachuk at wasabi.com>
zpl_sync_fs: work around kernels that ignore sync_fs errors
If the kernel will honour our error returns, use them. If not, fool it
by setting a writeback error on the superblock, if available.
Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Paul Dagnelie <paul.dagnelie at klarasystems.com>
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 #17420
(cherry picked from commit d1c88cbd4cc2ebe5b97fa5b39e7fd83294583ed8)
Signed-off-by: Andriy Tkachuk <atkachuk at wasabi.com>
zts: test syncfs() behaviour when pool suspends
Fairly coarse, but if it returns while the pool suspends, it must be
with an error.
Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Paul Dagnelie <paul.dagnelie at klarasystems.com>
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 #17420
(cherry picked from commit c1b7bc52fe264bf8b96dd667ef55db3bd478c00a)
Signed-off-by: Andriy Tkachuk <atkachuk at wasabi.com>
zfs_sync: remove support for impossible scenarios
The superblock pointer will always be set, as will z_log, so remove code
supporting cases that can't occur (on Linux at least).
Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Paul Dagnelie <paul.dagnelie at klarasystems.com>
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 #17420
(cherry picked from commit 52352dd74869d64070e784573d4a01bb55924017)
Signed-off-by: Andriy Tkachuk <atkachuk at wasabi.com>
zpl_sync_fs: work around kernels that ignore sync_fs errors
If the kernel will honour our error returns, use them. If not, fool it
by setting a writeback error on the superblock, if available.
Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Paul Dagnelie <paul.dagnelie at klarasystems.com>
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 #17420
(cherry picked from commit d1c88cbd4cc2ebe5b97fa5b39e7fd83294583ed8)
Signed-off-by: Andriy Tkachuk <atkachuk at wasabi.com>
zfs_sync: return error when pool suspends
If the pool is suspended, we'll just block in zil_commit(). If the
system is shutting down, blocking wouldn't help anyone. So, we should
keep this test for now, but at least return an error for anyone who is
actually interested.
Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Paul Dagnelie <paul.dagnelie at klarasystems.com>
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 #17420
(cherry picked from commit e3f5e317e0ed4da44a10fe202ec80abed1c8cc87)
Signed-off-by: Andriy Tkachuk <atkachuk at wasabi.com>
CI: Update Alpine Linux runner to 3.24.1
Update the Alpine Linux CI runner from 3.23.2 to 3.24.1.
This refreshes the runner to the latest Alpine release while keeping
the existing CI configuration unchanged.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Alexander Moch <mail at alexmoch.com>
Closes #18790
libzutil: keep valid spare and l2cache paths on import
Unlike the vdev tree, whose paths are read from the scanned labels
and whose label paths are added to the candidate name list (so the
exact match in fix_paths() preserves a persistent name whenever its
symlink is still alive), spare and l2cache configs are obtained from
the pool's MOS by a tryimport. When the on-disk aux label carries
no path (labels last written before eb4a36bce) or a stale one, the
MOS path never appears among the scanned names and fix_paths()
rewrites it to the best scanned candidate. With the default
libblkid discovery that is the bare /dev basename, which is not
stable across reboots. Since 5536c0dee ("Sync AUX label during pool
import") the rewritten path is also synced back to the MOS and the
aux labels, making the reversion permanent.
This is the remaining piece of #13170, where a cache device added by
a /dev/disk/by-* name comes back as e.g. nvme0n1p4 after an export
and import. It also answers the question raised there about #15817:
that change fixed the reversion for aux vdevs whose labels contain a
[28 lines not shown]
Remove libuutil from the pull request template and fix headings
- libuutil was removed in adb316f41.
- Normalize section headers to title case.
- Drop the trailing colon on "Checklist".
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: Alexander Moch <mail at alexmoch.com>
Closes #18791
unit/sha2: test SHA-256, SHA-512 and SHA-512/256
NIST known answers, split updates across the 64- and 128-byte block
boundaries, and cross-implementation equality via zfs_impl_get_ops().
Check SHA-256 and SHA-512 against the one-million-'a' digests based
on the NIST standard.
Reviewed-by: Tino Reichardt <milky-zfs at mcmilk.de>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Christos Longros <chris.longros at gmail.com>
Closes #18779
ZTS: fix zpool_initialize_multiple_pools suspend race
zpool_initialize_multiple_pools verifies that "zpool initialize -a -s"
suspends initializing on all four pools. It starts initializing and,
without slowing it down, expects every pool to still be initializing
when the suspend runs.
On fast storage a pool can finish initializing before the suspend, so
"zpool initialize -a -s" reports "there is no active initialization"
and the pool's status is "completed" rather than "suspended". The
suspend command then fails the test intermittently.
Throttle zfs_initialize_chunk_size before the suspend phase, the same
way the zpool_wait_initialize_* tests do, so initializing stays active
through the suspend and cancel checks. The earlier phases that wait for
initializing to finish ("zpool wait" and "-w -a") are left at the
default chunk size so they still complete promptly.
The chunk size is saved and restored, and the pools are destroyed
[5 lines not shown]
CI: Fix race caused by shared ctr file updates
CTR is shared between the VMs and used as a global counter. This
uncoordinated shared access can result in a CI failure due to the
racing updates. From the log:
`qemu-6-tests.sh: line 27: 1`
`6: syntax error in expression
(error token is "6")`
Resolve the issue by using separate ctr files by appending the ID.
The output now prints the total test cases count along with each VMs
individual count.
Reviewed-by: Tino Reichardt <milky-zfs at mcmilk.de>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: tiehexue <tiehexue at hotmail.com>
Closes #18778
config: remove HAVE_IDMAP_MNT_API check
The check itself is not needed, since we only use it to decide whether
or not to use a define, we can just test the define anyway.
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18769
config/acl: narrow checks to userns inode->dentry change
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18769
config/mkdir: narrow checks to dentry return
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18769
config/tmpfile: narrow checks to userns dentry->file change
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18769
config: remove obsolete idmap/userns checks
Everything has been converted to the new helpers built on the "global"
idmap/userns checks, so we can get rid of all the individual function
checks.
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18769
xattr: use generic checks for ZPL_XATTR_SET_WRAPPER selection
We can't (yet) replace these wrappers but we can use the generic checks
as selector, obsoleting more configure checks.
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18769
zpl_generic_permission: generic over idmap style
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18769
zpl_inode_owner_or_capable: generic over idmap style
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18769
zpl_setattr_prepare: generic over idmap style
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18769
zpl_generic_fillattr: generic over idmap style
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18769
zfs_getattr_fast: single version
The caller always has an idmap of some sort, so we can just call it directly.
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18769
zfs_setattr_idmap: always use idmap version
We added zfs_setattr_idmap in dee19fae05; just use it for all cases now
that we always have an idmap available.
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18769
zpl_inode: use ZPL_IDMAP_IOP_DEFINE for getattr/setattr callbacks
ZPL_GETATTR_WRAPPER and ZPL_SETATTR_WRAPPER were earlier concept of
these defines that didn't actually do enough. Since these are just
regular inode_operations callbacks, we can use ZPL_IDMAP_IOP_DEFINE for
those too and remove the old wrappers.
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18769
zpl_inode: use ZPL_IDMAP_IOP_DEFINE for iops callbacks
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18769