aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | files.amd64: remove some lines duplicated from files.x86Kyle Evans5 days1-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | These were added to files.x86 because they were duplicated in both files.i386 and files.amd64, but they did not end up removed in the latter. Garbage collect them now. Reviewed by: jhibbits Fixes: b9c6fa339d9c7 ("files.x86: Pull in some more duplicate [...]") Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D54295
* | LinuxKPI: bitcount fix builds with gcc and older llvmBjoern A. Zeeb5 days2-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LLVM before 19 and gcc before 14 do not support __builtin_popcountg(). Use __const_bitcount<n> from sys/bitcount.h as a replacement in these cases. This should still allow drm-kmod to build where the size needs to be known at compile-time. Remove the conditional for gcc around the iwlwifi modules build, which was collateral damage in all this. Sponsored by: The FreeBSD Foundation Fixes: 7cbc4d875971, 5e0a4859f28a MFC after: 3 days Reviewed by: brooks, emaste (without the sys/modules/Makefile change) Differential Revision: https://reviews.freebsd.org/D54297
* | sys/bitcount.h: add __const_bitcount<n>Bjoern A. Zeeb5 days1-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | Add a version of __const_bitcount<n> which can be used to get the numbers at compile-time when __builtin_popcountg() is not available (see sys/compat/linuxkpi/common/include/linux/bitops.h for LLVM before 19 and gcc before 14). Obtained from: https://reviews.freebsd.org/D50995#1174884 by obiwac Sponsored by: The FreeBSD Foundation Reviewed by: brooks, emaste Differential Revision: https://reviews.freebsd.org/D54301
* | zfs: merge openzfs/zfs@962e68865Martin Matuska5 days61-717/+1340
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notable upstream pull request merges: #16307 1d43387dd zdb: Add -O option for -r to specify object-id #17965 a62c62120 ARC: Pre-convert zfs_arc_min_prefetch_ms #17970 d393166c5 ARC: Increase parallel eviction batching #17981 20f09eae4 ZIO: ZIO_STAGE_DDT_WRITE is a blocking stage #17983 ff47dd35e Fix ddtprune causing space leak #18015 86b064469 FreeBSD: Fix a potential null dereference in zfs_freebsd_fsync() (already merged) #18020 ff47dd35e Ensure 64-bit `off_t` is used in user space instead of `loff_t` #18028 09492e0f2 Reduce dataset buffers re-dirtying #18033 f72fd378c Defer async destroys on pool import #18043 3d76ba273 Improve async destroy processing timing #18044 46d6f1fe5 DDT: Move logs searches out of the lock #18047 ff5414406 DDT: Switch to using ZAP _by_dnode() interfaces #18048 3b1ff816b DDT: Add/use zap_lookup_length_uint64_by_dnode() #18055 22e89aca8 DDT: Fix compressed entry buffer size #18059 0550abd4b RAIDZ: Remove some excessive logging #18060 a83bb15fc Reduce minimal scrub/resilver times #18061 962e68865 Use reduced precision for scan times #18063 051a8c749 Bypass snprintf() in quota checks if no quotas set #18064 7ff329ac2 Fix rangelock test for growing block size Obtained from: OpenZFS OpenZFS commit: 962e68865e4a569a8a51a07a45dcae7c33cdca78
| * | Use reduced precision for scan timesvendor/openzfs/masterAlexander Motin6 days3-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | Scan time limits do not need precision beyond 1ms. Switching scn_sync_start_time and spa_sync_starttime from gethrtime() to getlrtime() saves ~3% of CPU time during resilver scan stage. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Alexander Motin <alexander.motin@TrueNAS.com> Closes #18061
| * | Reduce minimal scrub/resilver timesAlexander Motin6 days2-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With higher throughput and lower latency of modern devices ZFS can happily live with pretty short (fractions of a second) TXGs. But the two decade old multi-second minimal time limits can almost stop payload writes by extending TXGs beyond dirty data limits of ARC ability to amortize it. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Alexander Motin <alexander.motin@TrueNAS.com> Closes #18060
| * | zdb: Add -O option for -r to specify object-idAllan Jude6 days2-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "zdb -r -O pool/dataset obj-id destination" will copy the file with object-id obj-id to the named destination; without -O it'll still be interpreted as a pathname. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Akash B <akash-b@hpe.com> Signed-off-by: Sean Eric Fagan <sean.fagan@klarasystems.com> Closes #16307
| * | Fix rangelock test for growing block sizeMark Maybee6 days2-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the file already has more than one block, then the current block size cannot change. But if the file block size is less than the maximum block size supported by the file system, and there are multiple blocks in the file, the current code will almost always extend the rangelock to its maximum size. This means that all writes become serialized and even reads are slowed as they will more often contend with writes. This commit adjusts the test so that we will not lock the entire range if there is more than one block in the file already. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Signed-off-by: Mark Maybee <mark.maybee@perforce.com> Closes #18046 Closes #18064
| * | Bypass snprintf() in quota checks if no quotas setAlexander Motin7 days1-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | This improves synthetic 1 byte write speed by ~2.5%. Reviewed-by: Ameer Hamza <ahamza@ixsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: George Melikov <mail@gmelikov.ru> Signed-off-by: Alexander Motin <alexander.motin@TrueNAS.com> Closes #18063
| * | RAIDZ: Remove some excessive loggingAlexander Motin7 days1-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were some per I/O logging into dbgmsg in RAIDZ code, that increased CPU load and wiped useful content out of dbgmsg, for example during routine disk replacement process. I don't think we need it to be that verbose. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Alexander Motin <alexander.motin@TrueNAS.com> Closes #18059
| * | Change shellcheck and checkbashism triggers.Turbo Fredriksson8 days2-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Newer versions of `shellcheck` and `checkbashism` finds more than previous, so fix those. Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Rob Norris <robn@despairlabs.com> Signed-off-by: Turbo Fredriksson <turbo@bayour.com> Closes #18000
| * | Replace bashisms in ZFS shell function stub.Turbo Fredriksson8 days1-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `type` command is an optional feature in POSIX, so shouldn't be used. Instead, use `command -v`, which commit e865e7809e3c920d1d37e52978ea1175957cc4a0 did, but it missed this file. Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Rob Norris <robn@despairlabs.com> Signed-off-by: Turbo Fredriksson <turbo@bayour.com> Closes #18000
| * | Make lines stay within 80 char limit.Turbo Fredriksson8 days1-36/+61
| | | | | | | | | | | | | | | | | | | | | Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Rob Norris <robn@despairlabs.com> Signed-off-by: Turbo Fredriksson <turbo@bayour.com> Closes #18000
| * | Add some comments to clarify the mounting of filesystems.Turbo Fredriksson8 days1-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no real documenation (which should probably be written!), so instead document the code the best we can on what's going and with the mounting of file systems to make future updates easier. Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Rob Norris <robn@despairlabs.com> Signed-off-by: Turbo Fredriksson <turbo@bayour.com> Closes #18000
| * | Standardise if/then/else and for/do/done lines.Turbo Fredriksson8 days1-38/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | More code standard changes, where if/then is on different lines. To have it on the same, or on different lines, can be argued, but we need to pick one, and try not to mix how to do things. Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Rob Norris <robn@despairlabs.com> Signed-off-by: Turbo Fredriksson <turbo@bayour.com> Closes #18000
| * | Add missing initrd config variables.Turbo Fredriksson8 days2-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `ZFS_INITRD_ADDITIONAL_DATASETS` variable is used in the initrd script to boot additional OS file systems besides the root file system. But it wasn't included as an example in the config files. The `ZFS_POOL_EXCEPTIONS` *was* included in the example defaults file, but it was not exported, so not available in the initrd. Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Rob Norris <robn@despairlabs.com> Signed-off-by: Turbo Fredriksson <turbo@bayour.com> Closes #18000
| * | Remove unnecessary sourcing of variables.Turbo Fredriksson8 days1-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The file `/etc/default/zfs` is already sourced by the `/etc/zfs/zfs-functions`, so no need to source it again. Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Rob Norris <robn@despairlabs.com> Signed-off-by: Turbo Fredriksson <turbo@bayour.com> Closes #18000
| * | Fix issue with finding degraded pool(s).Turbo Fredriksson8 days1-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a pool is degraded, or needs special action, the `zpool import` (without pool to import) line will report: ``` pool: rpool id: 01234567890123456789 state: ONLINE action: The pool can be imported using its name or numeric identifier. config: [..] ``` If the import with the pool name fails, it is supposed to try importing using the pool ID. However, the script is also getting the `action` line (and probably `scrub:` if/when that's available): pool; The pool can be imported using its name or numeric identifier.;config:; which causes issues on consequent import attempts. Cleanup the information by rewriting the `sed` command line. Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Rob Norris <robn@despairlabs.com> Signed-off-by: Turbo Fredriksson <turbo@bayour.com> Closes #18000
| * | Prefix all variables that are local with underscore.Turbo Fredriksson8 days1-111/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | This just to make them easier to see. Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Rob Norris <robn@despairlabs.com> Signed-off-by: Turbo Fredriksson <turbo@bayour.com> Closes #18000
| * | Shell script good practices changes.Turbo Fredriksson8 days1-205/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's considered good practice to: 1) Wrap the variable name in `{}`. As in `${variable}` instead of `$variable`. 2) Put variables in `"`. Also some minor error message tuning. Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Rob Norris <robn@despairlabs.com> Signed-off-by: Turbo Fredriksson <turbo@bayour.com> Closes #18000
| * | Fix potential global variable overwrite.Turbo Fredriksson8 days1-55/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a previous commit (e865e7809e3c920d1d37e52978ea1175957cc4a0), the `local` keyword was removed in functions because of bashism. Removing bashisms is correct, however this could cause variable overwrites, since several functions use the same variable name. So this commit make function variables unique in the (now) global name space. The problem from the original bug report (see #17963) could not be duplicated, but it is still sane to make sure that variables stay unique. Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Rob Norris <robn@despairlabs.com> Signed-off-by: Turbo Fredriksson <turbo@bayour.com> Closes #18000
| * | CI: Use Ubuntu mirrors instead of azure (#18057)Tony Hutter8 days1-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the official Ubuntu apt mirrors instead of azure.archive.ubuntu.com, since that mirror can be slow: https://github.com/actions/runner-images/issues/7048 This can help speed up the 'Setup QEMU' stage. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes #18057
| * | Remove the obsolete FreeBSD 14.2-RELEASE from CIAlan Somers9 days2-9/+2
| | | | | | | | | | | | | | | | | | | | | Sponsored by: ConnectWise Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Signed-off-by: Alan Somers <asomers@gmail.com> Closes #18013
| * | CI: Change timeout valuesTony Hutter9 days2-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'Setup QEMU' CI step updates and installs all packages necessary to startup QEMU. Typically the step takes a little over a minute, but we've seen cases where it can take legitimately take more than 45min minutes. Change the timeout to 60 minutes. In addition, change the 'Install dependencies' timeout to 60min since we've also seen timeouts there. Lastly, remove all timeouts from the zfs-qemu-packages workflow. We do this so that we can always build packages from a branch, even if the time it takes to do a CI step changes over time. It's ok to eliminate the timeouts from the zfs-qemu-packages completely since that workflow is only run manually. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes #18056
| * | DDT: Fix compressed entry buffer sizeAlexander Motin9 days1-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | The first byte of the entry after compression is used for algorithm and byte order flag. We should decrement when calling compression/ decompression algorithm. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Alexander Motin <alexander.motin@TrueNAS.com> Closes #18055
| * | DDT: Add/use zap_lookup_length_uint64_by_dnode()Alexander Motin9 days5-26/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike other ZAP consumers due to compression DDT does not know how big entry it is reading from ZAP. Due to this it called zap_length_uint64_by_dnode() and zap_lookup_uint64_by_dnode(), each of which does full ZAP entry lookup. Introduction of the combined ZAP method dramatically reduces the CPU overhead and locks contention at DBUF layer. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Alexander Motin <alexander.motin@TrueNAS.com> Closes #18048
| * | DDT: Switch to using ZAP _by_dnode() interfacesAlexander Motin9 days6-63/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As was previously done for BRT, avoid holding/releasing DDT ZAP dnodes for every access. Instead hold the dnodes during all their life time, never releasing. While at this, add _by_dnode() interfaces for zap_length_uint64() and zap_count(), actively used by DDT code. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Alexander Motin <alexander.motin@TrueNAS.com> Closes #18047
| * | DDT: Move logs searches out of the lockAlexander Motin9 days5-61/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Postponing entry removal from the DDT log in case of hit till later single-threaded sync stage allows to make ddl_tree stable during multi-threaded ZIO processing stage. It allows to drop the DDT lock before the search instead of after, reducing the contention a lot. Actually ddt_log_update_entry() was already handling the case of entry present in the active log, so we only need to remove it from flushing log, if the entry happen to be there. My tests with parallel 4KB block writes show throughput increase from 480MB/s (122K blocks/s) to 827MB/s (212K blocks/s), even though still limited by the global DDT lock contention. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Alexander Motin <alexander.motin@TrueNAS.com> Closes #18044
| * | Improve async destroy processing timingAlexander Motin13 days3-15/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previous code effectively enforced that all async free ZIOs were _issued_ within the TXG timeout. But they could take forever to complete, especially if the required metadata were not in ARC. This patch introduces periodic waits every 2000 ZIOs, which should give at least somewhat reasonable TXG timings even for single HDD pools with empty ARC. And makes them complete within half of the TXG timeout, since we might still need time to sync DDT and BRT. While there, change zfs_max_async_dedup_frees semantics to include also clone and gang blocks, which are similar. Bump the default value from set long ago to be more forgiving to block cloning (still not having logs and benefiting from large TXGs), now that we have better working time limits. The limit now is a possible amount of dirty data produced by BRT updates. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Allan Jude <allan@klarasystems.com> Signed-off-by: Alexander Motin <alexander.motin@TrueNAS.com> Closes #18043
| * | Defer async destroys on pool importAlexander Motin13 days2-16/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We've observed a number of cases when pool import stuck for many minutes due to large async destroy trying to load DDT or BRT from HDD pool. While proper destroy dosage is a separate problem, lets give import process a chance to complete before that at all. It may be not enough if there is a lot of ZIL to replay, but that is harder to cover, since those are in separate syscalls. Code investigation shown that we already have this mechanism used for scrub/resilver, so this patch converts SCAN_IMPORT_WAIT_TXGS into a tunable and applies it to async destroys also. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Alexander Motin <alexander.motin@TrueNAS.com> Closes #18033
| * | ZTS: Fix zvol_misc_fua SLOG writes checkAlexander Motin13 days1-13/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of comparing number of SLOG writes to number of normal writes we should just make sure SLOG got the required number of writes. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Alexander Motin <alexander.motin@TrueNAS.com> Closes #18033
| * | ZIO: ZIO_STAGE_DDT_WRITE is a blocking stageAlexander Motin14 days1-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ddt_lookup() in zio_ddt_write() might require synchronous DDT ZAP read. Running it from interrupt taskq might lead to deadlock. Inclusion of ZIO_STAGE_DDT_WRITE into ZIO_BLOCKING_STAGES should hopefully fix that, even though I am not sure how I got there. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Alexander Motin <alexander.motin@TrueNAS.com> Closes #17981
| * | ARC: Increase parallel eviction batchingAlexander Motin2025-12-102-27/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before parallel eviction implementation zfs_arc_evict_batch_limit caused loop exits after evicting 10 headers. The cost of it is not big and well motivated. Now though taskq task exit after the same 10 headers is much more expensive. To cover the context switch overhead of taskq introduce another level of batching, controlled by zfs_arc_evict_batches_limit tunable, used only for parallel eviction. My tests including 36 parallel reads with 4KB recordsize that shown 1.4GB/s (~460K blocks/s) before with heavy arc_evict_lock contention, now show 6.5GB/s (~1.6M blocks/s) without arc_evict_lock contention. Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Alexander Motin <alexander.motin@TrueNAS.com> Closes #17970
| * | Linux: work around use of GPL-only symbol `kasan_flag_enabled`Rob Norris2025-12-105-1/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We may not be able to avoid our code referencing the symbol, but we can ensure that a symbol of that name is available to the linker during build, and so not require linking the GPL-exported version. Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rob Norris <robn@despairlabs.com> Closes #18009 Closes #18040
| * | Fix ddtprune causing space leakChunwei Chen2025-12-104-1/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In zio_ddt_free, if a pruned dde is still in ddt, it would do nothing and cause space leak. Reviewed-by: Rob Norris <robn@despairlabs.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Allan Jude <allan@klarasystems.com> Signed-off-by: Chunwei Chen <david.chen@nutanix.com> Closes #17982 Closes #17983
| * | Ensure 64-bit `off_t` is used in user space instead of `loff_t`Alexander Moch2025-12-109-34/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use 64-bit POSIX off_t in user space instead of the Linux kernel type loff_t. This is enforced at configure time via AC_SYS_LARGEFILE and AC_CHECK_SIZEOF([off_t]). loff_t remains in shared headers where they mirror Linux VFS interfaces, and on FreeBSD we typedef loff_t to off_t in those headers since libc does not provide it. Reviewed-by: Rob Norris <robn@despairlabs.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Alexander Moch <mail@alexmoch.com> Closes #18020
| * | ZTS: Add test for snapshot automount raceAmeer Hamza2025-12-104-2/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add snapshot_019_pos to verify parallel snapshot automount operations don't cause AVL tree panic. Regression test for commit 4ce030e025. Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ameer Hamza <ahamza@ixsystems.com> Closes #18035
| * | Linux 6.18 compat: META (#18039)Brian Behlendorf2025-12-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Update the META file to reflect compatibility with the 6.18 kernel. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Reviewed-by: Tony Hutter <hutter2@llnl.gov>
| * | CI: Fix Ubuntu 22.01 rsend failuresTony Hutter2025-12-101-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For whatever reason, the single `log_note` in the `directory_diff` function causes the function to stop executing on Ubuntu 22. This causes most of the rsend tests to fail. Remove the line since it's only informational. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes #18032
| * | Fix a declaration position of the nth_page.Alex2025-12-091-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compilation time bug introduced by 87df5e4 commit. Fix for the compilation error(Linux kernel 6.18.0): "zfs/module/os/linux/zfs/abd_os.c:920:32: error: implicit declaration of function ‘nth_page’; did you mean ‘pte_page’? [-Werror=implicit-function-declaration]". Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Rob Norris <robn@despairlabs.com> Signed-off-by: agiUnderground <alex.dev.cv@gmail.com> Closes #18034
| * | ARC: Pre-convert zfs_arc_min_prefetch_msAlexander Motin2025-12-091-13/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no need to do MSEC_TO_TICK() for each evicted ARC header. We can do it when tunables are set, since we already have separate internal variables for those. Reviewed-by: Rob Norris <robn@despairlabs.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Alexander Motin <alexander.motin@TrueNAS.com> Closes #17965
| * | Reduce dataset buffers re-dirtyingAlexander Motin2025-12-091-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For each block written or freed ZFS dirties ds_dbuf of the dataset. While dbuf_dirty() has a fast path for already dirty dbufs, it still require taking the lock and doing some things visible in profiler. Investigation shown ds_dbuf dirtying by dsl_dataset_block_born() and some of dsl_dataset_block_kill() are just not needed, since by the time they are called in sync context the ds_dbuf is already dirtied by dsl_dataset_sync(). Tests show this reducing large file deletion time by ~3% by saving CPU time of single-threaded part of the sync thread. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Alexander Motin <alexander.motin@TrueNAS.com> Closes #18028
| * | CI: exclude signed-off-by/reviewed-by from 72 char limitBrian Behlendorf2025-12-091-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow an author or reviewer's name and email address to exceed the 72 character limit enforced by the commitcheck target. Reviewed-by: RageLtMan <rageltman@sempervictus> Reviewed-by: Rob Norris <robn@despairlabs.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #18030
| * | Fix HIGHMEM/kmap API violation in zfs_uiomove_bvec_impl()bspengler-oss2025-12-091-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix another instance where ZFS assumes multiple pages can be mapped at once via zfs_kmap_local(), resulting in crashes and potential memory corruption on HIGHMEM-enabled (typically 32-bit) systems. Reviewed-by: RageLtMan <rageltman@sempervictus> Reviewed-by: Rob Norris <robn@despairlabs.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: bspengler-oss <94915855+bspengler-oss@users.noreply.github.com> Closes #15668 Closes #18030
| * | Preserve LIFO ordering of kmap ops in abd_raidz_gen_iterate()bspengler-oss2025-12-091-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ZFS typically preserves proper LIFO ordering regarding map/unmap operations that wrap the Linux kernel's kmap interfaces that require such ordering, but one instance in abd_raidz_gen_iterate() did not. Similar issues have been fixed in the Linux kernel in the past, see for instance CVE-2025-39899 for userfaultfd. Reviewed-by: RageLtMan <rageltman@sempervictus> Reviewed-by: Rob Norris <robn@despairlabs.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: bspengler-oss <94915855+bspengler-oss@users.noreply.github.com> Closes #15668 Closes #18030
| * | Fix interaction of abd_iter_map()/abd_iter_unmap() with HIGHMEMbspengler-oss2025-12-091-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HIGHMEM kmap interfaces operate on only a single page at a time yet ZFS hadn't accounted for this, resulting in crashes and potential memory corruption on HIGHMEM (typically 32-bit) systems. This was caught by PaX's KERNSEAL feature as it makes use of HIGHMEM functionality on x64. On typical 64-bit systems, this issue wouldn't have been observed, as the map interfaces simply fall back to returning an address in lowmem where the contiguous pages can be accessed directly. Joint work with the PaX Team, tested by Mark van Dijk Reviewed-by: RageLtMan <rageltman@sempervictus> Reviewed-by: Rob Norris <robn@despairlabs.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: bspengler-oss <94915855+bspengler-oss@users.noreply.github.com> Closes #15668 Closes #18030
| * | Fix snapshot automount race causing duplicate mounts and AVL tree panicAmeer Hamza2025-12-081-38/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Multiple threads racing to automount the same snapshot can both spawn mount helper processes that successfully complete, causing both parent threads to attempt AVL tree registration and triggering a VERIFY() panic in avl_add(). This occurs because the fsconfig/fsmount API lacks the serialization provided by traditional mount() via lock_mount(). The fix adds a per-entry mutex (se_mtx) to zfs_snapentry_t that serializes mount and unmount operations on the same snapshot. The first mount thread creates a pending entry with se_spa=NULL and holds se_mtx during the helper execution. Concurrent mounts find the pending entry and return success without spawning duplicate helpers. Unmount waits on se_mtx if a mount is pending, ensuring proper serialization. This allows different snapshots to mount in parallel while preventing the AVL panic. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Signed-off-by: Ameer Hamza <ahamza@ixsystems.com> Closes #17943
| * | FreeBSD: Fix a potential null dereference in zfs_freebsd_fsync()Mark Johnston2025-12-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In general it's possible for a vnode to not have an associated VM object. This happens in particular with named pipes, which have some distinct VOPs, defined in zfs_fifoops. Thus, this chunk of zfs_freebsd_fsync() needs to check for the FIFO case, like other vm_object_mightbedirty() callers do. (Note that vn_flush_cached_data() calls are predicated on zn_has_cached_data() returning true, and it checks for a NULL v_object pointer already.) Fixes: ef4058fcdc01838117dd93a654228bac7487a37c Reported-by: Collin Funk <collin.funk1@gmail.com> Reviewed-by: Sean Eric Fagan <sef@FreeBSD.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Signed-off-by: Mark Johnston <markj@FreeBSD.org> Closes #18015
* | | Import latest mtree from NetBSDJose Luis Duran5 days4-41/+43
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge commit 'eb2ccba0c11b405ac613c3046997765317cc8b5c' PR: 192839 PR: 219467 MFC after: 1 week
| * | | Vendor import of NetBSD's mtree at 2025-12-19vendor/NetBSD/mtree/20251219vendor/NetBSD/mtreeJose Luis Duran5 days4-43/+45
| | | |