Commit Graph

9473 Commits

Author SHA1 Message Date
Rob Norris 8d343173bf
Merge dc705e83f0 into 1713aa7b4d 2024-09-10 13:50:42 -07:00
Tino Reichardt 1713aa7b4d
Remove set but not used variable in ddt.c (#16522)
module/zfs/ddt.c:2612:6: error: variable 'total' set but not used

Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
2024-09-10 12:46:50 -07:00
Alan Somers 308f7c2f14
Fix an uninitialized data access (#16511)
zfs_acl_node_alloc allocates an uninitialized data buffer, but upstack
zfs_acl_chmod only partially initializes it.  KMSAN reported that this
memory remained uninitialized at the point when it was read by
lzjb_compress, which suggests a possible kernel memory disclosure bug.

The full KMSAN warning may be found in the PR.
https://github.com/openzfs/zfs/pull/16511

Signed-off-by:	Alan Somers <asomers@gmail.com>
Sponsored by:	Axcient
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
2024-09-10 09:08:45 -07:00
Rob Norris 63253dbf4f
zts-report: don't crash on non-UTF-8 chars in the log (#16497)
The report generator expects the log to be clean and tidy UTF-8. That
can be a problem if you use some of the verbose/debug test runner
options, which sends all sorts of weird output from arbitrary programs
to the log.

This just makes Python a little more relaxed about such things. It
shouldn't matter in practice, as those lines didn't match the test
result regex anyway, and are discarded immediately.


Sponsored-by: https://despairlabs.com/sponsor/

Signed-off-by: Rob Norris <robn@despairlabs.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
2024-09-09 17:49:14 -07:00
Jessica Clarke 88433e640d
sys/types32.h: Remove struct timeval32 from libspl's header (#16491)
macOS Sequoia's sys/sockio.h, as included by various bootstrap tools
whilst building FreeBSD, has started to include net/if.h, which then
includes sys/_types/_timeval32.h and provide a conflicting definition
for struct timeval32. Since this type is entirely unused within OpenZFS,
simply delete the type rather than adding in some kind of OS detection.

This fixes building FreeBSD on macOS Sequoia (Beta).

Signed-off-by: Jessica Clarke <jrtc27@jrtc27.com>
Reviewed-by: Rob Norris <rob.norris@klarasystems.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
2024-09-09 17:37:12 -07:00
Rob Norris 8be2f4c3d2
zio_resume: log when unsuspending the pool (#16485)
When reviewing logs after a failure, its useful to see where
unsuspend/resume was requested.


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

Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
2024-09-09 17:21:20 -07:00
Rob Norris 5c67820265
libzstd: also build with LIBZPOOL_CPPFLAGS
libzstd now also allocates its own abd_t, and so has the same issue as
zstream did, so this applies the same workaround: compile it with
ZFS_DEBUG. See 92fca1c2d.

This looks weird, because libzstd doesn't appear to look related to the
ZFS kernel, but there is already a cross-dependency there: zstd needs
zfs_lz4_compress, and zfs needs zfs_zstd_compress (and others), so the
two can never really be separated without more work. Another job for
another time.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Mark Maybee <mmaybee@delphix.com>
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Closes #16489
2024-09-09 14:13:27 -07:00
Rob Norris b109925820
spa_prop_get: require caller to supply output nvlist
All callers to spa_prop_get() and spa_prop_get_nvlist() supplied their
own preallocated nvlist (except ztest), so we can remove the option to
have them allocate one if none is supplied.

This sidesteps a bug in spa_prop_get(), where the error var wasn't
initialised, which could lead to the provided nvlist being freed at the
end.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Jorgen Lundman <lundman@lundman.net>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Closes #16505
2024-09-06 08:45:58 -07:00
Rob Norris dc705e83f0 config: fix various bits of missing output
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris 6d2d9cd821 config: remove test for unused s_d_op
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris a8604e43a7 config: remove HAVE_MODE_LOOKUP_BDEV
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris 5375faa7e6 config: remove HAVE_HAS_CAPABILITY
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris 510c43fd49 config: remove HAVE_BIO_SET_DEV
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris a7c21d037a config: rework ZFS_GENHD_FL_*
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris 5e71c9508e config: remove HAVE_GENERIC_IO_ACCT_3ARG
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris b5bdfccda1 config: remove HAVE_VFSMOUNT_IOPS_GETATTR
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris b1c2f48dbf config: remove HAVE_GENERIC_READLINK
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris 2613255956 linux/zvol_os: convert END_IO macro to inline function
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris 02f0b3c4de config: remove HAVE_BLK_MQ
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris 0d1f683730 config: remove HAVE_BLK_QUEUE_FLAG_*
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris abd0157c85 config: remove ZFS_GLOBAL_ZONE_PAGE_STATE and ZFS_ENUM_* generation
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris 8c4eec1891 config: remove ZFS_GLOBAL_ZONE_PAGE_STATE
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris d6fd0873bd config: remove HAVE_WAIT_QUEUE_*
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris 23eef4a7f5 config: remove HAVE_TMPFILE
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris 0c230089ef config: remove HAVE_SUPER_SETUP_BDI_NAME
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris f84e127940 config: remove HAVE_SIGNAL_STOP
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris 57c1b33abe config: remove HAVE_SET_SPECIAL_STATE
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris b5737fbcd7 config: remove HAVE_SCHED_SIGNAL_HEADER
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris 8a7387af46 config: remove HAVE_PERCPU_COUNTER_ADD_BATCH
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris 6612451009 config: remove HAVE_KVMALLOC
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris eec6e642c5 config: remove HAVE_KTIME_GET_RAW_TS64
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris d55377ae3c config: remove HAVE_KTIME_GET_COARSE_REAL_TS64
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris 4770c4c8d9 config: remove HAVE_KMEM_CACHE_CREATE_USERCOPY
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris 28de0e7422 config: remove HAVE_KERNEL_TIMER_SETUP
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris efc8ab329e config: remove HAVE_KERNEL_TIMER_FUNCTION_TIMER_LIST
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris 12d9a9b316 config: remove HAVE_KERNEL_(READ|WRITE)_PPOS
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris 7f4d413801 config: remove HAVE_INODE_TIMESPEC64_TIMES
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris 1ff3c69f44 config: remove HAVE_INODE_SET_IVERSION
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris 0c04b43a13 config: remove HAVE_FILEMAP_RANGE_HAS_PAGE
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris 41a2ab4662 config: remove HAVE_FILE_FADVISE
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris 343007aeeb config: remove HAVE_BIO_BI_STATUS and bio error compat
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris c7d5ec1b5a config: remove HAVE_ACL_REFCOUNT
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris 0b95cabc0e config: remove HAVE_[24]ARGS_VFS_GETATTR
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris b32d727885 config: remove HAVE_BLK_QUEUE_SECDISCARD
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris 45de041e46 config: remove HAVE_RENAME2
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
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 eb0f24ae24 config: remove ZFS_GLOBAL_NODE_PAGE_STATE
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
2024-09-06 19:42:56 +10:00
Rob Norris a373b85bba config: remove HAVE_XATTR_GET_DENTRY_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 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