Commit Graph

4644 Commits

Author SHA1 Message Date
Rob Norris 0cf80154cb config: remove HAVE_GENERIC_SETXATTR
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris 4ff18242c0 config: remove HAVE_FILE_AIO_FSYNC
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris e97329d9c8 config: remove HAVE_XATTR_LIST_SIMPLE
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris 319bdb383f config: remove HAVE_XATTR_(GET|SET|LIST)_HANDLER
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris bec9fa2970 config: remove HAVE_XATTR_HANDLER_NAME
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris 332f23cfd0 config: remove HAVE_VFS_ITERATE/HAVE_VFS_ITERATE_SHARED
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris 824a1ff553 config: remove HAVE_VFS_DIRECT_IO_ITER
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris 6a330190f9 config: remove HAVE_VFS_COPY_FILE_RANGE
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris 297ba383f0 config: remove HAVE_PUT_LINK_DELAYED
XXX double check PUT_LINK_COOKIE and GET_LINK_COOKIE, maybe should have
been fixed up earlier

Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris 208c49913f config: remove HAVE_POSIX_ACL_VALID_WITH_NS
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris d67093fe3f config: remove HAVE_KERNEL_GET_ACL_HANDLE_CACHE
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris 0781bba411 config: remove HAVE_GROUP_INFO_GID
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris d11e78d29f config: remove HAVE_GET_LINK_DELAYED
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris c186907646 config: remove HAVE_CPU_HOTPLUG
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris f7ec3238de config: remove HAVE_1ARG_SUBMIT_BIO
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris 8bb5cea300 config: remove HAVE_RENAME2_OPERATIONS_WRAPPER
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris a60154e454 config: remove HAVE_VFS_FILE_OPERATIONS_EXTEND
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris a3001c8fbf config: remove HAVE_NEW_SYNC_READ
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris b1d37c9181 config: remove HAVE_XATTR_(GET|SET|LIST)_DENTRY
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris 10a94be854 config: remove HAVE_WAIT_ON_BIT_ACTION
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris ace9e5e82b config: remove HAVE_VFS_DIRECT_IO_ITER_RW_OFFSET
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris 93e14f1c33 config: remove HAVE_PUT_LINK_NAMEIDATA
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris 290ea69f0c config: remove HAVE_FOLLOW_LINK_NAMEIDATA
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris aaa5a4a6bb config: remove HAVE_D_REVALIDATE_NAMEIDATA
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris 667c38eb1c config: remove HAVE_3ARGS_VFS_GETATTR
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris a089acbaa8 config: remove SHRINK_CONTROL_HAS_NID
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris 43f6e32754 config: remove HAVE_VFS_RW_ITERATE
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris 0d931f7503 config: remove HAVE_USER_NS_COMMON_INUM
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris a617190573 config: remove HAVE_SPLIT_SHRINKER_CALLBACK and HAVE_SINGLE_SHRINKER_CALLBACK
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris ec179922e5 config: remove HAVE_SET_CACHED_ACL_USABLE
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris 6f4205e59a config: remove HAVE_SET_ACL
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris d9d2778215 config: remove HAVE_POSIX_ACL_RELEASE and HAVE_POSIX_ACL_RELEASE_GPL_ONLY
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris e710487950 config: remove HAVE_PERCPU_COUNTER_INIT_WITH_GFP
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris 6f5a0d7bea config: remove HAVE_LINUX_BLK_CGROUP_HEADER
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris 21fb96b57d config: remove HAVE_IO_SCHEDULE_TIMEOUT
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris d1b81297e5 config: remove HAVE_INODE_SET_FLAGS
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris 18afffd384 config: remove HAVE_GENERIC_WRITE_CHECKS_KIOCB
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris 87757a99f8 config: remove HAVE_FSYNC_RANGE
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris c96dd5d732 config: remove HAVE_FALLOC_FL_ZERO_RANGE
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris e8d2aca74b config: remove HAVE_ENCODE_FH_WITH_INODE
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris 45b52fa477 config: remove HAVE_D_PRUNE_ALIASES
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris 71bb03d206 config: remove HAVE_DIRTY_INODE_WITH_FLAGS
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris 0e6e1e53f7 config: remove HAVE_1ARG_BIO_END_IO_T
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:55 +10:00
Rob Norris 82ff9aafd6 value strings: pretty printers for flags and enums
This adds zfs_valstr, a collection of pretty printers for bitfields and
enums. These are useful in debugging, logging and other display contexts
where raw values are difficult for the untrained (or even trained!) eye
to decipher.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
2024-09-05 13:40:05 -07:00
Don Brady d4d79451cb Add DDT prune command
Requires the new 'flat' physical data which has the start
time for a class entry.

The amount to prune can be based on a target percentage of
the unique entries or based on the age (i.e., every entry
older than N days).

Sponsored-by: Klara, Inc.
Sponsored-by: iXsystems, Inc.
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Don Brady <don.brady@klarasystems.com>
Closes #16277
2024-09-04 14:17:02 -07:00
Rob Norris 4a4f7b019f zdb: rework dedup accounting for log, quota and prune
The simplest thing first: add the FDT and log objects to the list of
objects to be considered when checking for leaks.

The rest is based on a conceptual change in all of this patch stack: a
block on disk with a 'D' bit is not necessarily in the DDT at all
(pruned), or in the DDT ZAPs (still on the log).

As such, walking the DDT up front is difficult (for all the reasons that
walking an unflushed log is difficult) and not really useful, since it's
not a reflection of what's on disk anyway.

Instead, we rework things here to be more like the BRT checks. When we
see a dedup'd block, we look it up in the DDT, consume a refcount, and
for the second-or-later instances, count them as duplicates.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Co-authored-by: Allan Jude <allan@klarasystems.com>
Co-authored-by: Don Brady <don.brady@klarasystems.com>
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Sponsored-by: Klara, Inc.
Sponsored-by: iXsystems, Inc.
Closes #16277
2024-09-04 14:16:42 -07:00
Seth Hoffert bf8c61f489
Remove unused sysctl node
PR #14953 removed vdev-level read cache but accidentally left this
sysctl node behind.

Reviewed-by: Rich Ercolani <rincebrain@gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Seth Hoffert <seth.hoffert@gmail.com>
Closes #16493
2024-09-03 17:52:33 -07:00
Rob Norris 50b32cb925
fm: pass io_flags through events & zed as uint64_t
In 4938d01db (#14086) zio_flag_t was converted from an enum (generally
signed 32-bit) to a uint64_t. The corresponding change wasn't made to
the error reporting subsystem, limiting the error flags being delivered
to zed to 32 bits. This bumps the whole pipeline to use uint64s.

A tiny bit of compatibility is added for newer zed working agsinst an
older kernel module, because its easy to do and misdetecting
scrub/resilver errors and taking action is potentially dangerous. Making
it work for new kernel modules against older zed seems to be far more
invasive for far less benefit, so I have not.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Closes #16469
2024-08-26 17:39:13 -07:00
Jitendra Patidar 73866cf346
Fix issig() to check signal_pending after dequeue SIGSTOP/SIGTSTP
When process got SIGSTOP/SIGTSTP, issig() dequeue them and return 0.
But process could still have another signal pending after dequeue. So,
after dequeue, check and return 1, if signal_pending.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Jitendra Patidar <jitendra.patidar@nutanix.com>
Closes #16464
2024-08-26 17:36:49 -07:00
Mateusz Piotrowski 6be8bf5552
zpool: Provide GUID to zpool-reguid(8) with -g (#16239)
This commit extends the zpool-reguid(8) command with a -g flag, which
allows the user to specify the GUID to set.

This change also adds some general tests for zpool-reguid(8).

Sponsored-by: Wasabi Technology, Inc.
Sponsored-by: Klara, Inc.

Signed-off-by: Mateusz Piotrowski <0mp@FreeBSD.org>
Reviewed-by: Rob Norris <rob.norris@klarasystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
2024-08-26 09:27:24 -07:00