History log of /freebsd-current/sys/contrib/openzfs/module/zfs/spa_misc.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# aca928a5 31-May-2024 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@e2357561b

Notable upstream pull request merges:
#15940 41ae864b6 Replace P2ALIGN with P2ALIGN_TYPED and delete P2ALIGN
#16128 5137c132a zpool import output is not formated properly
#16138 efbef9e6c FreeBSD: Add zfs_link_create() error handling
#16146 04bae5ec9 Disable high priority ZIO threads on FreeBSD and Linux
#16151 cc3869153 zfs_ioc_send: use a dedicated taskq thread for send
#16151 adda768e3 spa: remove spa_taskq_dispatch_sync()
#16151 515c4dd21 spa: flatten spa_taskq_dispatch_ent()
#16151 0a543db37 spa_taskq_dispatch_ent: simplify arguments
#16153 975a13259 Add support for parallel pool exports
#16153 89acef992 Simplified the scope of the namespace lock
#16159 136c05321 ZAP: Fix leaf references on zap_expand_leaf() errors
#16162 af5dbed31 Fix scn_queue races on very old pools
#16165 3400127a7 Fix ZIL clone records for legacy holes
#16167 414acbd37 Unbreak FreeBSD cross-build on MacOS broken in 051460b8b
#16172 eced2e2f1 libzfs: Fix mounting datasets under thread limit pressure
#16178 b64afa41d Better control the thread pool size when mounting datasets
#16181 fa99d9cd9 zfs_dbgmsg_print: make FreeBSD and Linux consistent
#16191 e675852bc dbuf: separate refcount calls for dbuf and dbuf_user
#16198 a043b60f1 Correct level handling in zstream recompress
#16204 34906f8bb zap: reuse zap_leaf_t on dbuf reuse after shrink
#16206 d0aa9dbcc Use memset to zero stack allocations containing unions
#16207 8865dfbca Fix assertion in Persistent L2ARC
#16208 08648cf0d Allow block cloning to be interrupted by a signal
#16210 e2357561b FreeBSD: Add const qualifier to members of struct
opensolaris_utsname
#16214 800d59d57 Some improvements to metaslabs eviction
#16216 02c5aa9b0 Destroy ARC buffer in case of fill error
#16225 01c8efdd5 Simplify issig()

Obtained from: OpenZFS
OpenZFS commit: e2357561b9499296bff758afe4868dbc39735675


# b985c9ca 03-May-2024 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@8f1b7a6fa

Notable upstream pull request merges:
#15839 c3f2f1aa2 vdev probe to slow disk can stall mmp write checker
#15888 5044c4e3f Fast Dedup: ZAP Shrinking
#15996 db499e68f Overflowing refreservation is bad
#16118 67d13998b Make more taskq parameters writable
#16128 21bc066ec Fix updating the zvol_htable when renaming a zvol
#16130 645b83307 Improve write issue taskqs utilization
#16131 8fd3a5d02 Slightly improve dnode hash
#16134 a6edc0adb zio: try to execute TYPE_NULL ZIOs on the current task
#16141 b28461b7c Fix arcstats for FreeBSD after zfetch support

Obtained from: OpenZFS
OpenZFS commit: 8f1b7a6fa6762ea4c89198ceb11c521f80b92ddc


# 0d4ad640 23-Apr-2024 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@1f940de07

Notable upstream pull request merges:
#16038 1f940de07 L2ARC: Cleanup buffer re-compression
#16093 c183d164a Parallel pool import
#16094 cd3e6b4f4 Add zfetch stats in arcstats
#16103 35bf25848 Fix: FreeBSD Arm64 does not build currently
#16104 4036b8d02 Refactor dbuf_read() for safer decryption
#16110 9f83eec03 Handle FLUSH errors as "expected"
#16117 c346068e5 zfs get: add '-t fs' and '-t vol' options

Obtained from: OpenZFS
OpenZFS commit: 1f940de07224c2068e7c721222b1f3a519820ca9


# e2257b31 15-Feb-2024 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@e0bd8118d

Notable upstream pull request merges:
#15469 cbe882298 Add slow disk diagnosis to ZED
#15857 d0d273320 Update zfs-snapshot.8
#15864 a5a725440 zfs list: add '-t fs' and '-t vol' options
#15874 6cc93ccde BRT: Fix slop space calculation with block cloning
#15882 a0635ae73 zdb: Fix false leak report for BRT objects

Obtained from: OpenZFS
OpenZFS commit: e0bd8118d04b55b7adf3d9ba256ad4bb53e66512


# 3494f7c0 08-Dec-2023 Martin Matuska <mm@FreeBSD.org>

Notable upstream pull request merges:
#15539 687e4d7f9 Extend import_progress kstat with a notes field
#15544 c7b611926 Allow block cloning across encrypted datasets
#15553 adcea23cb ZIO: Add overflow checks for linear buffers
#15593 5f2700eee zpool: flush output before sleeping
#15609 3e4bef52b Only provide execvpe(3) when needed
#15610 735ba3a7b Use uint64_t instead of u_int64_t
#15612 bcd83ccd2 ZIL: Remove TX_CLONE_RANGE replay for ZVOLs
#15617 55b764e06 ZIL: Do not clone blocks from the future
#15623 727497ccd module/icp/asm-arm/sha2: enable non-SIMD asm kernels
on armv5/6
#15625 9743d0963 BRT: Limit brt_vdev_dump() to only one vdev
#15629 f9765b182 zdb: Dump encrypted write and clone ZIL records
#15634 2aa3a482a ZIL: Remove 128K into 2x68K LWB split optimization
#15639 11656234b FreeBSD: Ensure that zfs_getattr() initializes the
va_rdev field
#15647 4836d293c zfs_refcount_remove: explictly ignore returns
#15649 f0cb6482e setproctitle: fix ununitialised variable
#15650 450f2d0b0 import: ignore return on hostid lookups

Obtained from: OpenZFS
OpenZFS commit: 450f2d0b08e73cfb057d0e301a813418b70d64b9


# 14c2e0a0 08-Nov-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@9198de8f1

Notable upstream pull request merges:
#15197 3bd4df384 Improve ZFS objset sync parallelism
#15455 020f6fd09 FreeBSD: Implement taskq_init_ent()
#15476 3d86999c7 sa_lookup() ignores buffer size
#15478 2a154b848 Fix accounting error for pending sync IO ops in
zpool iostat
#15484 dc45a00ea Add kern.features.zfs
#15486 e36ff84c3 Update the kstat dataset_name when renaming a zvol
#15491 f4cd1bac7 Make abd_raidz_gen_iterate() pass an initialized
pointer to the callback
#15495 58398cbd0 FreeBSD: Optimize large kstat outputs

Obtained from: OpenZFS
OpenZFS commit: 9198de8f1079a8bbb837de3e3f8e236777b1375d


# cbfe9975 21-Sep-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4647353c8

Notable upstream pull request merges:
#15240 bbac1d297 Update the behavior of mountpoint property
#15240 c63aabaf1 Improve the handling of sharesmb,sharenfs properties
#15248 741c215ba Fix l2arc_apply_transforms ztest crash
#15274 ee720ad7b Retire z_nr_znodes
#15278 90149552b ZIL: Fix potential race on flush deferring
#15279 e923bcd16 Update the MOS directory on spa_upgrade_errlog()
#15281 529bec7d7 zed: Allow autoreplace and fault LEDs for removed vdevs
#15288 7228ba111 cmd: add 'help' subcommand to zpool and zfs
#15297 4647353c8 status: report pool suspension state under
failmode=continue

Obtained from: OpenZFS
OpenZFS commit: 4647353c8b2b5ca506da45bb9b01e1f3ef521847


# 2ad756a6 01-Sep-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@95f71c019

Notable upstream pull request merges:
#15018 Increase limit of redaction list by using spill block
#15161 Make zoned/jailed zfsprops(7) make more sense
#15216 Relax error reporting in zpool import and zpool split
#15218 Selectable block allocators
#15227 ZIL: Tune some assertions
#15228 ZIL: Revert zl_lock scope reduction
#15233 ZIL: Change ZIOs issue order

Obtained from: OpenZFS
OpenZFS commit: 95f71c019d7c3e3b728a9b05e2117ce6b09f1b87


# 315ee00f 26-Aug-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@804414aad

Notable upstream pull request merges:
#15024 Add missed DMU_PROJECTUSED_OBJECT prefetch
#15029 Do not request data L1 buffers on scan prefetch
#15036 FreeBSD: catch up to __FreeBSD_version 1400093
#15039 Fix raw receive with different indirect block size
#15047 FreeBSD: Fix build on stable/13 after 1302506
#15049 Fix the ZFS checksum error histograms with larger record sizes
#15052 Reduce bloat in ereport.fs.zfs.checksum events
#15056 Avoid extra snprintf() in dsl_deadlist_merge()
#15061 Ignore pool ashift property during vdev attachment
#15063 Don't panic if setting vdev properties is unsupported for this vdev type
#15067 spa_min_alloc should be GCD, not min
#15071 Add explicit prefetches to bpobj_iterate()
#15072 Adjust prefetch parameters
#15076 Refactor dmu_prefetch()
#15079 set autotrim default to 'off' everywhere
#15080 ZIL: Fix config lock deadlock
#15088 metaslab: tuneable to better control force ganging
#15096 Avoid waiting in dmu_sync_late_arrival()
#15097 BRT should return EOPNOTSUPP
#15103 Remove zl_issuer_lock from zil_suspend()
#15107 Remove fastwrite mechanism
#15113 libzfs: sendrecv: send_progress_thread: handle SIGINFO/SIGUSR1
#15122 ZIL: Second attempt to reduce scope of zl_issuer_lock
#15129 zpool_vdev_remove() should handle EALREADY error return
#15132 ZIL: Replay blocks without next block pointer
#15148 zfs_clone_range should return descriptive error codes
#15153 ZIL: Avoid dbuf_read() before dmu_sync()
#15172 copy_file_range: fix fallback when source create on same txg
#15180 Update outdated assertion from zio_write_compress

Obtained from: OpenZFS
OpenZFS commit: 804414aad224b432590afe3f9ec114ffb49e0f13


# 0a97523d 30-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@009d3288d

Notable upstream pull request merges:
#14654 Pack our DDT ZAPs a bit denser
#14979 Again fix race between zil_commit() and zil_suspend()
#14985 Some ZIO micro-optimizations
#15000 Fix remount when setting multiple properties
#15004 ddt_addref: remove unnecessary phys fill when refcount is 0
#15007 Do not report bytes skipped by scan as issued
#15023 Enable tuning of ZVOL open timeout value

Obtained from: OpenZFS
OpenZFS commit: 009d3288dea524c7ad373b04b65bee8bb6f0bfea
OpenZFS tag: zfs-2.2.0-rc1


# 7b5e6873 28-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@a9d6b0690

Notable upstream pull request merges:
#14925 Another set of vdev queue optimizations
#14964 Use big transactions for small recordsize writes
#14999 ZIL: Fix another use-after-free

Obtained from: OpenZFS
OpenZFS commit: a9d6b0690b1863f39a7efce08b1227f2e9e26abb


# 4e8d558c 10-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@feff9dfed

Notable upstream pull request merges:
#14833 Update compatibility.d files
#14841 ZIL: Reduce scope of per-dataset zl_issuer_lock
#14863 zil: Add some more statistics
#14866 btree: Implement faster binary search algorithm
#14894 Fix inconsistent definition of zfs_scrub_error_blocks_per_txg
#14892 Fix concurrent resilvers initiated at same time
#14903 Fix NULL pointer dereference when doing concurrent 'send' operations
#14910 ZIL: Allow to replay blocks of any size
#14939 Fix the L2ARC write size calculating logic
#14934 Introduce zfs_refcount_(add|remove)_few()
#14946 Improve l2arc reporting in arc_summary
#14953 Finally drop long disabled vdev cache
#14954 Fix the L2ARC write size calculating logic (2)
#14955 Use list_remove_head() where possible
#14959 ZIL: Fix race introduced by f63811f0721

Obtained from: OpenZFS
OpenZFS commit: feff9dfed3df1bbae5dd74959a6ad87d11f27ffb


# c0a83fe0 23-May-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@ad0a55461

Notable upstream pull request merges:
#12355 Teach zpool scrub to scrub only blocks in error log
#14811 Refine special_small_blocks property validation
#14854 zil: Some micro-optimizations
#14855 zil: Free lwb_buf after write completion
#14860 Fixes for issues identified by recent Coverity defect reports
#14861 Probe vdevs before marking removed
#14873 Add the ability to uninitialize a zpool
#14875 Hold db_mtx when updating db_state

Obtained from: OpenZFS
OpenZFS commit: ad0a554614b096698d9969340c4c593690042d5b


# d411c1d6 02-May-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@d96e29576

Notable upstream pull request merges:

#11680 Add support for zpool user properties
#14145 Storage device expansion "silently" fails on degraded vdev
#14405 Create zap for root vdev
#14659 Allow MMP to bypass waiting for other threads
#14674 Miscellaneous FreBSD compilation bugfixes
#14692 Fix some signedness issues in arc_evict()
#14702 Fix typo in check_clones()
#14715 module: small fixes for FreeBSD/aarch64
#14716 Trim needless zeroes from checksum events
#14719 vdev: expose zfs_vdev_max_ms_shift as a module parameter
#14722 Fix "Detach spare vdev in case if resilvering does not happen"
#14723 freebsd clone range fixes
#14728 Fix BLAKE3 aarch64 assembly for FreeBSD and macOS
#14735 Fix in check_filesystem()
#14739 Fix data corruption when cloning embedded blocks
#14758 Fix VERIFY(!zil_replaying(zilog, tx)) panic
#14761 Revert "ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced()"
#14774 FreeBSD .zfs fixups
#14776 FreeBSD: make zfs_vfs_held() definition consistent with declaration
#14779 powerpc64: Support ELFv2 asm on Big Endian
#14788 FreeBSD: add missing vop_fplookup assignments
#14789 PAM: support the authentication facility
#14790 Revert "Fix data race between zil_commit() and zil_suspend()"
#14795 Fix positive ABD size assertion in abd_verify()
#14798 Mark TX_COMMIT transaction with TXG_NOTHROTTLE
#14804 Correct ABD size for split block ZIOs
#14806 Use correct block pointer in block cloning case.
#14808 blake3: fix up bogus checksums in face of cpu migration

Obtained from: OpenZFS
OpenZFS commit: d96e29576c89e6e547cb82b477651d2b85ea0fed


# 2a58b312 03-Apr-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@431083f75

Notable upstream pull request merges:
#12194 Fix short-lived txg caused by autotrim
#13368 ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced()
#13392 Implementation of block cloning for ZFS
#13741 SHA2 reworking and API for iterating over multiple implementations
#14282 Sync thread should avoid holding the spa config write lock
when possible
#14283 txg_sync should handle write errors in ZIL
#14359 More adaptive ARC eviction
#14469 Fix NULL pointer dereference in zio_ready()
#14479 zfs redact fails when dnodesize=auto
#14496 improve error message of zfs redact
#14500 Skip memory allocation when compressing holes
#14501 FreeBSD: don't verify recycled vnode for zfs control directory
#14502 partially revert PR 14304 (eee9362a7)
#14509 Fix per-jail zfs.mount_snapshot setting
#14514 Fix data race between zil_commit() and zil_suspend()
#14516 System-wide speculative prefetch limit
#14517 Use rw_tryupgrade() in dmu_bonus_hold_by_dnode()
#14519 Do not hold spa_config in ZIL while blocked on IO
#14523 Move dmu_buf_rele() after dsl_dataset_sync_done()
#14524 Ignore too large stack in case of dsl_deadlist_merge
#14526 Use .section .rodata instead of .rodata on FreeBSD
#14528 ICP: AES-GCM: Refactor gcm_clear_ctx()
#14529 ICP: AES-GCM: Unify gcm_init_ctx() and gmac_init_ctx()
#14532 Handle unexpected errors in zil_lwb_commit() without ASSERT()
#14544 icp: Prevent compilers from optimizing away memset()
in gcm_clear_ctx()
#14546 Revert zfeature_active() to static
#14556 Remove bad kmem_free() oversight from previous zfsdev_state_list
patch
#14563 Optimize the is_l2cacheable functions
#14565 FreeBSD: zfs_znode_alloc: lock the vnode earlier
#14566 FreeBSD: fix false assert in cache_vop_rmdir when replaying ZIL
#14567 spl: Add cmn_err_once() to log a message only on the first call
#14568 Fix incremental receive silently failing for recursive sends
#14569 Restore ASMABI and other Unify work
#14576 Fix detection of IBM Power8 machines (ISA 2.07)
#14577 Better handling for future crypto parameters
#14600 zcommon: Refactor FPU state handling in fletcher4
#14603 Fix prefetching of indirect blocks while destroying
#14633 Fixes in persistent error log
#14639 FreeBSD: Remove extra arc_reduce_target_size() call
#14641 Additional limits on hole reporting
#14649 Drop lying to the compiler in the fletcher4 code
#14652 panic loop when removing slog device
#14653 Update vdev state for spare vdev
#14655 Fix cloning into already dirty dbufs
#14678 Revert "Do not hold spa_config in ZIL while blocked on IO"

Obtained from: OpenZFS
OpenZFS commit: 431083f75bdd3efaee992bdd672625ec7240d252


# c9539b89 16-Feb-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@57cfae4a2 (master)

Notable upstream pull request merges:
#13816 Fix a race condition in dsl_dataset_sync() when
activating features
#14402 Prefetch on deadlists merge
#14410 Improve resilver ETAs
#14428 Resilver performance tuning
#14439 Resolve WS-2021-0184 vulnerability in zstd
#14440 EIO caused by encryption + recursive gang
#14448 Fix console progress reporting for recursive send
#14454 Improve arc_read() error reporting
#14460 Restore FreeBSD to use .rodata
#14474 Reduce need for contiguous memory for ioctls

Obtained from: OpenZFS
OpenZFS commit: 57cfae4a2f04aaff10c45b3f7975e0fe3ef3e8b8


# bb2d13b6 07-Dec-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@59493b63c (master)

Notable upstream pull request merges:
#13782 Fix setting the large_block feature after receiving a snapshot
#14157 FreeBSD: stop using buffer cache-only routines on sync
#14172 zed: post a udev change event from spa_vdev_attach()
#14181 zed: unclean disk attachment faults the vdev
#14190 Bump checksum error counter before reporting to ZED
#14196 Remove atomics from zh_refcount
#14197 Don't leak packed recieved proprties
#14198 Switch dnode stats to wmsums
#14199 Remove few pointer dereferences in dbuf_read()
#14200 Micro-optimize zrl_remove()
#14204 Lua: Fix bad bitshift in lua_strx2number()
#14212 Zstd fixes
#14218 Avoid a null pointer dereference in zfs_mount() on FreeBSD
#14235 nopwrites on dmu_sync-ed blocks can result in a panic
#14236 zio can deadlock during device removal
#14247 Micro-optimize fletcher4 calculations
#14261 FreeBSD: zfs_register_callbacks() must implement error check
correctly

Obtained from: OpenZFS
OpenZFS commit: 59493b63c18ea223857066218d6a58b67eb88159


# dbd5678d 16-Nov-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@2163cde45

Notable upstream pull request merges:
#13680 Add options to zfs redundant_metadata property
#13758 Allow mounting snapshots in .zfs/snapshot as a regular user
#13838 quota: disable quota check for ZVOL
#13839 quota: extend quota for dataset
#13973 Fix memory leaks in dmu_send()/dmu_send_obj()
#13977 Avoid unnecessary metaslab_check_free calling
#13978 PAM: Fix unchecked return value from zfs_key_config_load()
#13979 Handle possible null pointers from malloc/strdup/strndup()
#13997 zstream: allow decompress to fix metadata for uncompressed
records
#13998 zvol_wait logic may terminate prematurely
#14001 FreeBSD: Fix a pair of bugs in zfs_fhtovp()
#14003 Stop ganging due to past vdev write errors
#14039 Optimize microzaps
#14050 Fix draid2+2s metadata error on simultaneous 2 drive failures
#14062 zed: Avoid core dump if wholedisk property does not exist
#14077 Propagate extent_bytes change to autotrim thread
#14079 FreeBSD: vn_flush_cached_data: observe vnode locking contract
#14093 Fix ARC target collapse when zfs_arc_meta_limit_percent=100
#14106 Add ability to recompress send streams with new compression
algorithm
#14119 Deny receiving into encrypted datasets if the keys are not
loaded
#14120 Fix arc_p aggressive increase
#14129 zed: Prevent special vdev to be replaced by hot spare
#14133 Expose zfs_vdev_open_timeout_ms as a tunable
#14135 FreeBSD: Fix out of bounds read in zfs_ioctl_ozfs_to_legacy()
#14152 Adds the `-p` option to `zfs holds`
#14161 Handle and detect #13709's unlock regression

Obtained from: OpenZFS
OpenZFS commit: 2163cde450d0898b5f7bac16afb4e238485411ff


# be181ee2 04-Oct-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@d62bafee9

Notable upstream pull request merges:
#13857 Enforce "-F" flag on resuming recv of full/newfs on existing dataset
#13928 Revert "Reduce dbuf_find() lock contention"
#13928 Dynamically size dbuf hash mutex array
#13930 zpool: Don't print "repairing" on force faulted drives
#13938 Bring per_txg_dirty_frees_percent back to 30
#13939 Fix panic in dsl_process_sub_livelist for EINTR
#13954 Fix bad free in skein code
#13967 Fix potential NULL pointer dereference in dsl_dataset_promote_check()

Obtained from: OpenZFS
OpenZFS commit: d62bafee9fc38f8b9653c531e1861e83dcba4618


# 271171e0 13-Aug-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@b3d0568cf

Notable upstream pull request merges:
#9372 Implement a new type of zfs receive: corrective receive (-c)
#13635 Add snapshots_changed as property
#13636 Add support for per dataset zil stats and use wmsum counters
#13643 Fix scrub resume from newly created hole
#13670 Fix memory allocation for the checksum benchmark
#13695 Skip checksum benchmarks on systems with slow cpu
#13711 zpool: fix redundancy check after vdev removal

Obtained from: OpenZFS
OpenZFS commit: b3d0568cfd65458c92f7ab3d7bb709087992628e


# a0b956f5 07-Jul-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@cb01da680

Notable upstream pull request merges:
#12438 Avoid panic with recordsize > 128k, raw sending and no large_blocks
#13015 Fix dnode byteswapping
#13256 Add a "zstream decompress" subcommand
#13555 Scrub mirror children without BPs
#13576 Several sorted scrub optimizations
#13579 Fix and disable blocks statistics during scrub
#13582 Several B-tree optimizations
#13591 Avoid two 64-bit divisions per scanned block
#13606 Avoid memory copies during mirror scrub
#13613 Avoid memory copy when verifying raidz/draid parity

Obtained from: OpenZFS
OpenZFS commit: cb01da68057dcb9e612e8d2e97d058c46c3574af


# 1f1e2261 23-Jun-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@deb121309

Notable upstream pull request merges:
#12918 Introduce BLAKE3 checksums as an OpenZFS feature
#13553 Reduce ZIO io_lock contention on sorted scrub
#13537 Improve sorted scan memory accounting
#13540 AVL: Remove obsolete branching optimizations
#13563 FreeBSD: Improve crypto_dispatch() handling

Obtained from: OpenZFS
OpenZFS commit: deb1213098e2dc10e6eee5e5c57bb40584e096a6


# da5137ab 28-Mar-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bc3f12bfa (master) into main

Notable upstream pull request merges:
#12083 libzfs: FreeBSD doesn't resize partitions for you
#13106 add physical device size to SIZE column in 'zpool list -v'
#13158 Allow zfs send to exclude datasets
#13190 module: zfs: zio_inject: zio_match_handler: don't << -1
#13219 FreeBSD: add missing replay check to an assert in zfs_xvattr_set
#13220 module: freebsd: avoid a taking a destroyed lock in zfs_zevent bits
#13221 Fix ACL checks for NFS kernel server

Obtained from: OpenZFS
OpenZFS commit: bc3f12bfac152a0c28951cec92340ba14f9ccee9


# e92ffd9b 22-Jan-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@17b2ae0b2 (master) into main

Notable upstream pull request merges:
#12766 Fix error propagation from lzc_send_redacted
#12805 Updated the lz4 decompressor
#12851 FreeBSD: Provide correct file generation number
#12857 Verify dRAID empty sectors
#12874 FreeBSD: Update argument types for VOP_READDIR
#12896 Reduce number of arc_prune threads
#12934 FreeBSD: Fix zvol_*_open() locking
#12947 lz4: Cherrypick fix for CVE-2021-3520
#12961 FreeBSD: Fix leaked strings in libspl mnttab
#12964 Fix handling of errors from dmu_write_uio_dbuf() on FreeBSD
#12981 Introduce a flag to skip comparing the local mac when raw sending
#12985 Avoid memory allocations in the ARC eviction thread

Obtained from: OpenZFS
OpenZFS commit: 17b2ae0b24d487fdda2ef1098ec26fa7f79a61f6


# 681ce946 16-Dec-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f291fa658 (master) into main

Notable upstream pull request merges:
#11711 Vdev Properties Feature
#12717 VOP_RENAME fixes for FreeBSD
#12746 Enable strict hole reporting by default
#12770 ZFS send/recv with ashift 9->12 leads to data corruption
#12828 FreeBSD: Add vop_standard_writecount_nomsyn
#12828 zfs: Fix a deadlock between page busy and the teardown lock
#12828 FreeBSD: Catch up with more VFS changes

Obtained from: OpenZFS
OpenZFS commit: f291fa658efd146540b03ce386133632bde237bf


# 1f88aa09 07-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f3678d70f (master) into main

Notable upstream pull request merges:
#12339 Read past end of argv array in zpool_do_import()
#12365 Fixes in persistent L2ARC
#12383 Fixes for KMSAN reports
#12425 Avoid small buffer copying on write
#12428 Fix unfortunate NULL in spa_update_dspace
#12446 Allow disabling of unmapped I/O on FreeBSD

Obtained from: OpenZFS
OpenZFS commit: f3678d70ff8f98d67caf377ec0326c9a6c7bcf29


# 3f9d360c 22-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@14b43fbd9 (master) into main

Notable upstream pull request merges:
#12271 Tinker with slop space accounting with dedup
#12279 Fix ARC ghost states eviction accounting
#12284 Add Module Parameter Regarding Log Size Limit
#12300 Introduce dsl_dir_diduse_transfer_space()
#12314 Optimize allocation throttling
#12348 Minor ARC optimizations
#12350 Detect HAVE_LARGE_STACKS at compile time
#12356 Use SET_ERROR for more errors in FreeBSD vnops
#12375 FreeBSD: Ignore make_dev_s() errors
#12378 FreeBSD: Switch from MAXPHYS to maxphys on FreeBSD 13+

Obtained from: OpenZFS
OpenZFS commit: 14b43fbd9c13d802409ed886bb6b66fd528fb209


# 7cd22ac4 07-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bdd11cbb9 (master) into main

Notable upstream pull request merges:
#12274 Optimize txg_kick() process
#12281 Move gethrtime() calls out of vdev queue lock
#12287 Remove refcount from spa_config_*(
#12289 Compact dbuf/buf hashes and lock arrays
#12290 Remove avl_size field from struct avl_tree
#12294 Upstream: dmu_zfetch_stream_fini leaks refcount
#12295 Fix abd leak, kmem_free correct size of abd_t
#12328 FreeBSD: Hardcode abd_chunk_size to PAGE_SIZE

Obtained from: OpenZFS
OpenZFS commit: bdd11cbb90a2afa54fd00935ac0d34b4ddf2515c


# 33b8c039 25-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@5e2c8338b (master) into main

Notable upstream pull request merges:
#12183 Optimize small random numbers generation
#12227 Revert Consolidate arc_buf allocation checks
#12266 Fix flag copying in resume case
#12273 zfs_metaslab_mem_limit should be 25 instead of 75
#12276 Update cache file when setting compatibility property
#12280 Help compiller optimize out abd_verify()
#12282 FreeBSD: fix compilation of FreeBSD world after 29274c9f6

Obtained from: OpenZFS
OpenZFS commit: 5e2c8338bf17d31b44eb1dbbb3c9b6a0f64e96ee


# 9db44a8e 13-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9305ff2ed

Notable upstream pull request merges:
#11153 Scalable teardown lock for FreeBSD
#11651 Don't bomb out when using keylocation=file://
#11667 zvol: call zil_replaying() during replay
#11683 abd_get_offset_struct() may allocate new abd
#11693 Intentionally allow ZFS_READONLY in zfs_write
#11716 zpool import cachefile improvements
#11720 FreeBSD: Clean up zfsdev_close to match Linux
#11730 FreeBSD: bring back possibility to rewind the
checkpoint from bootloader

Obtained from: OpenZFS
MFC after: 2 weeks


# caed7b1c 02-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-bedbc13da

Notable upstream commits:
8e43fa12c Fix vdev_rebuild_thread deadlock
03ef8f09e Add missing checks for unsupported features
2e160dee9 Fix assert in FreeBSD-specific dmu_read_pages
bedbc13da Cancel TRIM / initialize on FAULTED non-writeable vdevs

MFC after: 1 week
Obtained from: OpenZFS


# 184c1b94 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-436ab35a5

- speed up writing to ZFS pools without ZIL devices (aa755b3)
- speed up importing ZFS pools (2d8f72d, a0e0199, cf0977a)
...

MFC after: 2 weeks
Reviewed by: mjg (partial)
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D28677


# 7877fdeb 07-Jan-2021 Matt Macy <mmacy@FreeBSD.org>

OpenZFS merge main-gf11b09

- add dRAID support
- fix duplicate close handling
- fix memory leak in prefetch
- fix problem with SIMD benchmarking on FreeBSD boot
...

# c40487d4 01-Oct-2020 Matt Macy <mmacy@FreeBSD.org>

OpenZFS: MFV 2.0-rc3-gfc5966

- Annotate FreeBSD sysctls with CTLFLAG_MPSAFE
- Reduce stack usage of Lua
- Don't save user FPU context in kernel threads
- Add support for procfs_list
- Code cleanup in zio_crypt
- Add DB_RF_NOPREFETCH to dbuf_read()s in dnode.c
- Drop references when skipping dmu_send due to EXDEV
- Eliminate gratuitous bzeroing in dbuf_stats_hash_table_data
- Fix legacy compat for platform IOCs


# eda14cbc 24-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

Initial import from vendor-sys branch of openzfs


# b985c9ca 03-May-2024 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@8f1b7a6fa

Notable upstream pull request merges:
#15839 c3f2f1aa2 vdev probe to slow disk can stall mmp write checker
#15888 5044c4e3f Fast Dedup: ZAP Shrinking
#15996 db499e68f Overflowing refreservation is bad
#16118 67d13998b Make more taskq parameters writable
#16128 21bc066ec Fix updating the zvol_htable when renaming a zvol
#16130 645b83307 Improve write issue taskqs utilization
#16131 8fd3a5d02 Slightly improve dnode hash
#16134 a6edc0adb zio: try to execute TYPE_NULL ZIOs on the current task
#16141 b28461b7c Fix arcstats for FreeBSD after zfetch support

Obtained from: OpenZFS
OpenZFS commit: 8f1b7a6fa6762ea4c89198ceb11c521f80b92ddc


# 0d4ad640 23-Apr-2024 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@1f940de07

Notable upstream pull request merges:
#16038 1f940de07 L2ARC: Cleanup buffer re-compression
#16093 c183d164a Parallel pool import
#16094 cd3e6b4f4 Add zfetch stats in arcstats
#16103 35bf25848 Fix: FreeBSD Arm64 does not build currently
#16104 4036b8d02 Refactor dbuf_read() for safer decryption
#16110 9f83eec03 Handle FLUSH errors as "expected"
#16117 c346068e5 zfs get: add '-t fs' and '-t vol' options

Obtained from: OpenZFS
OpenZFS commit: 1f940de07224c2068e7c721222b1f3a519820ca9


# e2257b31 15-Feb-2024 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@e0bd8118d

Notable upstream pull request merges:
#15469 cbe882298 Add slow disk diagnosis to ZED
#15857 d0d273320 Update zfs-snapshot.8
#15864 a5a725440 zfs list: add '-t fs' and '-t vol' options
#15874 6cc93ccde BRT: Fix slop space calculation with block cloning
#15882 a0635ae73 zdb: Fix false leak report for BRT objects

Obtained from: OpenZFS
OpenZFS commit: e0bd8118d04b55b7adf3d9ba256ad4bb53e66512


# 3494f7c0 08-Dec-2023 Martin Matuska <mm@FreeBSD.org>

Notable upstream pull request merges:
#15539 687e4d7f9 Extend import_progress kstat with a notes field
#15544 c7b611926 Allow block cloning across encrypted datasets
#15553 adcea23cb ZIO: Add overflow checks for linear buffers
#15593 5f2700eee zpool: flush output before sleeping
#15609 3e4bef52b Only provide execvpe(3) when needed
#15610 735ba3a7b Use uint64_t instead of u_int64_t
#15612 bcd83ccd2 ZIL: Remove TX_CLONE_RANGE replay for ZVOLs
#15617 55b764e06 ZIL: Do not clone blocks from the future
#15623 727497ccd module/icp/asm-arm/sha2: enable non-SIMD asm kernels
on armv5/6
#15625 9743d0963 BRT: Limit brt_vdev_dump() to only one vdev
#15629 f9765b182 zdb: Dump encrypted write and clone ZIL records
#15634 2aa3a482a ZIL: Remove 128K into 2x68K LWB split optimization
#15639 11656234b FreeBSD: Ensure that zfs_getattr() initializes the
va_rdev field
#15647 4836d293c zfs_refcount_remove: explictly ignore returns
#15649 f0cb6482e setproctitle: fix ununitialised variable
#15650 450f2d0b0 import: ignore return on hostid lookups

Obtained from: OpenZFS
OpenZFS commit: 450f2d0b08e73cfb057d0e301a813418b70d64b9


# 14c2e0a0 08-Nov-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@9198de8f1

Notable upstream pull request merges:
#15197 3bd4df384 Improve ZFS objset sync parallelism
#15455 020f6fd09 FreeBSD: Implement taskq_init_ent()
#15476 3d86999c7 sa_lookup() ignores buffer size
#15478 2a154b848 Fix accounting error for pending sync IO ops in
zpool iostat
#15484 dc45a00ea Add kern.features.zfs
#15486 e36ff84c3 Update the kstat dataset_name when renaming a zvol
#15491 f4cd1bac7 Make abd_raidz_gen_iterate() pass an initialized
pointer to the callback
#15495 58398cbd0 FreeBSD: Optimize large kstat outputs

Obtained from: OpenZFS
OpenZFS commit: 9198de8f1079a8bbb837de3e3f8e236777b1375d


# cbfe9975 21-Sep-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4647353c8

Notable upstream pull request merges:
#15240 bbac1d297 Update the behavior of mountpoint property
#15240 c63aabaf1 Improve the handling of sharesmb,sharenfs properties
#15248 741c215ba Fix l2arc_apply_transforms ztest crash
#15274 ee720ad7b Retire z_nr_znodes
#15278 90149552b ZIL: Fix potential race on flush deferring
#15279 e923bcd16 Update the MOS directory on spa_upgrade_errlog()
#15281 529bec7d7 zed: Allow autoreplace and fault LEDs for removed vdevs
#15288 7228ba111 cmd: add 'help' subcommand to zpool and zfs
#15297 4647353c8 status: report pool suspension state under
failmode=continue

Obtained from: OpenZFS
OpenZFS commit: 4647353c8b2b5ca506da45bb9b01e1f3ef521847


# 2ad756a6 01-Sep-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@95f71c019

Notable upstream pull request merges:
#15018 Increase limit of redaction list by using spill block
#15161 Make zoned/jailed zfsprops(7) make more sense
#15216 Relax error reporting in zpool import and zpool split
#15218 Selectable block allocators
#15227 ZIL: Tune some assertions
#15228 ZIL: Revert zl_lock scope reduction
#15233 ZIL: Change ZIOs issue order

Obtained from: OpenZFS
OpenZFS commit: 95f71c019d7c3e3b728a9b05e2117ce6b09f1b87


# 315ee00f 26-Aug-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@804414aad

Notable upstream pull request merges:
#15024 Add missed DMU_PROJECTUSED_OBJECT prefetch
#15029 Do not request data L1 buffers on scan prefetch
#15036 FreeBSD: catch up to __FreeBSD_version 1400093
#15039 Fix raw receive with different indirect block size
#15047 FreeBSD: Fix build on stable/13 after 1302506
#15049 Fix the ZFS checksum error histograms with larger record sizes
#15052 Reduce bloat in ereport.fs.zfs.checksum events
#15056 Avoid extra snprintf() in dsl_deadlist_merge()
#15061 Ignore pool ashift property during vdev attachment
#15063 Don't panic if setting vdev properties is unsupported for this vdev type
#15067 spa_min_alloc should be GCD, not min
#15071 Add explicit prefetches to bpobj_iterate()
#15072 Adjust prefetch parameters
#15076 Refactor dmu_prefetch()
#15079 set autotrim default to 'off' everywhere
#15080 ZIL: Fix config lock deadlock
#15088 metaslab: tuneable to better control force ganging
#15096 Avoid waiting in dmu_sync_late_arrival()
#15097 BRT should return EOPNOTSUPP
#15103 Remove zl_issuer_lock from zil_suspend()
#15107 Remove fastwrite mechanism
#15113 libzfs: sendrecv: send_progress_thread: handle SIGINFO/SIGUSR1
#15122 ZIL: Second attempt to reduce scope of zl_issuer_lock
#15129 zpool_vdev_remove() should handle EALREADY error return
#15132 ZIL: Replay blocks without next block pointer
#15148 zfs_clone_range should return descriptive error codes
#15153 ZIL: Avoid dbuf_read() before dmu_sync()
#15172 copy_file_range: fix fallback when source create on same txg
#15180 Update outdated assertion from zio_write_compress

Obtained from: OpenZFS
OpenZFS commit: 804414aad224b432590afe3f9ec114ffb49e0f13


# 0a97523d 30-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@009d3288d

Notable upstream pull request merges:
#14654 Pack our DDT ZAPs a bit denser
#14979 Again fix race between zil_commit() and zil_suspend()
#14985 Some ZIO micro-optimizations
#15000 Fix remount when setting multiple properties
#15004 ddt_addref: remove unnecessary phys fill when refcount is 0
#15007 Do not report bytes skipped by scan as issued
#15023 Enable tuning of ZVOL open timeout value

Obtained from: OpenZFS
OpenZFS commit: 009d3288dea524c7ad373b04b65bee8bb6f0bfea
OpenZFS tag: zfs-2.2.0-rc1


# 7b5e6873 28-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@a9d6b0690

Notable upstream pull request merges:
#14925 Another set of vdev queue optimizations
#14964 Use big transactions for small recordsize writes
#14999 ZIL: Fix another use-after-free

Obtained from: OpenZFS
OpenZFS commit: a9d6b0690b1863f39a7efce08b1227f2e9e26abb


# 4e8d558c 10-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@feff9dfed

Notable upstream pull request merges:
#14833 Update compatibility.d files
#14841 ZIL: Reduce scope of per-dataset zl_issuer_lock
#14863 zil: Add some more statistics
#14866 btree: Implement faster binary search algorithm
#14894 Fix inconsistent definition of zfs_scrub_error_blocks_per_txg
#14892 Fix concurrent resilvers initiated at same time
#14903 Fix NULL pointer dereference when doing concurrent 'send' operations
#14910 ZIL: Allow to replay blocks of any size
#14939 Fix the L2ARC write size calculating logic
#14934 Introduce zfs_refcount_(add|remove)_few()
#14946 Improve l2arc reporting in arc_summary
#14953 Finally drop long disabled vdev cache
#14954 Fix the L2ARC write size calculating logic (2)
#14955 Use list_remove_head() where possible
#14959 ZIL: Fix race introduced by f63811f0721

Obtained from: OpenZFS
OpenZFS commit: feff9dfed3df1bbae5dd74959a6ad87d11f27ffb


# c0a83fe0 23-May-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@ad0a55461

Notable upstream pull request merges:
#12355 Teach zpool scrub to scrub only blocks in error log
#14811 Refine special_small_blocks property validation
#14854 zil: Some micro-optimizations
#14855 zil: Free lwb_buf after write completion
#14860 Fixes for issues identified by recent Coverity defect reports
#14861 Probe vdevs before marking removed
#14873 Add the ability to uninitialize a zpool
#14875 Hold db_mtx when updating db_state

Obtained from: OpenZFS
OpenZFS commit: ad0a554614b096698d9969340c4c593690042d5b


# d411c1d6 02-May-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@d96e29576

Notable upstream pull request merges:

#11680 Add support for zpool user properties
#14145 Storage device expansion "silently" fails on degraded vdev
#14405 Create zap for root vdev
#14659 Allow MMP to bypass waiting for other threads
#14674 Miscellaneous FreBSD compilation bugfixes
#14692 Fix some signedness issues in arc_evict()
#14702 Fix typo in check_clones()
#14715 module: small fixes for FreeBSD/aarch64
#14716 Trim needless zeroes from checksum events
#14719 vdev: expose zfs_vdev_max_ms_shift as a module parameter
#14722 Fix "Detach spare vdev in case if resilvering does not happen"
#14723 freebsd clone range fixes
#14728 Fix BLAKE3 aarch64 assembly for FreeBSD and macOS
#14735 Fix in check_filesystem()
#14739 Fix data corruption when cloning embedded blocks
#14758 Fix VERIFY(!zil_replaying(zilog, tx)) panic
#14761 Revert "ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced()"
#14774 FreeBSD .zfs fixups
#14776 FreeBSD: make zfs_vfs_held() definition consistent with declaration
#14779 powerpc64: Support ELFv2 asm on Big Endian
#14788 FreeBSD: add missing vop_fplookup assignments
#14789 PAM: support the authentication facility
#14790 Revert "Fix data race between zil_commit() and zil_suspend()"
#14795 Fix positive ABD size assertion in abd_verify()
#14798 Mark TX_COMMIT transaction with TXG_NOTHROTTLE
#14804 Correct ABD size for split block ZIOs
#14806 Use correct block pointer in block cloning case.
#14808 blake3: fix up bogus checksums in face of cpu migration

Obtained from: OpenZFS
OpenZFS commit: d96e29576c89e6e547cb82b477651d2b85ea0fed


# 2a58b312 03-Apr-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@431083f75

Notable upstream pull request merges:
#12194 Fix short-lived txg caused by autotrim
#13368 ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced()
#13392 Implementation of block cloning for ZFS
#13741 SHA2 reworking and API for iterating over multiple implementations
#14282 Sync thread should avoid holding the spa config write lock
when possible
#14283 txg_sync should handle write errors in ZIL
#14359 More adaptive ARC eviction
#14469 Fix NULL pointer dereference in zio_ready()
#14479 zfs redact fails when dnodesize=auto
#14496 improve error message of zfs redact
#14500 Skip memory allocation when compressing holes
#14501 FreeBSD: don't verify recycled vnode for zfs control directory
#14502 partially revert PR 14304 (eee9362a7)
#14509 Fix per-jail zfs.mount_snapshot setting
#14514 Fix data race between zil_commit() and zil_suspend()
#14516 System-wide speculative prefetch limit
#14517 Use rw_tryupgrade() in dmu_bonus_hold_by_dnode()
#14519 Do not hold spa_config in ZIL while blocked on IO
#14523 Move dmu_buf_rele() after dsl_dataset_sync_done()
#14524 Ignore too large stack in case of dsl_deadlist_merge
#14526 Use .section .rodata instead of .rodata on FreeBSD
#14528 ICP: AES-GCM: Refactor gcm_clear_ctx()
#14529 ICP: AES-GCM: Unify gcm_init_ctx() and gmac_init_ctx()
#14532 Handle unexpected errors in zil_lwb_commit() without ASSERT()
#14544 icp: Prevent compilers from optimizing away memset()
in gcm_clear_ctx()
#14546 Revert zfeature_active() to static
#14556 Remove bad kmem_free() oversight from previous zfsdev_state_list
patch
#14563 Optimize the is_l2cacheable functions
#14565 FreeBSD: zfs_znode_alloc: lock the vnode earlier
#14566 FreeBSD: fix false assert in cache_vop_rmdir when replaying ZIL
#14567 spl: Add cmn_err_once() to log a message only on the first call
#14568 Fix incremental receive silently failing for recursive sends
#14569 Restore ASMABI and other Unify work
#14576 Fix detection of IBM Power8 machines (ISA 2.07)
#14577 Better handling for future crypto parameters
#14600 zcommon: Refactor FPU state handling in fletcher4
#14603 Fix prefetching of indirect blocks while destroying
#14633 Fixes in persistent error log
#14639 FreeBSD: Remove extra arc_reduce_target_size() call
#14641 Additional limits on hole reporting
#14649 Drop lying to the compiler in the fletcher4 code
#14652 panic loop when removing slog device
#14653 Update vdev state for spare vdev
#14655 Fix cloning into already dirty dbufs
#14678 Revert "Do not hold spa_config in ZIL while blocked on IO"

Obtained from: OpenZFS
OpenZFS commit: 431083f75bdd3efaee992bdd672625ec7240d252


# c9539b89 16-Feb-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@57cfae4a2 (master)

Notable upstream pull request merges:
#13816 Fix a race condition in dsl_dataset_sync() when
activating features
#14402 Prefetch on deadlists merge
#14410 Improve resilver ETAs
#14428 Resilver performance tuning
#14439 Resolve WS-2021-0184 vulnerability in zstd
#14440 EIO caused by encryption + recursive gang
#14448 Fix console progress reporting for recursive send
#14454 Improve arc_read() error reporting
#14460 Restore FreeBSD to use .rodata
#14474 Reduce need for contiguous memory for ioctls

Obtained from: OpenZFS
OpenZFS commit: 57cfae4a2f04aaff10c45b3f7975e0fe3ef3e8b8


# bb2d13b6 07-Dec-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@59493b63c (master)

Notable upstream pull request merges:
#13782 Fix setting the large_block feature after receiving a snapshot
#14157 FreeBSD: stop using buffer cache-only routines on sync
#14172 zed: post a udev change event from spa_vdev_attach()
#14181 zed: unclean disk attachment faults the vdev
#14190 Bump checksum error counter before reporting to ZED
#14196 Remove atomics from zh_refcount
#14197 Don't leak packed recieved proprties
#14198 Switch dnode stats to wmsums
#14199 Remove few pointer dereferences in dbuf_read()
#14200 Micro-optimize zrl_remove()
#14204 Lua: Fix bad bitshift in lua_strx2number()
#14212 Zstd fixes
#14218 Avoid a null pointer dereference in zfs_mount() on FreeBSD
#14235 nopwrites on dmu_sync-ed blocks can result in a panic
#14236 zio can deadlock during device removal
#14247 Micro-optimize fletcher4 calculations
#14261 FreeBSD: zfs_register_callbacks() must implement error check
correctly

Obtained from: OpenZFS
OpenZFS commit: 59493b63c18ea223857066218d6a58b67eb88159


# dbd5678d 16-Nov-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@2163cde45

Notable upstream pull request merges:
#13680 Add options to zfs redundant_metadata property
#13758 Allow mounting snapshots in .zfs/snapshot as a regular user
#13838 quota: disable quota check for ZVOL
#13839 quota: extend quota for dataset
#13973 Fix memory leaks in dmu_send()/dmu_send_obj()
#13977 Avoid unnecessary metaslab_check_free calling
#13978 PAM: Fix unchecked return value from zfs_key_config_load()
#13979 Handle possible null pointers from malloc/strdup/strndup()
#13997 zstream: allow decompress to fix metadata for uncompressed
records
#13998 zvol_wait logic may terminate prematurely
#14001 FreeBSD: Fix a pair of bugs in zfs_fhtovp()
#14003 Stop ganging due to past vdev write errors
#14039 Optimize microzaps
#14050 Fix draid2+2s metadata error on simultaneous 2 drive failures
#14062 zed: Avoid core dump if wholedisk property does not exist
#14077 Propagate extent_bytes change to autotrim thread
#14079 FreeBSD: vn_flush_cached_data: observe vnode locking contract
#14093 Fix ARC target collapse when zfs_arc_meta_limit_percent=100
#14106 Add ability to recompress send streams with new compression
algorithm
#14119 Deny receiving into encrypted datasets if the keys are not
loaded
#14120 Fix arc_p aggressive increase
#14129 zed: Prevent special vdev to be replaced by hot spare
#14133 Expose zfs_vdev_open_timeout_ms as a tunable
#14135 FreeBSD: Fix out of bounds read in zfs_ioctl_ozfs_to_legacy()
#14152 Adds the `-p` option to `zfs holds`
#14161 Handle and detect #13709's unlock regression

Obtained from: OpenZFS
OpenZFS commit: 2163cde450d0898b5f7bac16afb4e238485411ff


# be181ee2 04-Oct-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@d62bafee9

Notable upstream pull request merges:
#13857 Enforce "-F" flag on resuming recv of full/newfs on existing dataset
#13928 Revert "Reduce dbuf_find() lock contention"
#13928 Dynamically size dbuf hash mutex array
#13930 zpool: Don't print "repairing" on force faulted drives
#13938 Bring per_txg_dirty_frees_percent back to 30
#13939 Fix panic in dsl_process_sub_livelist for EINTR
#13954 Fix bad free in skein code
#13967 Fix potential NULL pointer dereference in dsl_dataset_promote_check()

Obtained from: OpenZFS
OpenZFS commit: d62bafee9fc38f8b9653c531e1861e83dcba4618


# 271171e0 13-Aug-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@b3d0568cf

Notable upstream pull request merges:
#9372 Implement a new type of zfs receive: corrective receive (-c)
#13635 Add snapshots_changed as property
#13636 Add support for per dataset zil stats and use wmsum counters
#13643 Fix scrub resume from newly created hole
#13670 Fix memory allocation for the checksum benchmark
#13695 Skip checksum benchmarks on systems with slow cpu
#13711 zpool: fix redundancy check after vdev removal

Obtained from: OpenZFS
OpenZFS commit: b3d0568cfd65458c92f7ab3d7bb709087992628e


# a0b956f5 07-Jul-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@cb01da680

Notable upstream pull request merges:
#12438 Avoid panic with recordsize > 128k, raw sending and no large_blocks
#13015 Fix dnode byteswapping
#13256 Add a "zstream decompress" subcommand
#13555 Scrub mirror children without BPs
#13576 Several sorted scrub optimizations
#13579 Fix and disable blocks statistics during scrub
#13582 Several B-tree optimizations
#13591 Avoid two 64-bit divisions per scanned block
#13606 Avoid memory copies during mirror scrub
#13613 Avoid memory copy when verifying raidz/draid parity

Obtained from: OpenZFS
OpenZFS commit: cb01da68057dcb9e612e8d2e97d058c46c3574af


# 1f1e2261 23-Jun-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@deb121309

Notable upstream pull request merges:
#12918 Introduce BLAKE3 checksums as an OpenZFS feature
#13553 Reduce ZIO io_lock contention on sorted scrub
#13537 Improve sorted scan memory accounting
#13540 AVL: Remove obsolete branching optimizations
#13563 FreeBSD: Improve crypto_dispatch() handling

Obtained from: OpenZFS
OpenZFS commit: deb1213098e2dc10e6eee5e5c57bb40584e096a6


# da5137ab 28-Mar-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bc3f12bfa (master) into main

Notable upstream pull request merges:
#12083 libzfs: FreeBSD doesn't resize partitions for you
#13106 add physical device size to SIZE column in 'zpool list -v'
#13158 Allow zfs send to exclude datasets
#13190 module: zfs: zio_inject: zio_match_handler: don't << -1
#13219 FreeBSD: add missing replay check to an assert in zfs_xvattr_set
#13220 module: freebsd: avoid a taking a destroyed lock in zfs_zevent bits
#13221 Fix ACL checks for NFS kernel server

Obtained from: OpenZFS
OpenZFS commit: bc3f12bfac152a0c28951cec92340ba14f9ccee9


# e92ffd9b 22-Jan-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@17b2ae0b2 (master) into main

Notable upstream pull request merges:
#12766 Fix error propagation from lzc_send_redacted
#12805 Updated the lz4 decompressor
#12851 FreeBSD: Provide correct file generation number
#12857 Verify dRAID empty sectors
#12874 FreeBSD: Update argument types for VOP_READDIR
#12896 Reduce number of arc_prune threads
#12934 FreeBSD: Fix zvol_*_open() locking
#12947 lz4: Cherrypick fix for CVE-2021-3520
#12961 FreeBSD: Fix leaked strings in libspl mnttab
#12964 Fix handling of errors from dmu_write_uio_dbuf() on FreeBSD
#12981 Introduce a flag to skip comparing the local mac when raw sending
#12985 Avoid memory allocations in the ARC eviction thread

Obtained from: OpenZFS
OpenZFS commit: 17b2ae0b24d487fdda2ef1098ec26fa7f79a61f6


# 681ce946 16-Dec-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f291fa658 (master) into main

Notable upstream pull request merges:
#11711 Vdev Properties Feature
#12717 VOP_RENAME fixes for FreeBSD
#12746 Enable strict hole reporting by default
#12770 ZFS send/recv with ashift 9->12 leads to data corruption
#12828 FreeBSD: Add vop_standard_writecount_nomsyn
#12828 zfs: Fix a deadlock between page busy and the teardown lock
#12828 FreeBSD: Catch up with more VFS changes

Obtained from: OpenZFS
OpenZFS commit: f291fa658efd146540b03ce386133632bde237bf


# 1f88aa09 07-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f3678d70f (master) into main

Notable upstream pull request merges:
#12339 Read past end of argv array in zpool_do_import()
#12365 Fixes in persistent L2ARC
#12383 Fixes for KMSAN reports
#12425 Avoid small buffer copying on write
#12428 Fix unfortunate NULL in spa_update_dspace
#12446 Allow disabling of unmapped I/O on FreeBSD

Obtained from: OpenZFS
OpenZFS commit: f3678d70ff8f98d67caf377ec0326c9a6c7bcf29


# 3f9d360c 22-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@14b43fbd9 (master) into main

Notable upstream pull request merges:
#12271 Tinker with slop space accounting with dedup
#12279 Fix ARC ghost states eviction accounting
#12284 Add Module Parameter Regarding Log Size Limit
#12300 Introduce dsl_dir_diduse_transfer_space()
#12314 Optimize allocation throttling
#12348 Minor ARC optimizations
#12350 Detect HAVE_LARGE_STACKS at compile time
#12356 Use SET_ERROR for more errors in FreeBSD vnops
#12375 FreeBSD: Ignore make_dev_s() errors
#12378 FreeBSD: Switch from MAXPHYS to maxphys on FreeBSD 13+

Obtained from: OpenZFS
OpenZFS commit: 14b43fbd9c13d802409ed886bb6b66fd528fb209


# 7cd22ac4 07-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bdd11cbb9 (master) into main

Notable upstream pull request merges:
#12274 Optimize txg_kick() process
#12281 Move gethrtime() calls out of vdev queue lock
#12287 Remove refcount from spa_config_*(
#12289 Compact dbuf/buf hashes and lock arrays
#12290 Remove avl_size field from struct avl_tree
#12294 Upstream: dmu_zfetch_stream_fini leaks refcount
#12295 Fix abd leak, kmem_free correct size of abd_t
#12328 FreeBSD: Hardcode abd_chunk_size to PAGE_SIZE

Obtained from: OpenZFS
OpenZFS commit: bdd11cbb90a2afa54fd00935ac0d34b4ddf2515c


# 33b8c039 25-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@5e2c8338b (master) into main

Notable upstream pull request merges:
#12183 Optimize small random numbers generation
#12227 Revert Consolidate arc_buf allocation checks
#12266 Fix flag copying in resume case
#12273 zfs_metaslab_mem_limit should be 25 instead of 75
#12276 Update cache file when setting compatibility property
#12280 Help compiller optimize out abd_verify()
#12282 FreeBSD: fix compilation of FreeBSD world after 29274c9f6

Obtained from: OpenZFS
OpenZFS commit: 5e2c8338bf17d31b44eb1dbbb3c9b6a0f64e96ee


# 9db44a8e 13-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9305ff2ed

Notable upstream pull request merges:
#11153 Scalable teardown lock for FreeBSD
#11651 Don't bomb out when using keylocation=file://
#11667 zvol: call zil_replaying() during replay
#11683 abd_get_offset_struct() may allocate new abd
#11693 Intentionally allow ZFS_READONLY in zfs_write
#11716 zpool import cachefile improvements
#11720 FreeBSD: Clean up zfsdev_close to match Linux
#11730 FreeBSD: bring back possibility to rewind the
checkpoint from bootloader

Obtained from: OpenZFS
MFC after: 2 weeks


# caed7b1c 02-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-bedbc13da

Notable upstream commits:
8e43fa12c Fix vdev_rebuild_thread deadlock
03ef8f09e Add missing checks for unsupported features
2e160dee9 Fix assert in FreeBSD-specific dmu_read_pages
bedbc13da Cancel TRIM / initialize on FAULTED non-writeable vdevs

MFC after: 1 week
Obtained from: OpenZFS


# 184c1b94 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-436ab35a5

- speed up writing to ZFS pools without ZIL devices (aa755b3)
- speed up importing ZFS pools (2d8f72d, a0e0199, cf0977a)
...

MFC after: 2 weeks
Reviewed by: mjg (partial)
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D28677


# 7877fdeb 07-Jan-2021 Matt Macy <mmacy@FreeBSD.org>

OpenZFS merge main-gf11b09

- add dRAID support
- fix duplicate close handling
- fix memory leak in prefetch
- fix problem with SIMD benchmarking on FreeBSD boot
...

# c40487d4 01-Oct-2020 Matt Macy <mmacy@FreeBSD.org>

OpenZFS: MFV 2.0-rc3-gfc5966

- Annotate FreeBSD sysctls with CTLFLAG_MPSAFE
- Reduce stack usage of Lua
- Don't save user FPU context in kernel threads
- Add support for procfs_list
- Code cleanup in zio_crypt
- Add DB_RF_NOPREFETCH to dbuf_read()s in dnode.c
- Drop references when skipping dmu_send due to EXDEV
- Eliminate gratuitous bzeroing in dbuf_stats_hash_table_data
- Fix legacy compat for platform IOCs


# eda14cbc 24-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

Initial import from vendor-sys branch of openzfs


# 0d4ad640 23-Apr-2024 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@1f940de07

Notable upstream pull request merges:
#16038 1f940de07 L2ARC: Cleanup buffer re-compression
#16093 c183d164a Parallel pool import
#16094 cd3e6b4f4 Add zfetch stats in arcstats
#16103 35bf25848 Fix: FreeBSD Arm64 does not build currently
#16104 4036b8d02 Refactor dbuf_read() for safer decryption
#16110 9f83eec03 Handle FLUSH errors as "expected"
#16117 c346068e5 zfs get: add '-t fs' and '-t vol' options

Obtained from: OpenZFS
OpenZFS commit: 1f940de07224c2068e7c721222b1f3a519820ca9


# e2257b31 15-Feb-2024 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@e0bd8118d

Notable upstream pull request merges:
#15469 cbe882298 Add slow disk diagnosis to ZED
#15857 d0d273320 Update zfs-snapshot.8
#15864 a5a725440 zfs list: add '-t fs' and '-t vol' options
#15874 6cc93ccde BRT: Fix slop space calculation with block cloning
#15882 a0635ae73 zdb: Fix false leak report for BRT objects

Obtained from: OpenZFS
OpenZFS commit: e0bd8118d04b55b7adf3d9ba256ad4bb53e66512


# 3494f7c0 08-Dec-2023 Martin Matuska <mm@FreeBSD.org>

Notable upstream pull request merges:
#15539 687e4d7f9 Extend import_progress kstat with a notes field
#15544 c7b611926 Allow block cloning across encrypted datasets
#15553 adcea23cb ZIO: Add overflow checks for linear buffers
#15593 5f2700eee zpool: flush output before sleeping
#15609 3e4bef52b Only provide execvpe(3) when needed
#15610 735ba3a7b Use uint64_t instead of u_int64_t
#15612 bcd83ccd2 ZIL: Remove TX_CLONE_RANGE replay for ZVOLs
#15617 55b764e06 ZIL: Do not clone blocks from the future
#15623 727497ccd module/icp/asm-arm/sha2: enable non-SIMD asm kernels
on armv5/6
#15625 9743d0963 BRT: Limit brt_vdev_dump() to only one vdev
#15629 f9765b182 zdb: Dump encrypted write and clone ZIL records
#15634 2aa3a482a ZIL: Remove 128K into 2x68K LWB split optimization
#15639 11656234b FreeBSD: Ensure that zfs_getattr() initializes the
va_rdev field
#15647 4836d293c zfs_refcount_remove: explictly ignore returns
#15649 f0cb6482e setproctitle: fix ununitialised variable
#15650 450f2d0b0 import: ignore return on hostid lookups

Obtained from: OpenZFS
OpenZFS commit: 450f2d0b08e73cfb057d0e301a813418b70d64b9


# 14c2e0a0 08-Nov-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@9198de8f1

Notable upstream pull request merges:
#15197 3bd4df384 Improve ZFS objset sync parallelism
#15455 020f6fd09 FreeBSD: Implement taskq_init_ent()
#15476 3d86999c7 sa_lookup() ignores buffer size
#15478 2a154b848 Fix accounting error for pending sync IO ops in
zpool iostat
#15484 dc45a00ea Add kern.features.zfs
#15486 e36ff84c3 Update the kstat dataset_name when renaming a zvol
#15491 f4cd1bac7 Make abd_raidz_gen_iterate() pass an initialized
pointer to the callback
#15495 58398cbd0 FreeBSD: Optimize large kstat outputs

Obtained from: OpenZFS
OpenZFS commit: 9198de8f1079a8bbb837de3e3f8e236777b1375d


# cbfe9975 21-Sep-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4647353c8

Notable upstream pull request merges:
#15240 bbac1d297 Update the behavior of mountpoint property
#15240 c63aabaf1 Improve the handling of sharesmb,sharenfs properties
#15248 741c215ba Fix l2arc_apply_transforms ztest crash
#15274 ee720ad7b Retire z_nr_znodes
#15278 90149552b ZIL: Fix potential race on flush deferring
#15279 e923bcd16 Update the MOS directory on spa_upgrade_errlog()
#15281 529bec7d7 zed: Allow autoreplace and fault LEDs for removed vdevs
#15288 7228ba111 cmd: add 'help' subcommand to zpool and zfs
#15297 4647353c8 status: report pool suspension state under
failmode=continue

Obtained from: OpenZFS
OpenZFS commit: 4647353c8b2b5ca506da45bb9b01e1f3ef521847


# 2ad756a6 01-Sep-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@95f71c019

Notable upstream pull request merges:
#15018 Increase limit of redaction list by using spill block
#15161 Make zoned/jailed zfsprops(7) make more sense
#15216 Relax error reporting in zpool import and zpool split
#15218 Selectable block allocators
#15227 ZIL: Tune some assertions
#15228 ZIL: Revert zl_lock scope reduction
#15233 ZIL: Change ZIOs issue order

Obtained from: OpenZFS
OpenZFS commit: 95f71c019d7c3e3b728a9b05e2117ce6b09f1b87


# 315ee00f 26-Aug-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@804414aad

Notable upstream pull request merges:
#15024 Add missed DMU_PROJECTUSED_OBJECT prefetch
#15029 Do not request data L1 buffers on scan prefetch
#15036 FreeBSD: catch up to __FreeBSD_version 1400093
#15039 Fix raw receive with different indirect block size
#15047 FreeBSD: Fix build on stable/13 after 1302506
#15049 Fix the ZFS checksum error histograms with larger record sizes
#15052 Reduce bloat in ereport.fs.zfs.checksum events
#15056 Avoid extra snprintf() in dsl_deadlist_merge()
#15061 Ignore pool ashift property during vdev attachment
#15063 Don't panic if setting vdev properties is unsupported for this vdev type
#15067 spa_min_alloc should be GCD, not min
#15071 Add explicit prefetches to bpobj_iterate()
#15072 Adjust prefetch parameters
#15076 Refactor dmu_prefetch()
#15079 set autotrim default to 'off' everywhere
#15080 ZIL: Fix config lock deadlock
#15088 metaslab: tuneable to better control force ganging
#15096 Avoid waiting in dmu_sync_late_arrival()
#15097 BRT should return EOPNOTSUPP
#15103 Remove zl_issuer_lock from zil_suspend()
#15107 Remove fastwrite mechanism
#15113 libzfs: sendrecv: send_progress_thread: handle SIGINFO/SIGUSR1
#15122 ZIL: Second attempt to reduce scope of zl_issuer_lock
#15129 zpool_vdev_remove() should handle EALREADY error return
#15132 ZIL: Replay blocks without next block pointer
#15148 zfs_clone_range should return descriptive error codes
#15153 ZIL: Avoid dbuf_read() before dmu_sync()
#15172 copy_file_range: fix fallback when source create on same txg
#15180 Update outdated assertion from zio_write_compress

Obtained from: OpenZFS
OpenZFS commit: 804414aad224b432590afe3f9ec114ffb49e0f13


# 0a97523d 30-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@009d3288d

Notable upstream pull request merges:
#14654 Pack our DDT ZAPs a bit denser
#14979 Again fix race between zil_commit() and zil_suspend()
#14985 Some ZIO micro-optimizations
#15000 Fix remount when setting multiple properties
#15004 ddt_addref: remove unnecessary phys fill when refcount is 0
#15007 Do not report bytes skipped by scan as issued
#15023 Enable tuning of ZVOL open timeout value

Obtained from: OpenZFS
OpenZFS commit: 009d3288dea524c7ad373b04b65bee8bb6f0bfea
OpenZFS tag: zfs-2.2.0-rc1


# 7b5e6873 28-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@a9d6b0690

Notable upstream pull request merges:
#14925 Another set of vdev queue optimizations
#14964 Use big transactions for small recordsize writes
#14999 ZIL: Fix another use-after-free

Obtained from: OpenZFS
OpenZFS commit: a9d6b0690b1863f39a7efce08b1227f2e9e26abb


# 4e8d558c 10-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@feff9dfed

Notable upstream pull request merges:
#14833 Update compatibility.d files
#14841 ZIL: Reduce scope of per-dataset zl_issuer_lock
#14863 zil: Add some more statistics
#14866 btree: Implement faster binary search algorithm
#14894 Fix inconsistent definition of zfs_scrub_error_blocks_per_txg
#14892 Fix concurrent resilvers initiated at same time
#14903 Fix NULL pointer dereference when doing concurrent 'send' operations
#14910 ZIL: Allow to replay blocks of any size
#14939 Fix the L2ARC write size calculating logic
#14934 Introduce zfs_refcount_(add|remove)_few()
#14946 Improve l2arc reporting in arc_summary
#14953 Finally drop long disabled vdev cache
#14954 Fix the L2ARC write size calculating logic (2)
#14955 Use list_remove_head() where possible
#14959 ZIL: Fix race introduced by f63811f0721

Obtained from: OpenZFS
OpenZFS commit: feff9dfed3df1bbae5dd74959a6ad87d11f27ffb


# c0a83fe0 23-May-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@ad0a55461

Notable upstream pull request merges:
#12355 Teach zpool scrub to scrub only blocks in error log
#14811 Refine special_small_blocks property validation
#14854 zil: Some micro-optimizations
#14855 zil: Free lwb_buf after write completion
#14860 Fixes for issues identified by recent Coverity defect reports
#14861 Probe vdevs before marking removed
#14873 Add the ability to uninitialize a zpool
#14875 Hold db_mtx when updating db_state

Obtained from: OpenZFS
OpenZFS commit: ad0a554614b096698d9969340c4c593690042d5b


# d411c1d6 02-May-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@d96e29576

Notable upstream pull request merges:

#11680 Add support for zpool user properties
#14145 Storage device expansion "silently" fails on degraded vdev
#14405 Create zap for root vdev
#14659 Allow MMP to bypass waiting for other threads
#14674 Miscellaneous FreBSD compilation bugfixes
#14692 Fix some signedness issues in arc_evict()
#14702 Fix typo in check_clones()
#14715 module: small fixes for FreeBSD/aarch64
#14716 Trim needless zeroes from checksum events
#14719 vdev: expose zfs_vdev_max_ms_shift as a module parameter
#14722 Fix "Detach spare vdev in case if resilvering does not happen"
#14723 freebsd clone range fixes
#14728 Fix BLAKE3 aarch64 assembly for FreeBSD and macOS
#14735 Fix in check_filesystem()
#14739 Fix data corruption when cloning embedded blocks
#14758 Fix VERIFY(!zil_replaying(zilog, tx)) panic
#14761 Revert "ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced()"
#14774 FreeBSD .zfs fixups
#14776 FreeBSD: make zfs_vfs_held() definition consistent with declaration
#14779 powerpc64: Support ELFv2 asm on Big Endian
#14788 FreeBSD: add missing vop_fplookup assignments
#14789 PAM: support the authentication facility
#14790 Revert "Fix data race between zil_commit() and zil_suspend()"
#14795 Fix positive ABD size assertion in abd_verify()
#14798 Mark TX_COMMIT transaction with TXG_NOTHROTTLE
#14804 Correct ABD size for split block ZIOs
#14806 Use correct block pointer in block cloning case.
#14808 blake3: fix up bogus checksums in face of cpu migration

Obtained from: OpenZFS
OpenZFS commit: d96e29576c89e6e547cb82b477651d2b85ea0fed


# 2a58b312 03-Apr-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@431083f75

Notable upstream pull request merges:
#12194 Fix short-lived txg caused by autotrim
#13368 ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced()
#13392 Implementation of block cloning for ZFS
#13741 SHA2 reworking and API for iterating over multiple implementations
#14282 Sync thread should avoid holding the spa config write lock
when possible
#14283 txg_sync should handle write errors in ZIL
#14359 More adaptive ARC eviction
#14469 Fix NULL pointer dereference in zio_ready()
#14479 zfs redact fails when dnodesize=auto
#14496 improve error message of zfs redact
#14500 Skip memory allocation when compressing holes
#14501 FreeBSD: don't verify recycled vnode for zfs control directory
#14502 partially revert PR 14304 (eee9362a7)
#14509 Fix per-jail zfs.mount_snapshot setting
#14514 Fix data race between zil_commit() and zil_suspend()
#14516 System-wide speculative prefetch limit
#14517 Use rw_tryupgrade() in dmu_bonus_hold_by_dnode()
#14519 Do not hold spa_config in ZIL while blocked on IO
#14523 Move dmu_buf_rele() after dsl_dataset_sync_done()
#14524 Ignore too large stack in case of dsl_deadlist_merge
#14526 Use .section .rodata instead of .rodata on FreeBSD
#14528 ICP: AES-GCM: Refactor gcm_clear_ctx()
#14529 ICP: AES-GCM: Unify gcm_init_ctx() and gmac_init_ctx()
#14532 Handle unexpected errors in zil_lwb_commit() without ASSERT()
#14544 icp: Prevent compilers from optimizing away memset()
in gcm_clear_ctx()
#14546 Revert zfeature_active() to static
#14556 Remove bad kmem_free() oversight from previous zfsdev_state_list
patch
#14563 Optimize the is_l2cacheable functions
#14565 FreeBSD: zfs_znode_alloc: lock the vnode earlier
#14566 FreeBSD: fix false assert in cache_vop_rmdir when replaying ZIL
#14567 spl: Add cmn_err_once() to log a message only on the first call
#14568 Fix incremental receive silently failing for recursive sends
#14569 Restore ASMABI and other Unify work
#14576 Fix detection of IBM Power8 machines (ISA 2.07)
#14577 Better handling for future crypto parameters
#14600 zcommon: Refactor FPU state handling in fletcher4
#14603 Fix prefetching of indirect blocks while destroying
#14633 Fixes in persistent error log
#14639 FreeBSD: Remove extra arc_reduce_target_size() call
#14641 Additional limits on hole reporting
#14649 Drop lying to the compiler in the fletcher4 code
#14652 panic loop when removing slog device
#14653 Update vdev state for spare vdev
#14655 Fix cloning into already dirty dbufs
#14678 Revert "Do not hold spa_config in ZIL while blocked on IO"

Obtained from: OpenZFS
OpenZFS commit: 431083f75bdd3efaee992bdd672625ec7240d252


# c9539b89 16-Feb-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@57cfae4a2 (master)

Notable upstream pull request merges:
#13816 Fix a race condition in dsl_dataset_sync() when
activating features
#14402 Prefetch on deadlists merge
#14410 Improve resilver ETAs
#14428 Resilver performance tuning
#14439 Resolve WS-2021-0184 vulnerability in zstd
#14440 EIO caused by encryption + recursive gang
#14448 Fix console progress reporting for recursive send
#14454 Improve arc_read() error reporting
#14460 Restore FreeBSD to use .rodata
#14474 Reduce need for contiguous memory for ioctls

Obtained from: OpenZFS
OpenZFS commit: 57cfae4a2f04aaff10c45b3f7975e0fe3ef3e8b8


# bb2d13b6 07-Dec-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@59493b63c (master)

Notable upstream pull request merges:
#13782 Fix setting the large_block feature after receiving a snapshot
#14157 FreeBSD: stop using buffer cache-only routines on sync
#14172 zed: post a udev change event from spa_vdev_attach()
#14181 zed: unclean disk attachment faults the vdev
#14190 Bump checksum error counter before reporting to ZED
#14196 Remove atomics from zh_refcount
#14197 Don't leak packed recieved proprties
#14198 Switch dnode stats to wmsums
#14199 Remove few pointer dereferences in dbuf_read()
#14200 Micro-optimize zrl_remove()
#14204 Lua: Fix bad bitshift in lua_strx2number()
#14212 Zstd fixes
#14218 Avoid a null pointer dereference in zfs_mount() on FreeBSD
#14235 nopwrites on dmu_sync-ed blocks can result in a panic
#14236 zio can deadlock during device removal
#14247 Micro-optimize fletcher4 calculations
#14261 FreeBSD: zfs_register_callbacks() must implement error check
correctly

Obtained from: OpenZFS
OpenZFS commit: 59493b63c18ea223857066218d6a58b67eb88159


# dbd5678d 16-Nov-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@2163cde45

Notable upstream pull request merges:
#13680 Add options to zfs redundant_metadata property
#13758 Allow mounting snapshots in .zfs/snapshot as a regular user
#13838 quota: disable quota check for ZVOL
#13839 quota: extend quota for dataset
#13973 Fix memory leaks in dmu_send()/dmu_send_obj()
#13977 Avoid unnecessary metaslab_check_free calling
#13978 PAM: Fix unchecked return value from zfs_key_config_load()
#13979 Handle possible null pointers from malloc/strdup/strndup()
#13997 zstream: allow decompress to fix metadata for uncompressed
records
#13998 zvol_wait logic may terminate prematurely
#14001 FreeBSD: Fix a pair of bugs in zfs_fhtovp()
#14003 Stop ganging due to past vdev write errors
#14039 Optimize microzaps
#14050 Fix draid2+2s metadata error on simultaneous 2 drive failures
#14062 zed: Avoid core dump if wholedisk property does not exist
#14077 Propagate extent_bytes change to autotrim thread
#14079 FreeBSD: vn_flush_cached_data: observe vnode locking contract
#14093 Fix ARC target collapse when zfs_arc_meta_limit_percent=100
#14106 Add ability to recompress send streams with new compression
algorithm
#14119 Deny receiving into encrypted datasets if the keys are not
loaded
#14120 Fix arc_p aggressive increase
#14129 zed: Prevent special vdev to be replaced by hot spare
#14133 Expose zfs_vdev_open_timeout_ms as a tunable
#14135 FreeBSD: Fix out of bounds read in zfs_ioctl_ozfs_to_legacy()
#14152 Adds the `-p` option to `zfs holds`
#14161 Handle and detect #13709's unlock regression

Obtained from: OpenZFS
OpenZFS commit: 2163cde450d0898b5f7bac16afb4e238485411ff


# be181ee2 04-Oct-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@d62bafee9

Notable upstream pull request merges:
#13857 Enforce "-F" flag on resuming recv of full/newfs on existing dataset
#13928 Revert "Reduce dbuf_find() lock contention"
#13928 Dynamically size dbuf hash mutex array
#13930 zpool: Don't print "repairing" on force faulted drives
#13938 Bring per_txg_dirty_frees_percent back to 30
#13939 Fix panic in dsl_process_sub_livelist for EINTR
#13954 Fix bad free in skein code
#13967 Fix potential NULL pointer dereference in dsl_dataset_promote_check()

Obtained from: OpenZFS
OpenZFS commit: d62bafee9fc38f8b9653c531e1861e83dcba4618


# 271171e0 13-Aug-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@b3d0568cf

Notable upstream pull request merges:
#9372 Implement a new type of zfs receive: corrective receive (-c)
#13635 Add snapshots_changed as property
#13636 Add support for per dataset zil stats and use wmsum counters
#13643 Fix scrub resume from newly created hole
#13670 Fix memory allocation for the checksum benchmark
#13695 Skip checksum benchmarks on systems with slow cpu
#13711 zpool: fix redundancy check after vdev removal

Obtained from: OpenZFS
OpenZFS commit: b3d0568cfd65458c92f7ab3d7bb709087992628e


# a0b956f5 07-Jul-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@cb01da680

Notable upstream pull request merges:
#12438 Avoid panic with recordsize > 128k, raw sending and no large_blocks
#13015 Fix dnode byteswapping
#13256 Add a "zstream decompress" subcommand
#13555 Scrub mirror children without BPs
#13576 Several sorted scrub optimizations
#13579 Fix and disable blocks statistics during scrub
#13582 Several B-tree optimizations
#13591 Avoid two 64-bit divisions per scanned block
#13606 Avoid memory copies during mirror scrub
#13613 Avoid memory copy when verifying raidz/draid parity

Obtained from: OpenZFS
OpenZFS commit: cb01da68057dcb9e612e8d2e97d058c46c3574af


# 1f1e2261 23-Jun-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@deb121309

Notable upstream pull request merges:
#12918 Introduce BLAKE3 checksums as an OpenZFS feature
#13553 Reduce ZIO io_lock contention on sorted scrub
#13537 Improve sorted scan memory accounting
#13540 AVL: Remove obsolete branching optimizations
#13563 FreeBSD: Improve crypto_dispatch() handling

Obtained from: OpenZFS
OpenZFS commit: deb1213098e2dc10e6eee5e5c57bb40584e096a6


# da5137ab 28-Mar-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bc3f12bfa (master) into main

Notable upstream pull request merges:
#12083 libzfs: FreeBSD doesn't resize partitions for you
#13106 add physical device size to SIZE column in 'zpool list -v'
#13158 Allow zfs send to exclude datasets
#13190 module: zfs: zio_inject: zio_match_handler: don't << -1
#13219 FreeBSD: add missing replay check to an assert in zfs_xvattr_set
#13220 module: freebsd: avoid a taking a destroyed lock in zfs_zevent bits
#13221 Fix ACL checks for NFS kernel server

Obtained from: OpenZFS
OpenZFS commit: bc3f12bfac152a0c28951cec92340ba14f9ccee9


# e92ffd9b 22-Jan-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@17b2ae0b2 (master) into main

Notable upstream pull request merges:
#12766 Fix error propagation from lzc_send_redacted
#12805 Updated the lz4 decompressor
#12851 FreeBSD: Provide correct file generation number
#12857 Verify dRAID empty sectors
#12874 FreeBSD: Update argument types for VOP_READDIR
#12896 Reduce number of arc_prune threads
#12934 FreeBSD: Fix zvol_*_open() locking
#12947 lz4: Cherrypick fix for CVE-2021-3520
#12961 FreeBSD: Fix leaked strings in libspl mnttab
#12964 Fix handling of errors from dmu_write_uio_dbuf() on FreeBSD
#12981 Introduce a flag to skip comparing the local mac when raw sending
#12985 Avoid memory allocations in the ARC eviction thread

Obtained from: OpenZFS
OpenZFS commit: 17b2ae0b24d487fdda2ef1098ec26fa7f79a61f6


# 681ce946 16-Dec-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f291fa658 (master) into main

Notable upstream pull request merges:
#11711 Vdev Properties Feature
#12717 VOP_RENAME fixes for FreeBSD
#12746 Enable strict hole reporting by default
#12770 ZFS send/recv with ashift 9->12 leads to data corruption
#12828 FreeBSD: Add vop_standard_writecount_nomsyn
#12828 zfs: Fix a deadlock between page busy and the teardown lock
#12828 FreeBSD: Catch up with more VFS changes

Obtained from: OpenZFS
OpenZFS commit: f291fa658efd146540b03ce386133632bde237bf


# 1f88aa09 07-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f3678d70f (master) into main

Notable upstream pull request merges:
#12339 Read past end of argv array in zpool_do_import()
#12365 Fixes in persistent L2ARC
#12383 Fixes for KMSAN reports
#12425 Avoid small buffer copying on write
#12428 Fix unfortunate NULL in spa_update_dspace
#12446 Allow disabling of unmapped I/O on FreeBSD

Obtained from: OpenZFS
OpenZFS commit: f3678d70ff8f98d67caf377ec0326c9a6c7bcf29


# 3f9d360c 22-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@14b43fbd9 (master) into main

Notable upstream pull request merges:
#12271 Tinker with slop space accounting with dedup
#12279 Fix ARC ghost states eviction accounting
#12284 Add Module Parameter Regarding Log Size Limit
#12300 Introduce dsl_dir_diduse_transfer_space()
#12314 Optimize allocation throttling
#12348 Minor ARC optimizations
#12350 Detect HAVE_LARGE_STACKS at compile time
#12356 Use SET_ERROR for more errors in FreeBSD vnops
#12375 FreeBSD: Ignore make_dev_s() errors
#12378 FreeBSD: Switch from MAXPHYS to maxphys on FreeBSD 13+

Obtained from: OpenZFS
OpenZFS commit: 14b43fbd9c13d802409ed886bb6b66fd528fb209


# 7cd22ac4 07-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bdd11cbb9 (master) into main

Notable upstream pull request merges:
#12274 Optimize txg_kick() process
#12281 Move gethrtime() calls out of vdev queue lock
#12287 Remove refcount from spa_config_*(
#12289 Compact dbuf/buf hashes and lock arrays
#12290 Remove avl_size field from struct avl_tree
#12294 Upstream: dmu_zfetch_stream_fini leaks refcount
#12295 Fix abd leak, kmem_free correct size of abd_t
#12328 FreeBSD: Hardcode abd_chunk_size to PAGE_SIZE

Obtained from: OpenZFS
OpenZFS commit: bdd11cbb90a2afa54fd00935ac0d34b4ddf2515c


# 33b8c039 25-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@5e2c8338b (master) into main

Notable upstream pull request merges:
#12183 Optimize small random numbers generation
#12227 Revert Consolidate arc_buf allocation checks
#12266 Fix flag copying in resume case
#12273 zfs_metaslab_mem_limit should be 25 instead of 75
#12276 Update cache file when setting compatibility property
#12280 Help compiller optimize out abd_verify()
#12282 FreeBSD: fix compilation of FreeBSD world after 29274c9f6

Obtained from: OpenZFS
OpenZFS commit: 5e2c8338bf17d31b44eb1dbbb3c9b6a0f64e96ee


# 9db44a8e 13-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9305ff2ed

Notable upstream pull request merges:
#11153 Scalable teardown lock for FreeBSD
#11651 Don't bomb out when using keylocation=file://
#11667 zvol: call zil_replaying() during replay
#11683 abd_get_offset_struct() may allocate new abd
#11693 Intentionally allow ZFS_READONLY in zfs_write
#11716 zpool import cachefile improvements
#11720 FreeBSD: Clean up zfsdev_close to match Linux
#11730 FreeBSD: bring back possibility to rewind the
checkpoint from bootloader

Obtained from: OpenZFS
MFC after: 2 weeks


# caed7b1c 02-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-bedbc13da

Notable upstream commits:
8e43fa12c Fix vdev_rebuild_thread deadlock
03ef8f09e Add missing checks for unsupported features
2e160dee9 Fix assert in FreeBSD-specific dmu_read_pages
bedbc13da Cancel TRIM / initialize on FAULTED non-writeable vdevs

MFC after: 1 week
Obtained from: OpenZFS


# 184c1b94 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-436ab35a5

- speed up writing to ZFS pools without ZIL devices (aa755b3)
- speed up importing ZFS pools (2d8f72d, a0e0199, cf0977a)
...

MFC after: 2 weeks
Reviewed by: mjg (partial)
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D28677


# 7877fdeb 07-Jan-2021 Matt Macy <mmacy@FreeBSD.org>

OpenZFS merge main-gf11b09

- add dRAID support
- fix duplicate close handling
- fix memory leak in prefetch
- fix problem with SIMD benchmarking on FreeBSD boot
...

# c40487d4 01-Oct-2020 Matt Macy <mmacy@FreeBSD.org>

OpenZFS: MFV 2.0-rc3-gfc5966

- Annotate FreeBSD sysctls with CTLFLAG_MPSAFE
- Reduce stack usage of Lua
- Don't save user FPU context in kernel threads
- Add support for procfs_list
- Code cleanup in zio_crypt
- Add DB_RF_NOPREFETCH to dbuf_read()s in dnode.c
- Drop references when skipping dmu_send due to EXDEV
- Eliminate gratuitous bzeroing in dbuf_stats_hash_table_data
- Fix legacy compat for platform IOCs


# eda14cbc 24-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

Initial import from vendor-sys branch of openzfs


# e2257b31 15-Feb-2024 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@e0bd8118d

Notable upstream pull request merges:
#15469 cbe882298 Add slow disk diagnosis to ZED
#15857 d0d273320 Update zfs-snapshot.8
#15864 a5a725440 zfs list: add '-t fs' and '-t vol' options
#15874 6cc93ccde BRT: Fix slop space calculation with block cloning
#15882 a0635ae73 zdb: Fix false leak report for BRT objects

Obtained from: OpenZFS
OpenZFS commit: e0bd8118d04b55b7adf3d9ba256ad4bb53e66512


# 3494f7c0 08-Dec-2023 Martin Matuska <mm@FreeBSD.org>

Notable upstream pull request merges:
#15539 687e4d7f9 Extend import_progress kstat with a notes field
#15544 c7b611926 Allow block cloning across encrypted datasets
#15553 adcea23cb ZIO: Add overflow checks for linear buffers
#15593 5f2700eee zpool: flush output before sleeping
#15609 3e4bef52b Only provide execvpe(3) when needed
#15610 735ba3a7b Use uint64_t instead of u_int64_t
#15612 bcd83ccd2 ZIL: Remove TX_CLONE_RANGE replay for ZVOLs
#15617 55b764e06 ZIL: Do not clone blocks from the future
#15623 727497ccd module/icp/asm-arm/sha2: enable non-SIMD asm kernels
on armv5/6
#15625 9743d0963 BRT: Limit brt_vdev_dump() to only one vdev
#15629 f9765b182 zdb: Dump encrypted write and clone ZIL records
#15634 2aa3a482a ZIL: Remove 128K into 2x68K LWB split optimization
#15639 11656234b FreeBSD: Ensure that zfs_getattr() initializes the
va_rdev field
#15647 4836d293c zfs_refcount_remove: explictly ignore returns
#15649 f0cb6482e setproctitle: fix ununitialised variable
#15650 450f2d0b0 import: ignore return on hostid lookups

Obtained from: OpenZFS
OpenZFS commit: 450f2d0b08e73cfb057d0e301a813418b70d64b9


# 14c2e0a0 08-Nov-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@9198de8f1

Notable upstream pull request merges:
#15197 3bd4df384 Improve ZFS objset sync parallelism
#15455 020f6fd09 FreeBSD: Implement taskq_init_ent()
#15476 3d86999c7 sa_lookup() ignores buffer size
#15478 2a154b848 Fix accounting error for pending sync IO ops in
zpool iostat
#15484 dc45a00ea Add kern.features.zfs
#15486 e36ff84c3 Update the kstat dataset_name when renaming a zvol
#15491 f4cd1bac7 Make abd_raidz_gen_iterate() pass an initialized
pointer to the callback
#15495 58398cbd0 FreeBSD: Optimize large kstat outputs

Obtained from: OpenZFS
OpenZFS commit: 9198de8f1079a8bbb837de3e3f8e236777b1375d


# cbfe9975 21-Sep-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4647353c8

Notable upstream pull request merges:
#15240 bbac1d297 Update the behavior of mountpoint property
#15240 c63aabaf1 Improve the handling of sharesmb,sharenfs properties
#15248 741c215ba Fix l2arc_apply_transforms ztest crash
#15274 ee720ad7b Retire z_nr_znodes
#15278 90149552b ZIL: Fix potential race on flush deferring
#15279 e923bcd16 Update the MOS directory on spa_upgrade_errlog()
#15281 529bec7d7 zed: Allow autoreplace and fault LEDs for removed vdevs
#15288 7228ba111 cmd: add 'help' subcommand to zpool and zfs
#15297 4647353c8 status: report pool suspension state under
failmode=continue

Obtained from: OpenZFS
OpenZFS commit: 4647353c8b2b5ca506da45bb9b01e1f3ef521847


# 2ad756a6 01-Sep-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@95f71c019

Notable upstream pull request merges:
#15018 Increase limit of redaction list by using spill block
#15161 Make zoned/jailed zfsprops(7) make more sense
#15216 Relax error reporting in zpool import and zpool split
#15218 Selectable block allocators
#15227 ZIL: Tune some assertions
#15228 ZIL: Revert zl_lock scope reduction
#15233 ZIL: Change ZIOs issue order

Obtained from: OpenZFS
OpenZFS commit: 95f71c019d7c3e3b728a9b05e2117ce6b09f1b87


# 315ee00f 26-Aug-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@804414aad

Notable upstream pull request merges:
#15024 Add missed DMU_PROJECTUSED_OBJECT prefetch
#15029 Do not request data L1 buffers on scan prefetch
#15036 FreeBSD: catch up to __FreeBSD_version 1400093
#15039 Fix raw receive with different indirect block size
#15047 FreeBSD: Fix build on stable/13 after 1302506
#15049 Fix the ZFS checksum error histograms with larger record sizes
#15052 Reduce bloat in ereport.fs.zfs.checksum events
#15056 Avoid extra snprintf() in dsl_deadlist_merge()
#15061 Ignore pool ashift property during vdev attachment
#15063 Don't panic if setting vdev properties is unsupported for this vdev type
#15067 spa_min_alloc should be GCD, not min
#15071 Add explicit prefetches to bpobj_iterate()
#15072 Adjust prefetch parameters
#15076 Refactor dmu_prefetch()
#15079 set autotrim default to 'off' everywhere
#15080 ZIL: Fix config lock deadlock
#15088 metaslab: tuneable to better control force ganging
#15096 Avoid waiting in dmu_sync_late_arrival()
#15097 BRT should return EOPNOTSUPP
#15103 Remove zl_issuer_lock from zil_suspend()
#15107 Remove fastwrite mechanism
#15113 libzfs: sendrecv: send_progress_thread: handle SIGINFO/SIGUSR1
#15122 ZIL: Second attempt to reduce scope of zl_issuer_lock
#15129 zpool_vdev_remove() should handle EALREADY error return
#15132 ZIL: Replay blocks without next block pointer
#15148 zfs_clone_range should return descriptive error codes
#15153 ZIL: Avoid dbuf_read() before dmu_sync()
#15172 copy_file_range: fix fallback when source create on same txg
#15180 Update outdated assertion from zio_write_compress

Obtained from: OpenZFS
OpenZFS commit: 804414aad224b432590afe3f9ec114ffb49e0f13


# 0a97523d 30-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@009d3288d

Notable upstream pull request merges:
#14654 Pack our DDT ZAPs a bit denser
#14979 Again fix race between zil_commit() and zil_suspend()
#14985 Some ZIO micro-optimizations
#15000 Fix remount when setting multiple properties
#15004 ddt_addref: remove unnecessary phys fill when refcount is 0
#15007 Do not report bytes skipped by scan as issued
#15023 Enable tuning of ZVOL open timeout value

Obtained from: OpenZFS
OpenZFS commit: 009d3288dea524c7ad373b04b65bee8bb6f0bfea
OpenZFS tag: zfs-2.2.0-rc1


# 7b5e6873 28-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@a9d6b0690

Notable upstream pull request merges:
#14925 Another set of vdev queue optimizations
#14964 Use big transactions for small recordsize writes
#14999 ZIL: Fix another use-after-free

Obtained from: OpenZFS
OpenZFS commit: a9d6b0690b1863f39a7efce08b1227f2e9e26abb


# 4e8d558c 10-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@feff9dfed

Notable upstream pull request merges:
#14833 Update compatibility.d files
#14841 ZIL: Reduce scope of per-dataset zl_issuer_lock
#14863 zil: Add some more statistics
#14866 btree: Implement faster binary search algorithm
#14894 Fix inconsistent definition of zfs_scrub_error_blocks_per_txg
#14892 Fix concurrent resilvers initiated at same time
#14903 Fix NULL pointer dereference when doing concurrent 'send' operations
#14910 ZIL: Allow to replay blocks of any size
#14939 Fix the L2ARC write size calculating logic
#14934 Introduce zfs_refcount_(add|remove)_few()
#14946 Improve l2arc reporting in arc_summary
#14953 Finally drop long disabled vdev cache
#14954 Fix the L2ARC write size calculating logic (2)
#14955 Use list_remove_head() where possible
#14959 ZIL: Fix race introduced by f63811f0721

Obtained from: OpenZFS
OpenZFS commit: feff9dfed3df1bbae5dd74959a6ad87d11f27ffb


# c0a83fe0 23-May-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@ad0a55461

Notable upstream pull request merges:
#12355 Teach zpool scrub to scrub only blocks in error log
#14811 Refine special_small_blocks property validation
#14854 zil: Some micro-optimizations
#14855 zil: Free lwb_buf after write completion
#14860 Fixes for issues identified by recent Coverity defect reports
#14861 Probe vdevs before marking removed
#14873 Add the ability to uninitialize a zpool
#14875 Hold db_mtx when updating db_state

Obtained from: OpenZFS
OpenZFS commit: ad0a554614b096698d9969340c4c593690042d5b


# d411c1d6 02-May-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@d96e29576

Notable upstream pull request merges:

#11680 Add support for zpool user properties
#14145 Storage device expansion "silently" fails on degraded vdev
#14405 Create zap for root vdev
#14659 Allow MMP to bypass waiting for other threads
#14674 Miscellaneous FreBSD compilation bugfixes
#14692 Fix some signedness issues in arc_evict()
#14702 Fix typo in check_clones()
#14715 module: small fixes for FreeBSD/aarch64
#14716 Trim needless zeroes from checksum events
#14719 vdev: expose zfs_vdev_max_ms_shift as a module parameter
#14722 Fix "Detach spare vdev in case if resilvering does not happen"
#14723 freebsd clone range fixes
#14728 Fix BLAKE3 aarch64 assembly for FreeBSD and macOS
#14735 Fix in check_filesystem()
#14739 Fix data corruption when cloning embedded blocks
#14758 Fix VERIFY(!zil_replaying(zilog, tx)) panic
#14761 Revert "ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced()"
#14774 FreeBSD .zfs fixups
#14776 FreeBSD: make zfs_vfs_held() definition consistent with declaration
#14779 powerpc64: Support ELFv2 asm on Big Endian
#14788 FreeBSD: add missing vop_fplookup assignments
#14789 PAM: support the authentication facility
#14790 Revert "Fix data race between zil_commit() and zil_suspend()"
#14795 Fix positive ABD size assertion in abd_verify()
#14798 Mark TX_COMMIT transaction with TXG_NOTHROTTLE
#14804 Correct ABD size for split block ZIOs
#14806 Use correct block pointer in block cloning case.
#14808 blake3: fix up bogus checksums in face of cpu migration

Obtained from: OpenZFS
OpenZFS commit: d96e29576c89e6e547cb82b477651d2b85ea0fed


# 2a58b312 03-Apr-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@431083f75

Notable upstream pull request merges:
#12194 Fix short-lived txg caused by autotrim
#13368 ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced()
#13392 Implementation of block cloning for ZFS
#13741 SHA2 reworking and API for iterating over multiple implementations
#14282 Sync thread should avoid holding the spa config write lock
when possible
#14283 txg_sync should handle write errors in ZIL
#14359 More adaptive ARC eviction
#14469 Fix NULL pointer dereference in zio_ready()
#14479 zfs redact fails when dnodesize=auto
#14496 improve error message of zfs redact
#14500 Skip memory allocation when compressing holes
#14501 FreeBSD: don't verify recycled vnode for zfs control directory
#14502 partially revert PR 14304 (eee9362a7)
#14509 Fix per-jail zfs.mount_snapshot setting
#14514 Fix data race between zil_commit() and zil_suspend()
#14516 System-wide speculative prefetch limit
#14517 Use rw_tryupgrade() in dmu_bonus_hold_by_dnode()
#14519 Do not hold spa_config in ZIL while blocked on IO
#14523 Move dmu_buf_rele() after dsl_dataset_sync_done()
#14524 Ignore too large stack in case of dsl_deadlist_merge
#14526 Use .section .rodata instead of .rodata on FreeBSD
#14528 ICP: AES-GCM: Refactor gcm_clear_ctx()
#14529 ICP: AES-GCM: Unify gcm_init_ctx() and gmac_init_ctx()
#14532 Handle unexpected errors in zil_lwb_commit() without ASSERT()
#14544 icp: Prevent compilers from optimizing away memset()
in gcm_clear_ctx()
#14546 Revert zfeature_active() to static
#14556 Remove bad kmem_free() oversight from previous zfsdev_state_list
patch
#14563 Optimize the is_l2cacheable functions
#14565 FreeBSD: zfs_znode_alloc: lock the vnode earlier
#14566 FreeBSD: fix false assert in cache_vop_rmdir when replaying ZIL
#14567 spl: Add cmn_err_once() to log a message only on the first call
#14568 Fix incremental receive silently failing for recursive sends
#14569 Restore ASMABI and other Unify work
#14576 Fix detection of IBM Power8 machines (ISA 2.07)
#14577 Better handling for future crypto parameters
#14600 zcommon: Refactor FPU state handling in fletcher4
#14603 Fix prefetching of indirect blocks while destroying
#14633 Fixes in persistent error log
#14639 FreeBSD: Remove extra arc_reduce_target_size() call
#14641 Additional limits on hole reporting
#14649 Drop lying to the compiler in the fletcher4 code
#14652 panic loop when removing slog device
#14653 Update vdev state for spare vdev
#14655 Fix cloning into already dirty dbufs
#14678 Revert "Do not hold spa_config in ZIL while blocked on IO"

Obtained from: OpenZFS
OpenZFS commit: 431083f75bdd3efaee992bdd672625ec7240d252


# c9539b89 16-Feb-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@57cfae4a2 (master)

Notable upstream pull request merges:
#13816 Fix a race condition in dsl_dataset_sync() when
activating features
#14402 Prefetch on deadlists merge
#14410 Improve resilver ETAs
#14428 Resilver performance tuning
#14439 Resolve WS-2021-0184 vulnerability in zstd
#14440 EIO caused by encryption + recursive gang
#14448 Fix console progress reporting for recursive send
#14454 Improve arc_read() error reporting
#14460 Restore FreeBSD to use .rodata
#14474 Reduce need for contiguous memory for ioctls

Obtained from: OpenZFS
OpenZFS commit: 57cfae4a2f04aaff10c45b3f7975e0fe3ef3e8b8


# bb2d13b6 07-Dec-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@59493b63c (master)

Notable upstream pull request merges:
#13782 Fix setting the large_block feature after receiving a snapshot
#14157 FreeBSD: stop using buffer cache-only routines on sync
#14172 zed: post a udev change event from spa_vdev_attach()
#14181 zed: unclean disk attachment faults the vdev
#14190 Bump checksum error counter before reporting to ZED
#14196 Remove atomics from zh_refcount
#14197 Don't leak packed recieved proprties
#14198 Switch dnode stats to wmsums
#14199 Remove few pointer dereferences in dbuf_read()
#14200 Micro-optimize zrl_remove()
#14204 Lua: Fix bad bitshift in lua_strx2number()
#14212 Zstd fixes
#14218 Avoid a null pointer dereference in zfs_mount() on FreeBSD
#14235 nopwrites on dmu_sync-ed blocks can result in a panic
#14236 zio can deadlock during device removal
#14247 Micro-optimize fletcher4 calculations
#14261 FreeBSD: zfs_register_callbacks() must implement error check
correctly

Obtained from: OpenZFS
OpenZFS commit: 59493b63c18ea223857066218d6a58b67eb88159


# dbd5678d 16-Nov-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@2163cde45

Notable upstream pull request merges:
#13680 Add options to zfs redundant_metadata property
#13758 Allow mounting snapshots in .zfs/snapshot as a regular user
#13838 quota: disable quota check for ZVOL
#13839 quota: extend quota for dataset
#13973 Fix memory leaks in dmu_send()/dmu_send_obj()
#13977 Avoid unnecessary metaslab_check_free calling
#13978 PAM: Fix unchecked return value from zfs_key_config_load()
#13979 Handle possible null pointers from malloc/strdup/strndup()
#13997 zstream: allow decompress to fix metadata for uncompressed
records
#13998 zvol_wait logic may terminate prematurely
#14001 FreeBSD: Fix a pair of bugs in zfs_fhtovp()
#14003 Stop ganging due to past vdev write errors
#14039 Optimize microzaps
#14050 Fix draid2+2s metadata error on simultaneous 2 drive failures
#14062 zed: Avoid core dump if wholedisk property does not exist
#14077 Propagate extent_bytes change to autotrim thread
#14079 FreeBSD: vn_flush_cached_data: observe vnode locking contract
#14093 Fix ARC target collapse when zfs_arc_meta_limit_percent=100
#14106 Add ability to recompress send streams with new compression
algorithm
#14119 Deny receiving into encrypted datasets if the keys are not
loaded
#14120 Fix arc_p aggressive increase
#14129 zed: Prevent special vdev to be replaced by hot spare
#14133 Expose zfs_vdev_open_timeout_ms as a tunable
#14135 FreeBSD: Fix out of bounds read in zfs_ioctl_ozfs_to_legacy()
#14152 Adds the `-p` option to `zfs holds`
#14161 Handle and detect #13709's unlock regression

Obtained from: OpenZFS
OpenZFS commit: 2163cde450d0898b5f7bac16afb4e238485411ff


# be181ee2 04-Oct-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@d62bafee9

Notable upstream pull request merges:
#13857 Enforce "-F" flag on resuming recv of full/newfs on existing dataset
#13928 Revert "Reduce dbuf_find() lock contention"
#13928 Dynamically size dbuf hash mutex array
#13930 zpool: Don't print "repairing" on force faulted drives
#13938 Bring per_txg_dirty_frees_percent back to 30
#13939 Fix panic in dsl_process_sub_livelist for EINTR
#13954 Fix bad free in skein code
#13967 Fix potential NULL pointer dereference in dsl_dataset_promote_check()

Obtained from: OpenZFS
OpenZFS commit: d62bafee9fc38f8b9653c531e1861e83dcba4618


# 271171e0 13-Aug-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@b3d0568cf

Notable upstream pull request merges:
#9372 Implement a new type of zfs receive: corrective receive (-c)
#13635 Add snapshots_changed as property
#13636 Add support for per dataset zil stats and use wmsum counters
#13643 Fix scrub resume from newly created hole
#13670 Fix memory allocation for the checksum benchmark
#13695 Skip checksum benchmarks on systems with slow cpu
#13711 zpool: fix redundancy check after vdev removal

Obtained from: OpenZFS
OpenZFS commit: b3d0568cfd65458c92f7ab3d7bb709087992628e


# a0b956f5 07-Jul-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@cb01da680

Notable upstream pull request merges:
#12438 Avoid panic with recordsize > 128k, raw sending and no large_blocks
#13015 Fix dnode byteswapping
#13256 Add a "zstream decompress" subcommand
#13555 Scrub mirror children without BPs
#13576 Several sorted scrub optimizations
#13579 Fix and disable blocks statistics during scrub
#13582 Several B-tree optimizations
#13591 Avoid two 64-bit divisions per scanned block
#13606 Avoid memory copies during mirror scrub
#13613 Avoid memory copy when verifying raidz/draid parity

Obtained from: OpenZFS
OpenZFS commit: cb01da68057dcb9e612e8d2e97d058c46c3574af


# 1f1e2261 23-Jun-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@deb121309

Notable upstream pull request merges:
#12918 Introduce BLAKE3 checksums as an OpenZFS feature
#13553 Reduce ZIO io_lock contention on sorted scrub
#13537 Improve sorted scan memory accounting
#13540 AVL: Remove obsolete branching optimizations
#13563 FreeBSD: Improve crypto_dispatch() handling

Obtained from: OpenZFS
OpenZFS commit: deb1213098e2dc10e6eee5e5c57bb40584e096a6


# da5137ab 28-Mar-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bc3f12bfa (master) into main

Notable upstream pull request merges:
#12083 libzfs: FreeBSD doesn't resize partitions for you
#13106 add physical device size to SIZE column in 'zpool list -v'
#13158 Allow zfs send to exclude datasets
#13190 module: zfs: zio_inject: zio_match_handler: don't << -1
#13219 FreeBSD: add missing replay check to an assert in zfs_xvattr_set
#13220 module: freebsd: avoid a taking a destroyed lock in zfs_zevent bits
#13221 Fix ACL checks for NFS kernel server

Obtained from: OpenZFS
OpenZFS commit: bc3f12bfac152a0c28951cec92340ba14f9ccee9


# e92ffd9b 22-Jan-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@17b2ae0b2 (master) into main

Notable upstream pull request merges:
#12766 Fix error propagation from lzc_send_redacted
#12805 Updated the lz4 decompressor
#12851 FreeBSD: Provide correct file generation number
#12857 Verify dRAID empty sectors
#12874 FreeBSD: Update argument types for VOP_READDIR
#12896 Reduce number of arc_prune threads
#12934 FreeBSD: Fix zvol_*_open() locking
#12947 lz4: Cherrypick fix for CVE-2021-3520
#12961 FreeBSD: Fix leaked strings in libspl mnttab
#12964 Fix handling of errors from dmu_write_uio_dbuf() on FreeBSD
#12981 Introduce a flag to skip comparing the local mac when raw sending
#12985 Avoid memory allocations in the ARC eviction thread

Obtained from: OpenZFS
OpenZFS commit: 17b2ae0b24d487fdda2ef1098ec26fa7f79a61f6


# 681ce946 16-Dec-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f291fa658 (master) into main

Notable upstream pull request merges:
#11711 Vdev Properties Feature
#12717 VOP_RENAME fixes for FreeBSD
#12746 Enable strict hole reporting by default
#12770 ZFS send/recv with ashift 9->12 leads to data corruption
#12828 FreeBSD: Add vop_standard_writecount_nomsyn
#12828 zfs: Fix a deadlock between page busy and the teardown lock
#12828 FreeBSD: Catch up with more VFS changes

Obtained from: OpenZFS
OpenZFS commit: f291fa658efd146540b03ce386133632bde237bf


# 1f88aa09 07-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f3678d70f (master) into main

Notable upstream pull request merges:
#12339 Read past end of argv array in zpool_do_import()
#12365 Fixes in persistent L2ARC
#12383 Fixes for KMSAN reports
#12425 Avoid small buffer copying on write
#12428 Fix unfortunate NULL in spa_update_dspace
#12446 Allow disabling of unmapped I/O on FreeBSD

Obtained from: OpenZFS
OpenZFS commit: f3678d70ff8f98d67caf377ec0326c9a6c7bcf29


# 3f9d360c 22-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@14b43fbd9 (master) into main

Notable upstream pull request merges:
#12271 Tinker with slop space accounting with dedup
#12279 Fix ARC ghost states eviction accounting
#12284 Add Module Parameter Regarding Log Size Limit
#12300 Introduce dsl_dir_diduse_transfer_space()
#12314 Optimize allocation throttling
#12348 Minor ARC optimizations
#12350 Detect HAVE_LARGE_STACKS at compile time
#12356 Use SET_ERROR for more errors in FreeBSD vnops
#12375 FreeBSD: Ignore make_dev_s() errors
#12378 FreeBSD: Switch from MAXPHYS to maxphys on FreeBSD 13+

Obtained from: OpenZFS
OpenZFS commit: 14b43fbd9c13d802409ed886bb6b66fd528fb209


# 7cd22ac4 07-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bdd11cbb9 (master) into main

Notable upstream pull request merges:
#12274 Optimize txg_kick() process
#12281 Move gethrtime() calls out of vdev queue lock
#12287 Remove refcount from spa_config_*(
#12289 Compact dbuf/buf hashes and lock arrays
#12290 Remove avl_size field from struct avl_tree
#12294 Upstream: dmu_zfetch_stream_fini leaks refcount
#12295 Fix abd leak, kmem_free correct size of abd_t
#12328 FreeBSD: Hardcode abd_chunk_size to PAGE_SIZE

Obtained from: OpenZFS
OpenZFS commit: bdd11cbb90a2afa54fd00935ac0d34b4ddf2515c


# 33b8c039 25-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@5e2c8338b (master) into main

Notable upstream pull request merges:
#12183 Optimize small random numbers generation
#12227 Revert Consolidate arc_buf allocation checks
#12266 Fix flag copying in resume case
#12273 zfs_metaslab_mem_limit should be 25 instead of 75
#12276 Update cache file when setting compatibility property
#12280 Help compiller optimize out abd_verify()
#12282 FreeBSD: fix compilation of FreeBSD world after 29274c9f6

Obtained from: OpenZFS
OpenZFS commit: 5e2c8338bf17d31b44eb1dbbb3c9b6a0f64e96ee


# 9db44a8e 13-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9305ff2ed

Notable upstream pull request merges:
#11153 Scalable teardown lock for FreeBSD
#11651 Don't bomb out when using keylocation=file://
#11667 zvol: call zil_replaying() during replay
#11683 abd_get_offset_struct() may allocate new abd
#11693 Intentionally allow ZFS_READONLY in zfs_write
#11716 zpool import cachefile improvements
#11720 FreeBSD: Clean up zfsdev_close to match Linux
#11730 FreeBSD: bring back possibility to rewind the
checkpoint from bootloader

Obtained from: OpenZFS
MFC after: 2 weeks


# caed7b1c 02-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-bedbc13da

Notable upstream commits:
8e43fa12c Fix vdev_rebuild_thread deadlock
03ef8f09e Add missing checks for unsupported features
2e160dee9 Fix assert in FreeBSD-specific dmu_read_pages
bedbc13da Cancel TRIM / initialize on FAULTED non-writeable vdevs

MFC after: 1 week
Obtained from: OpenZFS


# 184c1b94 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-436ab35a5

- speed up writing to ZFS pools without ZIL devices (aa755b3)
- speed up importing ZFS pools (2d8f72d, a0e0199, cf0977a)
...

MFC after: 2 weeks
Reviewed by: mjg (partial)
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D28677


# 7877fdeb 07-Jan-2021 Matt Macy <mmacy@FreeBSD.org>

OpenZFS merge main-gf11b09

- add dRAID support
- fix duplicate close handling
- fix memory leak in prefetch
- fix problem with SIMD benchmarking on FreeBSD boot
...

# c40487d4 01-Oct-2020 Matt Macy <mmacy@FreeBSD.org>

OpenZFS: MFV 2.0-rc3-gfc5966

- Annotate FreeBSD sysctls with CTLFLAG_MPSAFE
- Reduce stack usage of Lua
- Don't save user FPU context in kernel threads
- Add support for procfs_list
- Code cleanup in zio_crypt
- Add DB_RF_NOPREFETCH to dbuf_read()s in dnode.c
- Drop references when skipping dmu_send due to EXDEV
- Eliminate gratuitous bzeroing in dbuf_stats_hash_table_data
- Fix legacy compat for platform IOCs


# eda14cbc 24-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

Initial import from vendor-sys branch of openzfs


# 3494f7c0 08-Dec-2023 Martin Matuska <mm@FreeBSD.org>

Notable upstream pull request merges:
#15539 687e4d7f9 Extend import_progress kstat with a notes field
#15544 c7b611926 Allow block cloning across encrypted datasets
#15553 adcea23cb ZIO: Add overflow checks for linear buffers
#15593 5f2700eee zpool: flush output before sleeping
#15609 3e4bef52b Only provide execvpe(3) when needed
#15610 735ba3a7b Use uint64_t instead of u_int64_t
#15612 bcd83ccd2 ZIL: Remove TX_CLONE_RANGE replay for ZVOLs
#15617 55b764e06 ZIL: Do not clone blocks from the future
#15623 727497ccd module/icp/asm-arm/sha2: enable non-SIMD asm kernels
on armv5/6
#15625 9743d0963 BRT: Limit brt_vdev_dump() to only one vdev
#15629 f9765b182 zdb: Dump encrypted write and clone ZIL records
#15634 2aa3a482a ZIL: Remove 128K into 2x68K LWB split optimization
#15639 11656234b FreeBSD: Ensure that zfs_getattr() initializes the
va_rdev field
#15647 4836d293c zfs_refcount_remove: explictly ignore returns
#15649 f0cb6482e setproctitle: fix ununitialised variable
#15650 450f2d0b0 import: ignore return on hostid lookups

Obtained from: OpenZFS
OpenZFS commit: 450f2d0b08e73cfb057d0e301a813418b70d64b9


# 14c2e0a0 08-Nov-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@9198de8f1

Notable upstream pull request merges:
#15197 3bd4df384 Improve ZFS objset sync parallelism
#15455 020f6fd09 FreeBSD: Implement taskq_init_ent()
#15476 3d86999c7 sa_lookup() ignores buffer size
#15478 2a154b848 Fix accounting error for pending sync IO ops in
zpool iostat
#15484 dc45a00ea Add kern.features.zfs
#15486 e36ff84c3 Update the kstat dataset_name when renaming a zvol
#15491 f4cd1bac7 Make abd_raidz_gen_iterate() pass an initialized
pointer to the callback
#15495 58398cbd0 FreeBSD: Optimize large kstat outputs

Obtained from: OpenZFS
OpenZFS commit: 9198de8f1079a8bbb837de3e3f8e236777b1375d


# cbfe9975 21-Sep-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4647353c8

Notable upstream pull request merges:
#15240 bbac1d297 Update the behavior of mountpoint property
#15240 c63aabaf1 Improve the handling of sharesmb,sharenfs properties
#15248 741c215ba Fix l2arc_apply_transforms ztest crash
#15274 ee720ad7b Retire z_nr_znodes
#15278 90149552b ZIL: Fix potential race on flush deferring
#15279 e923bcd16 Update the MOS directory on spa_upgrade_errlog()
#15281 529bec7d7 zed: Allow autoreplace and fault LEDs for removed vdevs
#15288 7228ba111 cmd: add 'help' subcommand to zpool and zfs
#15297 4647353c8 status: report pool suspension state under
failmode=continue

Obtained from: OpenZFS
OpenZFS commit: 4647353c8b2b5ca506da45bb9b01e1f3ef521847


# 2ad756a6 01-Sep-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@95f71c019

Notable upstream pull request merges:
#15018 Increase limit of redaction list by using spill block
#15161 Make zoned/jailed zfsprops(7) make more sense
#15216 Relax error reporting in zpool import and zpool split
#15218 Selectable block allocators
#15227 ZIL: Tune some assertions
#15228 ZIL: Revert zl_lock scope reduction
#15233 ZIL: Change ZIOs issue order

Obtained from: OpenZFS
OpenZFS commit: 95f71c019d7c3e3b728a9b05e2117ce6b09f1b87


# 315ee00f 26-Aug-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@804414aad

Notable upstream pull request merges:
#15024 Add missed DMU_PROJECTUSED_OBJECT prefetch
#15029 Do not request data L1 buffers on scan prefetch
#15036 FreeBSD: catch up to __FreeBSD_version 1400093
#15039 Fix raw receive with different indirect block size
#15047 FreeBSD: Fix build on stable/13 after 1302506
#15049 Fix the ZFS checksum error histograms with larger record sizes
#15052 Reduce bloat in ereport.fs.zfs.checksum events
#15056 Avoid extra snprintf() in dsl_deadlist_merge()
#15061 Ignore pool ashift property during vdev attachment
#15063 Don't panic if setting vdev properties is unsupported for this vdev type
#15067 spa_min_alloc should be GCD, not min
#15071 Add explicit prefetches to bpobj_iterate()
#15072 Adjust prefetch parameters
#15076 Refactor dmu_prefetch()
#15079 set autotrim default to 'off' everywhere
#15080 ZIL: Fix config lock deadlock
#15088 metaslab: tuneable to better control force ganging
#15096 Avoid waiting in dmu_sync_late_arrival()
#15097 BRT should return EOPNOTSUPP
#15103 Remove zl_issuer_lock from zil_suspend()
#15107 Remove fastwrite mechanism
#15113 libzfs: sendrecv: send_progress_thread: handle SIGINFO/SIGUSR1
#15122 ZIL: Second attempt to reduce scope of zl_issuer_lock
#15129 zpool_vdev_remove() should handle EALREADY error return
#15132 ZIL: Replay blocks without next block pointer
#15148 zfs_clone_range should return descriptive error codes
#15153 ZIL: Avoid dbuf_read() before dmu_sync()
#15172 copy_file_range: fix fallback when source create on same txg
#15180 Update outdated assertion from zio_write_compress

Obtained from: OpenZFS
OpenZFS commit: 804414aad224b432590afe3f9ec114ffb49e0f13


# 0a97523d 30-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@009d3288d

Notable upstream pull request merges:
#14654 Pack our DDT ZAPs a bit denser
#14979 Again fix race between zil_commit() and zil_suspend()
#14985 Some ZIO micro-optimizations
#15000 Fix remount when setting multiple properties
#15004 ddt_addref: remove unnecessary phys fill when refcount is 0
#15007 Do not report bytes skipped by scan as issued
#15023 Enable tuning of ZVOL open timeout value

Obtained from: OpenZFS
OpenZFS commit: 009d3288dea524c7ad373b04b65bee8bb6f0bfea
OpenZFS tag: zfs-2.2.0-rc1


# 7b5e6873 28-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@a9d6b0690

Notable upstream pull request merges:
#14925 Another set of vdev queue optimizations
#14964 Use big transactions for small recordsize writes
#14999 ZIL: Fix another use-after-free

Obtained from: OpenZFS
OpenZFS commit: a9d6b0690b1863f39a7efce08b1227f2e9e26abb


# 4e8d558c 10-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@feff9dfed

Notable upstream pull request merges:
#14833 Update compatibility.d files
#14841 ZIL: Reduce scope of per-dataset zl_issuer_lock
#14863 zil: Add some more statistics
#14866 btree: Implement faster binary search algorithm
#14894 Fix inconsistent definition of zfs_scrub_error_blocks_per_txg
#14892 Fix concurrent resilvers initiated at same time
#14903 Fix NULL pointer dereference when doing concurrent 'send' operations
#14910 ZIL: Allow to replay blocks of any size
#14939 Fix the L2ARC write size calculating logic
#14934 Introduce zfs_refcount_(add|remove)_few()
#14946 Improve l2arc reporting in arc_summary
#14953 Finally drop long disabled vdev cache
#14954 Fix the L2ARC write size calculating logic (2)
#14955 Use list_remove_head() where possible
#14959 ZIL: Fix race introduced by f63811f0721

Obtained from: OpenZFS
OpenZFS commit: feff9dfed3df1bbae5dd74959a6ad87d11f27ffb


# c0a83fe0 23-May-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@ad0a55461

Notable upstream pull request merges:
#12355 Teach zpool scrub to scrub only blocks in error log
#14811 Refine special_small_blocks property validation
#14854 zil: Some micro-optimizations
#14855 zil: Free lwb_buf after write completion
#14860 Fixes for issues identified by recent Coverity defect reports
#14861 Probe vdevs before marking removed
#14873 Add the ability to uninitialize a zpool
#14875 Hold db_mtx when updating db_state

Obtained from: OpenZFS
OpenZFS commit: ad0a554614b096698d9969340c4c593690042d5b


# d411c1d6 02-May-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@d96e29576

Notable upstream pull request merges:

#11680 Add support for zpool user properties
#14145 Storage device expansion "silently" fails on degraded vdev
#14405 Create zap for root vdev
#14659 Allow MMP to bypass waiting for other threads
#14674 Miscellaneous FreBSD compilation bugfixes
#14692 Fix some signedness issues in arc_evict()
#14702 Fix typo in check_clones()
#14715 module: small fixes for FreeBSD/aarch64
#14716 Trim needless zeroes from checksum events
#14719 vdev: expose zfs_vdev_max_ms_shift as a module parameter
#14722 Fix "Detach spare vdev in case if resilvering does not happen"
#14723 freebsd clone range fixes
#14728 Fix BLAKE3 aarch64 assembly for FreeBSD and macOS
#14735 Fix in check_filesystem()
#14739 Fix data corruption when cloning embedded blocks
#14758 Fix VERIFY(!zil_replaying(zilog, tx)) panic
#14761 Revert "ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced()"
#14774 FreeBSD .zfs fixups
#14776 FreeBSD: make zfs_vfs_held() definition consistent with declaration
#14779 powerpc64: Support ELFv2 asm on Big Endian
#14788 FreeBSD: add missing vop_fplookup assignments
#14789 PAM: support the authentication facility
#14790 Revert "Fix data race between zil_commit() and zil_suspend()"
#14795 Fix positive ABD size assertion in abd_verify()
#14798 Mark TX_COMMIT transaction with TXG_NOTHROTTLE
#14804 Correct ABD size for split block ZIOs
#14806 Use correct block pointer in block cloning case.
#14808 blake3: fix up bogus checksums in face of cpu migration

Obtained from: OpenZFS
OpenZFS commit: d96e29576c89e6e547cb82b477651d2b85ea0fed


# 2a58b312 03-Apr-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@431083f75

Notable upstream pull request merges:
#12194 Fix short-lived txg caused by autotrim
#13368 ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced()
#13392 Implementation of block cloning for ZFS
#13741 SHA2 reworking and API for iterating over multiple implementations
#14282 Sync thread should avoid holding the spa config write lock
when possible
#14283 txg_sync should handle write errors in ZIL
#14359 More adaptive ARC eviction
#14469 Fix NULL pointer dereference in zio_ready()
#14479 zfs redact fails when dnodesize=auto
#14496 improve error message of zfs redact
#14500 Skip memory allocation when compressing holes
#14501 FreeBSD: don't verify recycled vnode for zfs control directory
#14502 partially revert PR 14304 (eee9362a7)
#14509 Fix per-jail zfs.mount_snapshot setting
#14514 Fix data race between zil_commit() and zil_suspend()
#14516 System-wide speculative prefetch limit
#14517 Use rw_tryupgrade() in dmu_bonus_hold_by_dnode()
#14519 Do not hold spa_config in ZIL while blocked on IO
#14523 Move dmu_buf_rele() after dsl_dataset_sync_done()
#14524 Ignore too large stack in case of dsl_deadlist_merge
#14526 Use .section .rodata instead of .rodata on FreeBSD
#14528 ICP: AES-GCM: Refactor gcm_clear_ctx()
#14529 ICP: AES-GCM: Unify gcm_init_ctx() and gmac_init_ctx()
#14532 Handle unexpected errors in zil_lwb_commit() without ASSERT()
#14544 icp: Prevent compilers from optimizing away memset()
in gcm_clear_ctx()
#14546 Revert zfeature_active() to static
#14556 Remove bad kmem_free() oversight from previous zfsdev_state_list
patch
#14563 Optimize the is_l2cacheable functions
#14565 FreeBSD: zfs_znode_alloc: lock the vnode earlier
#14566 FreeBSD: fix false assert in cache_vop_rmdir when replaying ZIL
#14567 spl: Add cmn_err_once() to log a message only on the first call
#14568 Fix incremental receive silently failing for recursive sends
#14569 Restore ASMABI and other Unify work
#14576 Fix detection of IBM Power8 machines (ISA 2.07)
#14577 Better handling for future crypto parameters
#14600 zcommon: Refactor FPU state handling in fletcher4
#14603 Fix prefetching of indirect blocks while destroying
#14633 Fixes in persistent error log
#14639 FreeBSD: Remove extra arc_reduce_target_size() call
#14641 Additional limits on hole reporting
#14649 Drop lying to the compiler in the fletcher4 code
#14652 panic loop when removing slog device
#14653 Update vdev state for spare vdev
#14655 Fix cloning into already dirty dbufs
#14678 Revert "Do not hold spa_config in ZIL while blocked on IO"

Obtained from: OpenZFS
OpenZFS commit: 431083f75bdd3efaee992bdd672625ec7240d252


# c9539b89 16-Feb-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@57cfae4a2 (master)

Notable upstream pull request merges:
#13816 Fix a race condition in dsl_dataset_sync() when
activating features
#14402 Prefetch on deadlists merge
#14410 Improve resilver ETAs
#14428 Resilver performance tuning
#14439 Resolve WS-2021-0184 vulnerability in zstd
#14440 EIO caused by encryption + recursive gang
#14448 Fix console progress reporting for recursive send
#14454 Improve arc_read() error reporting
#14460 Restore FreeBSD to use .rodata
#14474 Reduce need for contiguous memory for ioctls

Obtained from: OpenZFS
OpenZFS commit: 57cfae4a2f04aaff10c45b3f7975e0fe3ef3e8b8


# bb2d13b6 07-Dec-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@59493b63c (master)

Notable upstream pull request merges:
#13782 Fix setting the large_block feature after receiving a snapshot
#14157 FreeBSD: stop using buffer cache-only routines on sync
#14172 zed: post a udev change event from spa_vdev_attach()
#14181 zed: unclean disk attachment faults the vdev
#14190 Bump checksum error counter before reporting to ZED
#14196 Remove atomics from zh_refcount
#14197 Don't leak packed recieved proprties
#14198 Switch dnode stats to wmsums
#14199 Remove few pointer dereferences in dbuf_read()
#14200 Micro-optimize zrl_remove()
#14204 Lua: Fix bad bitshift in lua_strx2number()
#14212 Zstd fixes
#14218 Avoid a null pointer dereference in zfs_mount() on FreeBSD
#14235 nopwrites on dmu_sync-ed blocks can result in a panic
#14236 zio can deadlock during device removal
#14247 Micro-optimize fletcher4 calculations
#14261 FreeBSD: zfs_register_callbacks() must implement error check
correctly

Obtained from: OpenZFS
OpenZFS commit: 59493b63c18ea223857066218d6a58b67eb88159


# dbd5678d 16-Nov-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@2163cde45

Notable upstream pull request merges:
#13680 Add options to zfs redundant_metadata property
#13758 Allow mounting snapshots in .zfs/snapshot as a regular user
#13838 quota: disable quota check for ZVOL
#13839 quota: extend quota for dataset
#13973 Fix memory leaks in dmu_send()/dmu_send_obj()
#13977 Avoid unnecessary metaslab_check_free calling
#13978 PAM: Fix unchecked return value from zfs_key_config_load()
#13979 Handle possible null pointers from malloc/strdup/strndup()
#13997 zstream: allow decompress to fix metadata for uncompressed
records
#13998 zvol_wait logic may terminate prematurely
#14001 FreeBSD: Fix a pair of bugs in zfs_fhtovp()
#14003 Stop ganging due to past vdev write errors
#14039 Optimize microzaps
#14050 Fix draid2+2s metadata error on simultaneous 2 drive failures
#14062 zed: Avoid core dump if wholedisk property does not exist
#14077 Propagate extent_bytes change to autotrim thread
#14079 FreeBSD: vn_flush_cached_data: observe vnode locking contract
#14093 Fix ARC target collapse when zfs_arc_meta_limit_percent=100
#14106 Add ability to recompress send streams with new compression
algorithm
#14119 Deny receiving into encrypted datasets if the keys are not
loaded
#14120 Fix arc_p aggressive increase
#14129 zed: Prevent special vdev to be replaced by hot spare
#14133 Expose zfs_vdev_open_timeout_ms as a tunable
#14135 FreeBSD: Fix out of bounds read in zfs_ioctl_ozfs_to_legacy()
#14152 Adds the `-p` option to `zfs holds`
#14161 Handle and detect #13709's unlock regression

Obtained from: OpenZFS
OpenZFS commit: 2163cde450d0898b5f7bac16afb4e238485411ff


# be181ee2 04-Oct-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@d62bafee9

Notable upstream pull request merges:
#13857 Enforce "-F" flag on resuming recv of full/newfs on existing dataset
#13928 Revert "Reduce dbuf_find() lock contention"
#13928 Dynamically size dbuf hash mutex array
#13930 zpool: Don't print "repairing" on force faulted drives
#13938 Bring per_txg_dirty_frees_percent back to 30
#13939 Fix panic in dsl_process_sub_livelist for EINTR
#13954 Fix bad free in skein code
#13967 Fix potential NULL pointer dereference in dsl_dataset_promote_check()

Obtained from: OpenZFS
OpenZFS commit: d62bafee9fc38f8b9653c531e1861e83dcba4618


# 271171e0 13-Aug-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@b3d0568cf

Notable upstream pull request merges:
#9372 Implement a new type of zfs receive: corrective receive (-c)
#13635 Add snapshots_changed as property
#13636 Add support for per dataset zil stats and use wmsum counters
#13643 Fix scrub resume from newly created hole
#13670 Fix memory allocation for the checksum benchmark
#13695 Skip checksum benchmarks on systems with slow cpu
#13711 zpool: fix redundancy check after vdev removal

Obtained from: OpenZFS
OpenZFS commit: b3d0568cfd65458c92f7ab3d7bb709087992628e


# a0b956f5 07-Jul-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@cb01da680

Notable upstream pull request merges:
#12438 Avoid panic with recordsize > 128k, raw sending and no large_blocks
#13015 Fix dnode byteswapping
#13256 Add a "zstream decompress" subcommand
#13555 Scrub mirror children without BPs
#13576 Several sorted scrub optimizations
#13579 Fix and disable blocks statistics during scrub
#13582 Several B-tree optimizations
#13591 Avoid two 64-bit divisions per scanned block
#13606 Avoid memory copies during mirror scrub
#13613 Avoid memory copy when verifying raidz/draid parity

Obtained from: OpenZFS
OpenZFS commit: cb01da68057dcb9e612e8d2e97d058c46c3574af


# 1f1e2261 23-Jun-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@deb121309

Notable upstream pull request merges:
#12918 Introduce BLAKE3 checksums as an OpenZFS feature
#13553 Reduce ZIO io_lock contention on sorted scrub
#13537 Improve sorted scan memory accounting
#13540 AVL: Remove obsolete branching optimizations
#13563 FreeBSD: Improve crypto_dispatch() handling

Obtained from: OpenZFS
OpenZFS commit: deb1213098e2dc10e6eee5e5c57bb40584e096a6


# da5137ab 28-Mar-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bc3f12bfa (master) into main

Notable upstream pull request merges:
#12083 libzfs: FreeBSD doesn't resize partitions for you
#13106 add physical device size to SIZE column in 'zpool list -v'
#13158 Allow zfs send to exclude datasets
#13190 module: zfs: zio_inject: zio_match_handler: don't << -1
#13219 FreeBSD: add missing replay check to an assert in zfs_xvattr_set
#13220 module: freebsd: avoid a taking a destroyed lock in zfs_zevent bits
#13221 Fix ACL checks for NFS kernel server

Obtained from: OpenZFS
OpenZFS commit: bc3f12bfac152a0c28951cec92340ba14f9ccee9


# e92ffd9b 22-Jan-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@17b2ae0b2 (master) into main

Notable upstream pull request merges:
#12766 Fix error propagation from lzc_send_redacted
#12805 Updated the lz4 decompressor
#12851 FreeBSD: Provide correct file generation number
#12857 Verify dRAID empty sectors
#12874 FreeBSD: Update argument types for VOP_READDIR
#12896 Reduce number of arc_prune threads
#12934 FreeBSD: Fix zvol_*_open() locking
#12947 lz4: Cherrypick fix for CVE-2021-3520
#12961 FreeBSD: Fix leaked strings in libspl mnttab
#12964 Fix handling of errors from dmu_write_uio_dbuf() on FreeBSD
#12981 Introduce a flag to skip comparing the local mac when raw sending
#12985 Avoid memory allocations in the ARC eviction thread

Obtained from: OpenZFS
OpenZFS commit: 17b2ae0b24d487fdda2ef1098ec26fa7f79a61f6


# 681ce946 16-Dec-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f291fa658 (master) into main

Notable upstream pull request merges:
#11711 Vdev Properties Feature
#12717 VOP_RENAME fixes for FreeBSD
#12746 Enable strict hole reporting by default
#12770 ZFS send/recv with ashift 9->12 leads to data corruption
#12828 FreeBSD: Add vop_standard_writecount_nomsyn
#12828 zfs: Fix a deadlock between page busy and the teardown lock
#12828 FreeBSD: Catch up with more VFS changes

Obtained from: OpenZFS
OpenZFS commit: f291fa658efd146540b03ce386133632bde237bf


# 1f88aa09 07-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f3678d70f (master) into main

Notable upstream pull request merges:
#12339 Read past end of argv array in zpool_do_import()
#12365 Fixes in persistent L2ARC
#12383 Fixes for KMSAN reports
#12425 Avoid small buffer copying on write
#12428 Fix unfortunate NULL in spa_update_dspace
#12446 Allow disabling of unmapped I/O on FreeBSD

Obtained from: OpenZFS
OpenZFS commit: f3678d70ff8f98d67caf377ec0326c9a6c7bcf29


# 3f9d360c 22-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@14b43fbd9 (master) into main

Notable upstream pull request merges:
#12271 Tinker with slop space accounting with dedup
#12279 Fix ARC ghost states eviction accounting
#12284 Add Module Parameter Regarding Log Size Limit
#12300 Introduce dsl_dir_diduse_transfer_space()
#12314 Optimize allocation throttling
#12348 Minor ARC optimizations
#12350 Detect HAVE_LARGE_STACKS at compile time
#12356 Use SET_ERROR for more errors in FreeBSD vnops
#12375 FreeBSD: Ignore make_dev_s() errors
#12378 FreeBSD: Switch from MAXPHYS to maxphys on FreeBSD 13+

Obtained from: OpenZFS
OpenZFS commit: 14b43fbd9c13d802409ed886bb6b66fd528fb209


# 7cd22ac4 07-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bdd11cbb9 (master) into main

Notable upstream pull request merges:
#12274 Optimize txg_kick() process
#12281 Move gethrtime() calls out of vdev queue lock
#12287 Remove refcount from spa_config_*(
#12289 Compact dbuf/buf hashes and lock arrays
#12290 Remove avl_size field from struct avl_tree
#12294 Upstream: dmu_zfetch_stream_fini leaks refcount
#12295 Fix abd leak, kmem_free correct size of abd_t
#12328 FreeBSD: Hardcode abd_chunk_size to PAGE_SIZE

Obtained from: OpenZFS
OpenZFS commit: bdd11cbb90a2afa54fd00935ac0d34b4ddf2515c


# 33b8c039 25-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@5e2c8338b (master) into main

Notable upstream pull request merges:
#12183 Optimize small random numbers generation
#12227 Revert Consolidate arc_buf allocation checks
#12266 Fix flag copying in resume case
#12273 zfs_metaslab_mem_limit should be 25 instead of 75
#12276 Update cache file when setting compatibility property
#12280 Help compiller optimize out abd_verify()
#12282 FreeBSD: fix compilation of FreeBSD world after 29274c9f6

Obtained from: OpenZFS
OpenZFS commit: 5e2c8338bf17d31b44eb1dbbb3c9b6a0f64e96ee


# 9db44a8e 13-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9305ff2ed

Notable upstream pull request merges:
#11153 Scalable teardown lock for FreeBSD
#11651 Don't bomb out when using keylocation=file://
#11667 zvol: call zil_replaying() during replay
#11683 abd_get_offset_struct() may allocate new abd
#11693 Intentionally allow ZFS_READONLY in zfs_write
#11716 zpool import cachefile improvements
#11720 FreeBSD: Clean up zfsdev_close to match Linux
#11730 FreeBSD: bring back possibility to rewind the
checkpoint from bootloader

Obtained from: OpenZFS
MFC after: 2 weeks


# caed7b1c 02-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-bedbc13da

Notable upstream commits:
8e43fa12c Fix vdev_rebuild_thread deadlock
03ef8f09e Add missing checks for unsupported features
2e160dee9 Fix assert in FreeBSD-specific dmu_read_pages
bedbc13da Cancel TRIM / initialize on FAULTED non-writeable vdevs

MFC after: 1 week
Obtained from: OpenZFS


# 184c1b94 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-436ab35a5

- speed up writing to ZFS pools without ZIL devices (aa755b3)
- speed up importing ZFS pools (2d8f72d, a0e0199, cf0977a)
...

MFC after: 2 weeks
Reviewed by: mjg (partial)
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D28677


# 7877fdeb 07-Jan-2021 Matt Macy <mmacy@FreeBSD.org>

OpenZFS merge main-gf11b09

- add dRAID support
- fix duplicate close handling
- fix memory leak in prefetch
- fix problem with SIMD benchmarking on FreeBSD boot
...

# c40487d4 01-Oct-2020 Matt Macy <mmacy@FreeBSD.org>

OpenZFS: MFV 2.0-rc3-gfc5966

- Annotate FreeBSD sysctls with CTLFLAG_MPSAFE
- Reduce stack usage of Lua
- Don't save user FPU context in kernel threads
- Add support for procfs_list
- Code cleanup in zio_crypt
- Add DB_RF_NOPREFETCH to dbuf_read()s in dnode.c
- Drop references when skipping dmu_send due to EXDEV
- Eliminate gratuitous bzeroing in dbuf_stats_hash_table_data
- Fix legacy compat for platform IOCs


# eda14cbc 24-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

Initial import from vendor-sys branch of openzfs


# 14c2e0a0 08-Nov-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@9198de8f1

Notable upstream pull request merges:
#15197 3bd4df384 Improve ZFS objset sync parallelism
#15455 020f6fd09 FreeBSD: Implement taskq_init_ent()
#15476 3d86999c7 sa_lookup() ignores buffer size
#15478 2a154b848 Fix accounting error for pending sync IO ops in
zpool iostat
#15484 dc45a00ea Add kern.features.zfs
#15486 e36ff84c3 Update the kstat dataset_name when renaming a zvol
#15491 f4cd1bac7 Make abd_raidz_gen_iterate() pass an initialized
pointer to the callback
#15495 58398cbd0 FreeBSD: Optimize large kstat outputs

Obtained from: OpenZFS
OpenZFS commit: 9198de8f1079a8bbb837de3e3f8e236777b1375d


# cbfe9975 21-Sep-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4647353c8

Notable upstream pull request merges:
#15240 bbac1d297 Update the behavior of mountpoint property
#15240 c63aabaf1 Improve the handling of sharesmb,sharenfs properties
#15248 741c215ba Fix l2arc_apply_transforms ztest crash
#15274 ee720ad7b Retire z_nr_znodes
#15278 90149552b ZIL: Fix potential race on flush deferring
#15279 e923bcd16 Update the MOS directory on spa_upgrade_errlog()
#15281 529bec7d7 zed: Allow autoreplace and fault LEDs for removed vdevs
#15288 7228ba111 cmd: add 'help' subcommand to zpool and zfs
#15297 4647353c8 status: report pool suspension state under
failmode=continue

Obtained from: OpenZFS
OpenZFS commit: 4647353c8b2b5ca506da45bb9b01e1f3ef521847


# 2ad756a6 01-Sep-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@95f71c019

Notable upstream pull request merges:
#15018 Increase limit of redaction list by using spill block
#15161 Make zoned/jailed zfsprops(7) make more sense
#15216 Relax error reporting in zpool import and zpool split
#15218 Selectable block allocators
#15227 ZIL: Tune some assertions
#15228 ZIL: Revert zl_lock scope reduction
#15233 ZIL: Change ZIOs issue order

Obtained from: OpenZFS
OpenZFS commit: 95f71c019d7c3e3b728a9b05e2117ce6b09f1b87


# 315ee00f 26-Aug-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@804414aad

Notable upstream pull request merges:
#15024 Add missed DMU_PROJECTUSED_OBJECT prefetch
#15029 Do not request data L1 buffers on scan prefetch
#15036 FreeBSD: catch up to __FreeBSD_version 1400093
#15039 Fix raw receive with different indirect block size
#15047 FreeBSD: Fix build on stable/13 after 1302506
#15049 Fix the ZFS checksum error histograms with larger record sizes
#15052 Reduce bloat in ereport.fs.zfs.checksum events
#15056 Avoid extra snprintf() in dsl_deadlist_merge()
#15061 Ignore pool ashift property during vdev attachment
#15063 Don't panic if setting vdev properties is unsupported for this vdev type
#15067 spa_min_alloc should be GCD, not min
#15071 Add explicit prefetches to bpobj_iterate()
#15072 Adjust prefetch parameters
#15076 Refactor dmu_prefetch()
#15079 set autotrim default to 'off' everywhere
#15080 ZIL: Fix config lock deadlock
#15088 metaslab: tuneable to better control force ganging
#15096 Avoid waiting in dmu_sync_late_arrival()
#15097 BRT should return EOPNOTSUPP
#15103 Remove zl_issuer_lock from zil_suspend()
#15107 Remove fastwrite mechanism
#15113 libzfs: sendrecv: send_progress_thread: handle SIGINFO/SIGUSR1
#15122 ZIL: Second attempt to reduce scope of zl_issuer_lock
#15129 zpool_vdev_remove() should handle EALREADY error return
#15132 ZIL: Replay blocks without next block pointer
#15148 zfs_clone_range should return descriptive error codes
#15153 ZIL: Avoid dbuf_read() before dmu_sync()
#15172 copy_file_range: fix fallback when source create on same txg
#15180 Update outdated assertion from zio_write_compress

Obtained from: OpenZFS
OpenZFS commit: 804414aad224b432590afe3f9ec114ffb49e0f13


# 0a97523d 30-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@009d3288d

Notable upstream pull request merges:
#14654 Pack our DDT ZAPs a bit denser
#14979 Again fix race between zil_commit() and zil_suspend()
#14985 Some ZIO micro-optimizations
#15000 Fix remount when setting multiple properties
#15004 ddt_addref: remove unnecessary phys fill when refcount is 0
#15007 Do not report bytes skipped by scan as issued
#15023 Enable tuning of ZVOL open timeout value

Obtained from: OpenZFS
OpenZFS commit: 009d3288dea524c7ad373b04b65bee8bb6f0bfea
OpenZFS tag: zfs-2.2.0-rc1


# 7b5e6873 28-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@a9d6b0690

Notable upstream pull request merges:
#14925 Another set of vdev queue optimizations
#14964 Use big transactions for small recordsize writes
#14999 ZIL: Fix another use-after-free

Obtained from: OpenZFS
OpenZFS commit: a9d6b0690b1863f39a7efce08b1227f2e9e26abb


# 4e8d558c 10-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@feff9dfed

Notable upstream pull request merges:
#14833 Update compatibility.d files
#14841 ZIL: Reduce scope of per-dataset zl_issuer_lock
#14863 zil: Add some more statistics
#14866 btree: Implement faster binary search algorithm
#14894 Fix inconsistent definition of zfs_scrub_error_blocks_per_txg
#14892 Fix concurrent resilvers initiated at same time
#14903 Fix NULL pointer dereference when doing concurrent 'send' operations
#14910 ZIL: Allow to replay blocks of any size
#14939 Fix the L2ARC write size calculating logic
#14934 Introduce zfs_refcount_(add|remove)_few()
#14946 Improve l2arc reporting in arc_summary
#14953 Finally drop long disabled vdev cache
#14954 Fix the L2ARC write size calculating logic (2)
#14955 Use list_remove_head() where possible
#14959 ZIL: Fix race introduced by f63811f0721

Obtained from: OpenZFS
OpenZFS commit: feff9dfed3df1bbae5dd74959a6ad87d11f27ffb


# c0a83fe0 23-May-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@ad0a55461

Notable upstream pull request merges:
#12355 Teach zpool scrub to scrub only blocks in error log
#14811 Refine special_small_blocks property validation
#14854 zil: Some micro-optimizations
#14855 zil: Free lwb_buf after write completion
#14860 Fixes for issues identified by recent Coverity defect reports
#14861 Probe vdevs before marking removed
#14873 Add the ability to uninitialize a zpool
#14875 Hold db_mtx when updating db_state

Obtained from: OpenZFS
OpenZFS commit: ad0a554614b096698d9969340c4c593690042d5b


# d411c1d6 02-May-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@d96e29576

Notable upstream pull request merges:

#11680 Add support for zpool user properties
#14145 Storage device expansion "silently" fails on degraded vdev
#14405 Create zap for root vdev
#14659 Allow MMP to bypass waiting for other threads
#14674 Miscellaneous FreBSD compilation bugfixes
#14692 Fix some signedness issues in arc_evict()
#14702 Fix typo in check_clones()
#14715 module: small fixes for FreeBSD/aarch64
#14716 Trim needless zeroes from checksum events
#14719 vdev: expose zfs_vdev_max_ms_shift as a module parameter
#14722 Fix "Detach spare vdev in case if resilvering does not happen"
#14723 freebsd clone range fixes
#14728 Fix BLAKE3 aarch64 assembly for FreeBSD and macOS
#14735 Fix in check_filesystem()
#14739 Fix data corruption when cloning embedded blocks
#14758 Fix VERIFY(!zil_replaying(zilog, tx)) panic
#14761 Revert "ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced()"
#14774 FreeBSD .zfs fixups
#14776 FreeBSD: make zfs_vfs_held() definition consistent with declaration
#14779 powerpc64: Support ELFv2 asm on Big Endian
#14788 FreeBSD: add missing vop_fplookup assignments
#14789 PAM: support the authentication facility
#14790 Revert "Fix data race between zil_commit() and zil_suspend()"
#14795 Fix positive ABD size assertion in abd_verify()
#14798 Mark TX_COMMIT transaction with TXG_NOTHROTTLE
#14804 Correct ABD size for split block ZIOs
#14806 Use correct block pointer in block cloning case.
#14808 blake3: fix up bogus checksums in face of cpu migration

Obtained from: OpenZFS
OpenZFS commit: d96e29576c89e6e547cb82b477651d2b85ea0fed


# 2a58b312 03-Apr-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@431083f75

Notable upstream pull request merges:
#12194 Fix short-lived txg caused by autotrim
#13368 ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced()
#13392 Implementation of block cloning for ZFS
#13741 SHA2 reworking and API for iterating over multiple implementations
#14282 Sync thread should avoid holding the spa config write lock
when possible
#14283 txg_sync should handle write errors in ZIL
#14359 More adaptive ARC eviction
#14469 Fix NULL pointer dereference in zio_ready()
#14479 zfs redact fails when dnodesize=auto
#14496 improve error message of zfs redact
#14500 Skip memory allocation when compressing holes
#14501 FreeBSD: don't verify recycled vnode for zfs control directory
#14502 partially revert PR 14304 (eee9362a7)
#14509 Fix per-jail zfs.mount_snapshot setting
#14514 Fix data race between zil_commit() and zil_suspend()
#14516 System-wide speculative prefetch limit
#14517 Use rw_tryupgrade() in dmu_bonus_hold_by_dnode()
#14519 Do not hold spa_config in ZIL while blocked on IO
#14523 Move dmu_buf_rele() after dsl_dataset_sync_done()
#14524 Ignore too large stack in case of dsl_deadlist_merge
#14526 Use .section .rodata instead of .rodata on FreeBSD
#14528 ICP: AES-GCM: Refactor gcm_clear_ctx()
#14529 ICP: AES-GCM: Unify gcm_init_ctx() and gmac_init_ctx()
#14532 Handle unexpected errors in zil_lwb_commit() without ASSERT()
#14544 icp: Prevent compilers from optimizing away memset()
in gcm_clear_ctx()
#14546 Revert zfeature_active() to static
#14556 Remove bad kmem_free() oversight from previous zfsdev_state_list
patch
#14563 Optimize the is_l2cacheable functions
#14565 FreeBSD: zfs_znode_alloc: lock the vnode earlier
#14566 FreeBSD: fix false assert in cache_vop_rmdir when replaying ZIL
#14567 spl: Add cmn_err_once() to log a message only on the first call
#14568 Fix incremental receive silently failing for recursive sends
#14569 Restore ASMABI and other Unify work
#14576 Fix detection of IBM Power8 machines (ISA 2.07)
#14577 Better handling for future crypto parameters
#14600 zcommon: Refactor FPU state handling in fletcher4
#14603 Fix prefetching of indirect blocks while destroying
#14633 Fixes in persistent error log
#14639 FreeBSD: Remove extra arc_reduce_target_size() call
#14641 Additional limits on hole reporting
#14649 Drop lying to the compiler in the fletcher4 code
#14652 panic loop when removing slog device
#14653 Update vdev state for spare vdev
#14655 Fix cloning into already dirty dbufs
#14678 Revert "Do not hold spa_config in ZIL while blocked on IO"

Obtained from: OpenZFS
OpenZFS commit: 431083f75bdd3efaee992bdd672625ec7240d252


# c9539b89 16-Feb-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@57cfae4a2 (master)

Notable upstream pull request merges:
#13816 Fix a race condition in dsl_dataset_sync() when
activating features
#14402 Prefetch on deadlists merge
#14410 Improve resilver ETAs
#14428 Resilver performance tuning
#14439 Resolve WS-2021-0184 vulnerability in zstd
#14440 EIO caused by encryption + recursive gang
#14448 Fix console progress reporting for recursive send
#14454 Improve arc_read() error reporting
#14460 Restore FreeBSD to use .rodata
#14474 Reduce need for contiguous memory for ioctls

Obtained from: OpenZFS
OpenZFS commit: 57cfae4a2f04aaff10c45b3f7975e0fe3ef3e8b8


# bb2d13b6 07-Dec-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@59493b63c (master)

Notable upstream pull request merges:
#13782 Fix setting the large_block feature after receiving a snapshot
#14157 FreeBSD: stop using buffer cache-only routines on sync
#14172 zed: post a udev change event from spa_vdev_attach()
#14181 zed: unclean disk attachment faults the vdev
#14190 Bump checksum error counter before reporting to ZED
#14196 Remove atomics from zh_refcount
#14197 Don't leak packed recieved proprties
#14198 Switch dnode stats to wmsums
#14199 Remove few pointer dereferences in dbuf_read()
#14200 Micro-optimize zrl_remove()
#14204 Lua: Fix bad bitshift in lua_strx2number()
#14212 Zstd fixes
#14218 Avoid a null pointer dereference in zfs_mount() on FreeBSD
#14235 nopwrites on dmu_sync-ed blocks can result in a panic
#14236 zio can deadlock during device removal
#14247 Micro-optimize fletcher4 calculations
#14261 FreeBSD: zfs_register_callbacks() must implement error check
correctly

Obtained from: OpenZFS
OpenZFS commit: 59493b63c18ea223857066218d6a58b67eb88159


# dbd5678d 16-Nov-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@2163cde45

Notable upstream pull request merges:
#13680 Add options to zfs redundant_metadata property
#13758 Allow mounting snapshots in .zfs/snapshot as a regular user
#13838 quota: disable quota check for ZVOL
#13839 quota: extend quota for dataset
#13973 Fix memory leaks in dmu_send()/dmu_send_obj()
#13977 Avoid unnecessary metaslab_check_free calling
#13978 PAM: Fix unchecked return value from zfs_key_config_load()
#13979 Handle possible null pointers from malloc/strdup/strndup()
#13997 zstream: allow decompress to fix metadata for uncompressed
records
#13998 zvol_wait logic may terminate prematurely
#14001 FreeBSD: Fix a pair of bugs in zfs_fhtovp()
#14003 Stop ganging due to past vdev write errors
#14039 Optimize microzaps
#14050 Fix draid2+2s metadata error on simultaneous 2 drive failures
#14062 zed: Avoid core dump if wholedisk property does not exist
#14077 Propagate extent_bytes change to autotrim thread
#14079 FreeBSD: vn_flush_cached_data: observe vnode locking contract
#14093 Fix ARC target collapse when zfs_arc_meta_limit_percent=100
#14106 Add ability to recompress send streams with new compression
algorithm
#14119 Deny receiving into encrypted datasets if the keys are not
loaded
#14120 Fix arc_p aggressive increase
#14129 zed: Prevent special vdev to be replaced by hot spare
#14133 Expose zfs_vdev_open_timeout_ms as a tunable
#14135 FreeBSD: Fix out of bounds read in zfs_ioctl_ozfs_to_legacy()
#14152 Adds the `-p` option to `zfs holds`
#14161 Handle and detect #13709's unlock regression

Obtained from: OpenZFS
OpenZFS commit: 2163cde450d0898b5f7bac16afb4e238485411ff


# be181ee2 04-Oct-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@d62bafee9

Notable upstream pull request merges:
#13857 Enforce "-F" flag on resuming recv of full/newfs on existing dataset
#13928 Revert "Reduce dbuf_find() lock contention"
#13928 Dynamically size dbuf hash mutex array
#13930 zpool: Don't print "repairing" on force faulted drives
#13938 Bring per_txg_dirty_frees_percent back to 30
#13939 Fix panic in dsl_process_sub_livelist for EINTR
#13954 Fix bad free in skein code
#13967 Fix potential NULL pointer dereference in dsl_dataset_promote_check()

Obtained from: OpenZFS
OpenZFS commit: d62bafee9fc38f8b9653c531e1861e83dcba4618


# 271171e0 13-Aug-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@b3d0568cf

Notable upstream pull request merges:
#9372 Implement a new type of zfs receive: corrective receive (-c)
#13635 Add snapshots_changed as property
#13636 Add support for per dataset zil stats and use wmsum counters
#13643 Fix scrub resume from newly created hole
#13670 Fix memory allocation for the checksum benchmark
#13695 Skip checksum benchmarks on systems with slow cpu
#13711 zpool: fix redundancy check after vdev removal

Obtained from: OpenZFS
OpenZFS commit: b3d0568cfd65458c92f7ab3d7bb709087992628e


# a0b956f5 07-Jul-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@cb01da680

Notable upstream pull request merges:
#12438 Avoid panic with recordsize > 128k, raw sending and no large_blocks
#13015 Fix dnode byteswapping
#13256 Add a "zstream decompress" subcommand
#13555 Scrub mirror children without BPs
#13576 Several sorted scrub optimizations
#13579 Fix and disable blocks statistics during scrub
#13582 Several B-tree optimizations
#13591 Avoid two 64-bit divisions per scanned block
#13606 Avoid memory copies during mirror scrub
#13613 Avoid memory copy when verifying raidz/draid parity

Obtained from: OpenZFS
OpenZFS commit: cb01da68057dcb9e612e8d2e97d058c46c3574af


# 1f1e2261 23-Jun-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@deb121309

Notable upstream pull request merges:
#12918 Introduce BLAKE3 checksums as an OpenZFS feature
#13553 Reduce ZIO io_lock contention on sorted scrub
#13537 Improve sorted scan memory accounting
#13540 AVL: Remove obsolete branching optimizations
#13563 FreeBSD: Improve crypto_dispatch() handling

Obtained from: OpenZFS
OpenZFS commit: deb1213098e2dc10e6eee5e5c57bb40584e096a6


# da5137ab 28-Mar-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bc3f12bfa (master) into main

Notable upstream pull request merges:
#12083 libzfs: FreeBSD doesn't resize partitions for you
#13106 add physical device size to SIZE column in 'zpool list -v'
#13158 Allow zfs send to exclude datasets
#13190 module: zfs: zio_inject: zio_match_handler: don't << -1
#13219 FreeBSD: add missing replay check to an assert in zfs_xvattr_set
#13220 module: freebsd: avoid a taking a destroyed lock in zfs_zevent bits
#13221 Fix ACL checks for NFS kernel server

Obtained from: OpenZFS
OpenZFS commit: bc3f12bfac152a0c28951cec92340ba14f9ccee9


# e92ffd9b 22-Jan-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@17b2ae0b2 (master) into main

Notable upstream pull request merges:
#12766 Fix error propagation from lzc_send_redacted
#12805 Updated the lz4 decompressor
#12851 FreeBSD: Provide correct file generation number
#12857 Verify dRAID empty sectors
#12874 FreeBSD: Update argument types for VOP_READDIR
#12896 Reduce number of arc_prune threads
#12934 FreeBSD: Fix zvol_*_open() locking
#12947 lz4: Cherrypick fix for CVE-2021-3520
#12961 FreeBSD: Fix leaked strings in libspl mnttab
#12964 Fix handling of errors from dmu_write_uio_dbuf() on FreeBSD
#12981 Introduce a flag to skip comparing the local mac when raw sending
#12985 Avoid memory allocations in the ARC eviction thread

Obtained from: OpenZFS
OpenZFS commit: 17b2ae0b24d487fdda2ef1098ec26fa7f79a61f6


# 681ce946 16-Dec-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f291fa658 (master) into main

Notable upstream pull request merges:
#11711 Vdev Properties Feature
#12717 VOP_RENAME fixes for FreeBSD
#12746 Enable strict hole reporting by default
#12770 ZFS send/recv with ashift 9->12 leads to data corruption
#12828 FreeBSD: Add vop_standard_writecount_nomsyn
#12828 zfs: Fix a deadlock between page busy and the teardown lock
#12828 FreeBSD: Catch up with more VFS changes

Obtained from: OpenZFS
OpenZFS commit: f291fa658efd146540b03ce386133632bde237bf


# 1f88aa09 07-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f3678d70f (master) into main

Notable upstream pull request merges:
#12339 Read past end of argv array in zpool_do_import()
#12365 Fixes in persistent L2ARC
#12383 Fixes for KMSAN reports
#12425 Avoid small buffer copying on write
#12428 Fix unfortunate NULL in spa_update_dspace
#12446 Allow disabling of unmapped I/O on FreeBSD

Obtained from: OpenZFS
OpenZFS commit: f3678d70ff8f98d67caf377ec0326c9a6c7bcf29


# 3f9d360c 22-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@14b43fbd9 (master) into main

Notable upstream pull request merges:
#12271 Tinker with slop space accounting with dedup
#12279 Fix ARC ghost states eviction accounting
#12284 Add Module Parameter Regarding Log Size Limit
#12300 Introduce dsl_dir_diduse_transfer_space()
#12314 Optimize allocation throttling
#12348 Minor ARC optimizations
#12350 Detect HAVE_LARGE_STACKS at compile time
#12356 Use SET_ERROR for more errors in FreeBSD vnops
#12375 FreeBSD: Ignore make_dev_s() errors
#12378 FreeBSD: Switch from MAXPHYS to maxphys on FreeBSD 13+

Obtained from: OpenZFS
OpenZFS commit: 14b43fbd9c13d802409ed886bb6b66fd528fb209


# 7cd22ac4 07-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bdd11cbb9 (master) into main

Notable upstream pull request merges:
#12274 Optimize txg_kick() process
#12281 Move gethrtime() calls out of vdev queue lock
#12287 Remove refcount from spa_config_*(
#12289 Compact dbuf/buf hashes and lock arrays
#12290 Remove avl_size field from struct avl_tree
#12294 Upstream: dmu_zfetch_stream_fini leaks refcount
#12295 Fix abd leak, kmem_free correct size of abd_t
#12328 FreeBSD: Hardcode abd_chunk_size to PAGE_SIZE

Obtained from: OpenZFS
OpenZFS commit: bdd11cbb90a2afa54fd00935ac0d34b4ddf2515c


# 33b8c039 25-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@5e2c8338b (master) into main

Notable upstream pull request merges:
#12183 Optimize small random numbers generation
#12227 Revert Consolidate arc_buf allocation checks
#12266 Fix flag copying in resume case
#12273 zfs_metaslab_mem_limit should be 25 instead of 75
#12276 Update cache file when setting compatibility property
#12280 Help compiller optimize out abd_verify()
#12282 FreeBSD: fix compilation of FreeBSD world after 29274c9f6

Obtained from: OpenZFS
OpenZFS commit: 5e2c8338bf17d31b44eb1dbbb3c9b6a0f64e96ee


# 9db44a8e 13-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9305ff2ed

Notable upstream pull request merges:
#11153 Scalable teardown lock for FreeBSD
#11651 Don't bomb out when using keylocation=file://
#11667 zvol: call zil_replaying() during replay
#11683 abd_get_offset_struct() may allocate new abd
#11693 Intentionally allow ZFS_READONLY in zfs_write
#11716 zpool import cachefile improvements
#11720 FreeBSD: Clean up zfsdev_close to match Linux
#11730 FreeBSD: bring back possibility to rewind the
checkpoint from bootloader

Obtained from: OpenZFS
MFC after: 2 weeks


# caed7b1c 02-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-bedbc13da

Notable upstream commits:
8e43fa12c Fix vdev_rebuild_thread deadlock
03ef8f09e Add missing checks for unsupported features
2e160dee9 Fix assert in FreeBSD-specific dmu_read_pages
bedbc13da Cancel TRIM / initialize on FAULTED non-writeable vdevs

MFC after: 1 week
Obtained from: OpenZFS


# 184c1b94 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-436ab35a5

- speed up writing to ZFS pools without ZIL devices (aa755b3)
- speed up importing ZFS pools (2d8f72d, a0e0199, cf0977a)
...

MFC after: 2 weeks
Reviewed by: mjg (partial)
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D28677


# 7877fdeb 07-Jan-2021 Matt Macy <mmacy@FreeBSD.org>

OpenZFS merge main-gf11b09

- add dRAID support
- fix duplicate close handling
- fix memory leak in prefetch
- fix problem with SIMD benchmarking on FreeBSD boot
...

# c40487d4 01-Oct-2020 Matt Macy <mmacy@FreeBSD.org>

OpenZFS: MFV 2.0-rc3-gfc5966

- Annotate FreeBSD sysctls with CTLFLAG_MPSAFE
- Reduce stack usage of Lua
- Don't save user FPU context in kernel threads
- Add support for procfs_list
- Code cleanup in zio_crypt
- Add DB_RF_NOPREFETCH to dbuf_read()s in dnode.c
- Drop references when skipping dmu_send due to EXDEV
- Eliminate gratuitous bzeroing in dbuf_stats_hash_table_data
- Fix legacy compat for platform IOCs


# eda14cbc 24-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

Initial import from vendor-sys branch of openzfs


# cbfe9975 21-Sep-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4647353c8

Notable upstream pull request merges:
#15240 bbac1d297 Update the behavior of mountpoint property
#15240 c63aabaf1 Improve the handling of sharesmb,sharenfs properties
#15248 741c215ba Fix l2arc_apply_transforms ztest crash
#15274 ee720ad7b Retire z_nr_znodes
#15278 90149552b ZIL: Fix potential race on flush deferring
#15279 e923bcd16 Update the MOS directory on spa_upgrade_errlog()
#15281 529bec7d7 zed: Allow autoreplace and fault LEDs for removed vdevs
#15288 7228ba111 cmd: add 'help' subcommand to zpool and zfs
#15297 4647353c8 status: report pool suspension state under
failmode=continue

Obtained from: OpenZFS
OpenZFS commit: 4647353c8b2b5ca506da45bb9b01e1f3ef521847


# 2ad756a6 01-Sep-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@95f71c019

Notable upstream pull request merges:
#15018 Increase limit of redaction list by using spill block
#15161 Make zoned/jailed zfsprops(7) make more sense
#15216 Relax error reporting in zpool import and zpool split
#15218 Selectable block allocators
#15227 ZIL: Tune some assertions
#15228 ZIL: Revert zl_lock scope reduction
#15233 ZIL: Change ZIOs issue order

Obtained from: OpenZFS
OpenZFS commit: 95f71c019d7c3e3b728a9b05e2117ce6b09f1b87


# 315ee00f 26-Aug-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@804414aad

Notable upstream pull request merges:
#15024 Add missed DMU_PROJECTUSED_OBJECT prefetch
#15029 Do not request data L1 buffers on scan prefetch
#15036 FreeBSD: catch up to __FreeBSD_version 1400093
#15039 Fix raw receive with different indirect block size
#15047 FreeBSD: Fix build on stable/13 after 1302506
#15049 Fix the ZFS checksum error histograms with larger record sizes
#15052 Reduce bloat in ereport.fs.zfs.checksum events
#15056 Avoid extra snprintf() in dsl_deadlist_merge()
#15061 Ignore pool ashift property during vdev attachment
#15063 Don't panic if setting vdev properties is unsupported for this vdev type
#15067 spa_min_alloc should be GCD, not min
#15071 Add explicit prefetches to bpobj_iterate()
#15072 Adjust prefetch parameters
#15076 Refactor dmu_prefetch()
#15079 set autotrim default to 'off' everywhere
#15080 ZIL: Fix config lock deadlock
#15088 metaslab: tuneable to better control force ganging
#15096 Avoid waiting in dmu_sync_late_arrival()
#15097 BRT should return EOPNOTSUPP
#15103 Remove zl_issuer_lock from zil_suspend()
#15107 Remove fastwrite mechanism
#15113 libzfs: sendrecv: send_progress_thread: handle SIGINFO/SIGUSR1
#15122 ZIL: Second attempt to reduce scope of zl_issuer_lock
#15129 zpool_vdev_remove() should handle EALREADY error return
#15132 ZIL: Replay blocks without next block pointer
#15148 zfs_clone_range should return descriptive error codes
#15153 ZIL: Avoid dbuf_read() before dmu_sync()
#15172 copy_file_range: fix fallback when source create on same txg
#15180 Update outdated assertion from zio_write_compress

Obtained from: OpenZFS
OpenZFS commit: 804414aad224b432590afe3f9ec114ffb49e0f13


# 0a97523d 30-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@009d3288d

Notable upstream pull request merges:
#14654 Pack our DDT ZAPs a bit denser
#14979 Again fix race between zil_commit() and zil_suspend()
#14985 Some ZIO micro-optimizations
#15000 Fix remount when setting multiple properties
#15004 ddt_addref: remove unnecessary phys fill when refcount is 0
#15007 Do not report bytes skipped by scan as issued
#15023 Enable tuning of ZVOL open timeout value

Obtained from: OpenZFS
OpenZFS commit: 009d3288dea524c7ad373b04b65bee8bb6f0bfea
OpenZFS tag: zfs-2.2.0-rc1


# 7b5e6873 28-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@a9d6b0690

Notable upstream pull request merges:
#14925 Another set of vdev queue optimizations
#14964 Use big transactions for small recordsize writes
#14999 ZIL: Fix another use-after-free

Obtained from: OpenZFS
OpenZFS commit: a9d6b0690b1863f39a7efce08b1227f2e9e26abb


# 4e8d558c 10-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@feff9dfed

Notable upstream pull request merges:
#14833 Update compatibility.d files
#14841 ZIL: Reduce scope of per-dataset zl_issuer_lock
#14863 zil: Add some more statistics
#14866 btree: Implement faster binary search algorithm
#14894 Fix inconsistent definition of zfs_scrub_error_blocks_per_txg
#14892 Fix concurrent resilvers initiated at same time
#14903 Fix NULL pointer dereference when doing concurrent 'send' operations
#14910 ZIL: Allow to replay blocks of any size
#14939 Fix the L2ARC write size calculating logic
#14934 Introduce zfs_refcount_(add|remove)_few()
#14946 Improve l2arc reporting in arc_summary
#14953 Finally drop long disabled vdev cache
#14954 Fix the L2ARC write size calculating logic (2)
#14955 Use list_remove_head() where possible
#14959 ZIL: Fix race introduced by f63811f0721

Obtained from: OpenZFS
OpenZFS commit: feff9dfed3df1bbae5dd74959a6ad87d11f27ffb


# c0a83fe0 23-May-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@ad0a55461

Notable upstream pull request merges:
#12355 Teach zpool scrub to scrub only blocks in error log
#14811 Refine special_small_blocks property validation
#14854 zil: Some micro-optimizations
#14855 zil: Free lwb_buf after write completion
#14860 Fixes for issues identified by recent Coverity defect reports
#14861 Probe vdevs before marking removed
#14873 Add the ability to uninitialize a zpool
#14875 Hold db_mtx when updating db_state

Obtained from: OpenZFS
OpenZFS commit: ad0a554614b096698d9969340c4c593690042d5b


# d411c1d6 02-May-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@d96e29576

Notable upstream pull request merges:

#11680 Add support for zpool user properties
#14145 Storage device expansion "silently" fails on degraded vdev
#14405 Create zap for root vdev
#14659 Allow MMP to bypass waiting for other threads
#14674 Miscellaneous FreBSD compilation bugfixes
#14692 Fix some signedness issues in arc_evict()
#14702 Fix typo in check_clones()
#14715 module: small fixes for FreeBSD/aarch64
#14716 Trim needless zeroes from checksum events
#14719 vdev: expose zfs_vdev_max_ms_shift as a module parameter
#14722 Fix "Detach spare vdev in case if resilvering does not happen"
#14723 freebsd clone range fixes
#14728 Fix BLAKE3 aarch64 assembly for FreeBSD and macOS
#14735 Fix in check_filesystem()
#14739 Fix data corruption when cloning embedded blocks
#14758 Fix VERIFY(!zil_replaying(zilog, tx)) panic
#14761 Revert "ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced()"
#14774 FreeBSD .zfs fixups
#14776 FreeBSD: make zfs_vfs_held() definition consistent with declaration
#14779 powerpc64: Support ELFv2 asm on Big Endian
#14788 FreeBSD: add missing vop_fplookup assignments
#14789 PAM: support the authentication facility
#14790 Revert "Fix data race between zil_commit() and zil_suspend()"
#14795 Fix positive ABD size assertion in abd_verify()
#14798 Mark TX_COMMIT transaction with TXG_NOTHROTTLE
#14804 Correct ABD size for split block ZIOs
#14806 Use correct block pointer in block cloning case.
#14808 blake3: fix up bogus checksums in face of cpu migration

Obtained from: OpenZFS
OpenZFS commit: d96e29576c89e6e547cb82b477651d2b85ea0fed


# 2a58b312 03-Apr-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@431083f75

Notable upstream pull request merges:
#12194 Fix short-lived txg caused by autotrim
#13368 ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced()
#13392 Implementation of block cloning for ZFS
#13741 SHA2 reworking and API for iterating over multiple implementations
#14282 Sync thread should avoid holding the spa config write lock
when possible
#14283 txg_sync should handle write errors in ZIL
#14359 More adaptive ARC eviction
#14469 Fix NULL pointer dereference in zio_ready()
#14479 zfs redact fails when dnodesize=auto
#14496 improve error message of zfs redact
#14500 Skip memory allocation when compressing holes
#14501 FreeBSD: don't verify recycled vnode for zfs control directory
#14502 partially revert PR 14304 (eee9362a7)
#14509 Fix per-jail zfs.mount_snapshot setting
#14514 Fix data race between zil_commit() and zil_suspend()
#14516 System-wide speculative prefetch limit
#14517 Use rw_tryupgrade() in dmu_bonus_hold_by_dnode()
#14519 Do not hold spa_config in ZIL while blocked on IO
#14523 Move dmu_buf_rele() after dsl_dataset_sync_done()
#14524 Ignore too large stack in case of dsl_deadlist_merge
#14526 Use .section .rodata instead of .rodata on FreeBSD
#14528 ICP: AES-GCM: Refactor gcm_clear_ctx()
#14529 ICP: AES-GCM: Unify gcm_init_ctx() and gmac_init_ctx()
#14532 Handle unexpected errors in zil_lwb_commit() without ASSERT()
#14544 icp: Prevent compilers from optimizing away memset()
in gcm_clear_ctx()
#14546 Revert zfeature_active() to static
#14556 Remove bad kmem_free() oversight from previous zfsdev_state_list
patch
#14563 Optimize the is_l2cacheable functions
#14565 FreeBSD: zfs_znode_alloc: lock the vnode earlier
#14566 FreeBSD: fix false assert in cache_vop_rmdir when replaying ZIL
#14567 spl: Add cmn_err_once() to log a message only on the first call
#14568 Fix incremental receive silently failing for recursive sends
#14569 Restore ASMABI and other Unify work
#14576 Fix detection of IBM Power8 machines (ISA 2.07)
#14577 Better handling for future crypto parameters
#14600 zcommon: Refactor FPU state handling in fletcher4
#14603 Fix prefetching of indirect blocks while destroying
#14633 Fixes in persistent error log
#14639 FreeBSD: Remove extra arc_reduce_target_size() call
#14641 Additional limits on hole reporting
#14649 Drop lying to the compiler in the fletcher4 code
#14652 panic loop when removing slog device
#14653 Update vdev state for spare vdev
#14655 Fix cloning into already dirty dbufs
#14678 Revert "Do not hold spa_config in ZIL while blocked on IO"

Obtained from: OpenZFS
OpenZFS commit: 431083f75bdd3efaee992bdd672625ec7240d252


# c9539b89 16-Feb-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@57cfae4a2 (master)

Notable upstream pull request merges:
#13816 Fix a race condition in dsl_dataset_sync() when
activating features
#14402 Prefetch on deadlists merge
#14410 Improve resilver ETAs
#14428 Resilver performance tuning
#14439 Resolve WS-2021-0184 vulnerability in zstd
#14440 EIO caused by encryption + recursive gang
#14448 Fix console progress reporting for recursive send
#14454 Improve arc_read() error reporting
#14460 Restore FreeBSD to use .rodata
#14474 Reduce need for contiguous memory for ioctls

Obtained from: OpenZFS
OpenZFS commit: 57cfae4a2f04aaff10c45b3f7975e0fe3ef3e8b8


# bb2d13b6 07-Dec-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@59493b63c (master)

Notable upstream pull request merges:
#13782 Fix setting the large_block feature after receiving a snapshot
#14157 FreeBSD: stop using buffer cache-only routines on sync
#14172 zed: post a udev change event from spa_vdev_attach()
#14181 zed: unclean disk attachment faults the vdev
#14190 Bump checksum error counter before reporting to ZED
#14196 Remove atomics from zh_refcount
#14197 Don't leak packed recieved proprties
#14198 Switch dnode stats to wmsums
#14199 Remove few pointer dereferences in dbuf_read()
#14200 Micro-optimize zrl_remove()
#14204 Lua: Fix bad bitshift in lua_strx2number()
#14212 Zstd fixes
#14218 Avoid a null pointer dereference in zfs_mount() on FreeBSD
#14235 nopwrites on dmu_sync-ed blocks can result in a panic
#14236 zio can deadlock during device removal
#14247 Micro-optimize fletcher4 calculations
#14261 FreeBSD: zfs_register_callbacks() must implement error check
correctly

Obtained from: OpenZFS
OpenZFS commit: 59493b63c18ea223857066218d6a58b67eb88159


# dbd5678d 16-Nov-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@2163cde45

Notable upstream pull request merges:
#13680 Add options to zfs redundant_metadata property
#13758 Allow mounting snapshots in .zfs/snapshot as a regular user
#13838 quota: disable quota check for ZVOL
#13839 quota: extend quota for dataset
#13973 Fix memory leaks in dmu_send()/dmu_send_obj()
#13977 Avoid unnecessary metaslab_check_free calling
#13978 PAM: Fix unchecked return value from zfs_key_config_load()
#13979 Handle possible null pointers from malloc/strdup/strndup()
#13997 zstream: allow decompress to fix metadata for uncompressed
records
#13998 zvol_wait logic may terminate prematurely
#14001 FreeBSD: Fix a pair of bugs in zfs_fhtovp()
#14003 Stop ganging due to past vdev write errors
#14039 Optimize microzaps
#14050 Fix draid2+2s metadata error on simultaneous 2 drive failures
#14062 zed: Avoid core dump if wholedisk property does not exist
#14077 Propagate extent_bytes change to autotrim thread
#14079 FreeBSD: vn_flush_cached_data: observe vnode locking contract
#14093 Fix ARC target collapse when zfs_arc_meta_limit_percent=100
#14106 Add ability to recompress send streams with new compression
algorithm
#14119 Deny receiving into encrypted datasets if the keys are not
loaded
#14120 Fix arc_p aggressive increase
#14129 zed: Prevent special vdev to be replaced by hot spare
#14133 Expose zfs_vdev_open_timeout_ms as a tunable
#14135 FreeBSD: Fix out of bounds read in zfs_ioctl_ozfs_to_legacy()
#14152 Adds the `-p` option to `zfs holds`
#14161 Handle and detect #13709's unlock regression

Obtained from: OpenZFS
OpenZFS commit: 2163cde450d0898b5f7bac16afb4e238485411ff


# be181ee2 04-Oct-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@d62bafee9

Notable upstream pull request merges:
#13857 Enforce "-F" flag on resuming recv of full/newfs on existing dataset
#13928 Revert "Reduce dbuf_find() lock contention"
#13928 Dynamically size dbuf hash mutex array
#13930 zpool: Don't print "repairing" on force faulted drives
#13938 Bring per_txg_dirty_frees_percent back to 30
#13939 Fix panic in dsl_process_sub_livelist for EINTR
#13954 Fix bad free in skein code
#13967 Fix potential NULL pointer dereference in dsl_dataset_promote_check()

Obtained from: OpenZFS
OpenZFS commit: d62bafee9fc38f8b9653c531e1861e83dcba4618


# 271171e0 13-Aug-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@b3d0568cf

Notable upstream pull request merges:
#9372 Implement a new type of zfs receive: corrective receive (-c)
#13635 Add snapshots_changed as property
#13636 Add support for per dataset zil stats and use wmsum counters
#13643 Fix scrub resume from newly created hole
#13670 Fix memory allocation for the checksum benchmark
#13695 Skip checksum benchmarks on systems with slow cpu
#13711 zpool: fix redundancy check after vdev removal

Obtained from: OpenZFS
OpenZFS commit: b3d0568cfd65458c92f7ab3d7bb709087992628e


# a0b956f5 07-Jul-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@cb01da680

Notable upstream pull request merges:
#12438 Avoid panic with recordsize > 128k, raw sending and no large_blocks
#13015 Fix dnode byteswapping
#13256 Add a "zstream decompress" subcommand
#13555 Scrub mirror children without BPs
#13576 Several sorted scrub optimizations
#13579 Fix and disable blocks statistics during scrub
#13582 Several B-tree optimizations
#13591 Avoid two 64-bit divisions per scanned block
#13606 Avoid memory copies during mirror scrub
#13613 Avoid memory copy when verifying raidz/draid parity

Obtained from: OpenZFS
OpenZFS commit: cb01da68057dcb9e612e8d2e97d058c46c3574af


# 1f1e2261 23-Jun-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@deb121309

Notable upstream pull request merges:
#12918 Introduce BLAKE3 checksums as an OpenZFS feature
#13553 Reduce ZIO io_lock contention on sorted scrub
#13537 Improve sorted scan memory accounting
#13540 AVL: Remove obsolete branching optimizations
#13563 FreeBSD: Improve crypto_dispatch() handling

Obtained from: OpenZFS
OpenZFS commit: deb1213098e2dc10e6eee5e5c57bb40584e096a6


# da5137ab 28-Mar-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bc3f12bfa (master) into main

Notable upstream pull request merges:
#12083 libzfs: FreeBSD doesn't resize partitions for you
#13106 add physical device size to SIZE column in 'zpool list -v'
#13158 Allow zfs send to exclude datasets
#13190 module: zfs: zio_inject: zio_match_handler: don't << -1
#13219 FreeBSD: add missing replay check to an assert in zfs_xvattr_set
#13220 module: freebsd: avoid a taking a destroyed lock in zfs_zevent bits
#13221 Fix ACL checks for NFS kernel server

Obtained from: OpenZFS
OpenZFS commit: bc3f12bfac152a0c28951cec92340ba14f9ccee9


# e92ffd9b 22-Jan-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@17b2ae0b2 (master) into main

Notable upstream pull request merges:
#12766 Fix error propagation from lzc_send_redacted
#12805 Updated the lz4 decompressor
#12851 FreeBSD: Provide correct file generation number
#12857 Verify dRAID empty sectors
#12874 FreeBSD: Update argument types for VOP_READDIR
#12896 Reduce number of arc_prune threads
#12934 FreeBSD: Fix zvol_*_open() locking
#12947 lz4: Cherrypick fix for CVE-2021-3520
#12961 FreeBSD: Fix leaked strings in libspl mnttab
#12964 Fix handling of errors from dmu_write_uio_dbuf() on FreeBSD
#12981 Introduce a flag to skip comparing the local mac when raw sending
#12985 Avoid memory allocations in the ARC eviction thread

Obtained from: OpenZFS
OpenZFS commit: 17b2ae0b24d487fdda2ef1098ec26fa7f79a61f6


# 681ce946 16-Dec-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f291fa658 (master) into main

Notable upstream pull request merges:
#11711 Vdev Properties Feature
#12717 VOP_RENAME fixes for FreeBSD
#12746 Enable strict hole reporting by default
#12770 ZFS send/recv with ashift 9->12 leads to data corruption
#12828 FreeBSD: Add vop_standard_writecount_nomsyn
#12828 zfs: Fix a deadlock between page busy and the teardown lock
#12828 FreeBSD: Catch up with more VFS changes

Obtained from: OpenZFS
OpenZFS commit: f291fa658efd146540b03ce386133632bde237bf


# 1f88aa09 07-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f3678d70f (master) into main

Notable upstream pull request merges:
#12339 Read past end of argv array in zpool_do_import()
#12365 Fixes in persistent L2ARC
#12383 Fixes for KMSAN reports
#12425 Avoid small buffer copying on write
#12428 Fix unfortunate NULL in spa_update_dspace
#12446 Allow disabling of unmapped I/O on FreeBSD

Obtained from: OpenZFS
OpenZFS commit: f3678d70ff8f98d67caf377ec0326c9a6c7bcf29


# 3f9d360c 22-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@14b43fbd9 (master) into main

Notable upstream pull request merges:
#12271 Tinker with slop space accounting with dedup
#12279 Fix ARC ghost states eviction accounting
#12284 Add Module Parameter Regarding Log Size Limit
#12300 Introduce dsl_dir_diduse_transfer_space()
#12314 Optimize allocation throttling
#12348 Minor ARC optimizations
#12350 Detect HAVE_LARGE_STACKS at compile time
#12356 Use SET_ERROR for more errors in FreeBSD vnops
#12375 FreeBSD: Ignore make_dev_s() errors
#12378 FreeBSD: Switch from MAXPHYS to maxphys on FreeBSD 13+

Obtained from: OpenZFS
OpenZFS commit: 14b43fbd9c13d802409ed886bb6b66fd528fb209


# 7cd22ac4 07-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bdd11cbb9 (master) into main

Notable upstream pull request merges:
#12274 Optimize txg_kick() process
#12281 Move gethrtime() calls out of vdev queue lock
#12287 Remove refcount from spa_config_*(
#12289 Compact dbuf/buf hashes and lock arrays
#12290 Remove avl_size field from struct avl_tree
#12294 Upstream: dmu_zfetch_stream_fini leaks refcount
#12295 Fix abd leak, kmem_free correct size of abd_t
#12328 FreeBSD: Hardcode abd_chunk_size to PAGE_SIZE

Obtained from: OpenZFS
OpenZFS commit: bdd11cbb90a2afa54fd00935ac0d34b4ddf2515c


# 33b8c039 25-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@5e2c8338b (master) into main

Notable upstream pull request merges:
#12183 Optimize small random numbers generation
#12227 Revert Consolidate arc_buf allocation checks
#12266 Fix flag copying in resume case
#12273 zfs_metaslab_mem_limit should be 25 instead of 75
#12276 Update cache file when setting compatibility property
#12280 Help compiller optimize out abd_verify()
#12282 FreeBSD: fix compilation of FreeBSD world after 29274c9f6

Obtained from: OpenZFS
OpenZFS commit: 5e2c8338bf17d31b44eb1dbbb3c9b6a0f64e96ee


# 9db44a8e 13-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9305ff2ed

Notable upstream pull request merges:
#11153 Scalable teardown lock for FreeBSD
#11651 Don't bomb out when using keylocation=file://
#11667 zvol: call zil_replaying() during replay
#11683 abd_get_offset_struct() may allocate new abd
#11693 Intentionally allow ZFS_READONLY in zfs_write
#11716 zpool import cachefile improvements
#11720 FreeBSD: Clean up zfsdev_close to match Linux
#11730 FreeBSD: bring back possibility to rewind the
checkpoint from bootloader

Obtained from: OpenZFS
MFC after: 2 weeks


# caed7b1c 02-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-bedbc13da

Notable upstream commits:
8e43fa12c Fix vdev_rebuild_thread deadlock
03ef8f09e Add missing checks for unsupported features
2e160dee9 Fix assert in FreeBSD-specific dmu_read_pages
bedbc13da Cancel TRIM / initialize on FAULTED non-writeable vdevs

MFC after: 1 week
Obtained from: OpenZFS


# 184c1b94 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-436ab35a5

- speed up writing to ZFS pools without ZIL devices (aa755b3)
- speed up importing ZFS pools (2d8f72d, a0e0199, cf0977a)
...

MFC after: 2 weeks
Reviewed by: mjg (partial)
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D28677


# 7877fdeb 07-Jan-2021 Matt Macy <mmacy@FreeBSD.org>

OpenZFS merge main-gf11b09

- add dRAID support
- fix duplicate close handling
- fix memory leak in prefetch
- fix problem with SIMD benchmarking on FreeBSD boot
...

# c40487d4 01-Oct-2020 Matt Macy <mmacy@FreeBSD.org>

OpenZFS: MFV 2.0-rc3-gfc5966

- Annotate FreeBSD sysctls with CTLFLAG_MPSAFE
- Reduce stack usage of Lua
- Don't save user FPU context in kernel threads
- Add support for procfs_list
- Code cleanup in zio_crypt
- Add DB_RF_NOPREFETCH to dbuf_read()s in dnode.c
- Drop references when skipping dmu_send due to EXDEV
- Eliminate gratuitous bzeroing in dbuf_stats_hash_table_data
- Fix legacy compat for platform IOCs


# eda14cbc 24-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

Initial import from vendor-sys branch of openzfs


# 2ad756a6 01-Sep-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@95f71c019

Notable upstream pull request merges:
#15018 Increase limit of redaction list by using spill block
#15161 Make zoned/jailed zfsprops(7) make more sense
#15216 Relax error reporting in zpool import and zpool split
#15218 Selectable block allocators
#15227 ZIL: Tune some assertions
#15228 ZIL: Revert zl_lock scope reduction
#15233 ZIL: Change ZIOs issue order

Obtained from: OpenZFS
OpenZFS commit: 95f71c019d7c3e3b728a9b05e2117ce6b09f1b87


# 315ee00f 26-Aug-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@804414aad

Notable upstream pull request merges:
#15024 Add missed DMU_PROJECTUSED_OBJECT prefetch
#15029 Do not request data L1 buffers on scan prefetch
#15036 FreeBSD: catch up to __FreeBSD_version 1400093
#15039 Fix raw receive with different indirect block size
#15047 FreeBSD: Fix build on stable/13 after 1302506
#15049 Fix the ZFS checksum error histograms with larger record sizes
#15052 Reduce bloat in ereport.fs.zfs.checksum events
#15056 Avoid extra snprintf() in dsl_deadlist_merge()
#15061 Ignore pool ashift property during vdev attachment
#15063 Don't panic if setting vdev properties is unsupported for this vdev type
#15067 spa_min_alloc should be GCD, not min
#15071 Add explicit prefetches to bpobj_iterate()
#15072 Adjust prefetch parameters
#15076 Refactor dmu_prefetch()
#15079 set autotrim default to 'off' everywhere
#15080 ZIL: Fix config lock deadlock
#15088 metaslab: tuneable to better control force ganging
#15096 Avoid waiting in dmu_sync_late_arrival()
#15097 BRT should return EOPNOTSUPP
#15103 Remove zl_issuer_lock from zil_suspend()
#15107 Remove fastwrite mechanism
#15113 libzfs: sendrecv: send_progress_thread: handle SIGINFO/SIGUSR1
#15122 ZIL: Second attempt to reduce scope of zl_issuer_lock
#15129 zpool_vdev_remove() should handle EALREADY error return
#15132 ZIL: Replay blocks without next block pointer
#15148 zfs_clone_range should return descriptive error codes
#15153 ZIL: Avoid dbuf_read() before dmu_sync()
#15172 copy_file_range: fix fallback when source create on same txg
#15180 Update outdated assertion from zio_write_compress

Obtained from: OpenZFS
OpenZFS commit: 804414aad224b432590afe3f9ec114ffb49e0f13


# 0a97523d 30-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@009d3288d

Notable upstream pull request merges:
#14654 Pack our DDT ZAPs a bit denser
#14979 Again fix race between zil_commit() and zil_suspend()
#14985 Some ZIO micro-optimizations
#15000 Fix remount when setting multiple properties
#15004 ddt_addref: remove unnecessary phys fill when refcount is 0
#15007 Do not report bytes skipped by scan as issued
#15023 Enable tuning of ZVOL open timeout value

Obtained from: OpenZFS
OpenZFS commit: 009d3288dea524c7ad373b04b65bee8bb6f0bfea
OpenZFS tag: zfs-2.2.0-rc1


# 7b5e6873 28-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@a9d6b0690

Notable upstream pull request merges:
#14925 Another set of vdev queue optimizations
#14964 Use big transactions for small recordsize writes
#14999 ZIL: Fix another use-after-free

Obtained from: OpenZFS
OpenZFS commit: a9d6b0690b1863f39a7efce08b1227f2e9e26abb


# 4e8d558c 10-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@feff9dfed

Notable upstream pull request merges:
#14833 Update compatibility.d files
#14841 ZIL: Reduce scope of per-dataset zl_issuer_lock
#14863 zil: Add some more statistics
#14866 btree: Implement faster binary search algorithm
#14894 Fix inconsistent definition of zfs_scrub_error_blocks_per_txg
#14892 Fix concurrent resilvers initiated at same time
#14903 Fix NULL pointer dereference when doing concurrent 'send' operations
#14910 ZIL: Allow to replay blocks of any size
#14939 Fix the L2ARC write size calculating logic
#14934 Introduce zfs_refcount_(add|remove)_few()
#14946 Improve l2arc reporting in arc_summary
#14953 Finally drop long disabled vdev cache
#14954 Fix the L2ARC write size calculating logic (2)
#14955 Use list_remove_head() where possible
#14959 ZIL: Fix race introduced by f63811f0721

Obtained from: OpenZFS
OpenZFS commit: feff9dfed3df1bbae5dd74959a6ad87d11f27ffb


# c0a83fe0 23-May-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@ad0a55461

Notable upstream pull request merges:
#12355 Teach zpool scrub to scrub only blocks in error log
#14811 Refine special_small_blocks property validation
#14854 zil: Some micro-optimizations
#14855 zil: Free lwb_buf after write completion
#14860 Fixes for issues identified by recent Coverity defect reports
#14861 Probe vdevs before marking removed
#14873 Add the ability to uninitialize a zpool
#14875 Hold db_mtx when updating db_state

Obtained from: OpenZFS
OpenZFS commit: ad0a554614b096698d9969340c4c593690042d5b


# d411c1d6 02-May-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@d96e29576

Notable upstream pull request merges:

#11680 Add support for zpool user properties
#14145 Storage device expansion "silently" fails on degraded vdev
#14405 Create zap for root vdev
#14659 Allow MMP to bypass waiting for other threads
#14674 Miscellaneous FreBSD compilation bugfixes
#14692 Fix some signedness issues in arc_evict()
#14702 Fix typo in check_clones()
#14715 module: small fixes for FreeBSD/aarch64
#14716 Trim needless zeroes from checksum events
#14719 vdev: expose zfs_vdev_max_ms_shift as a module parameter
#14722 Fix "Detach spare vdev in case if resilvering does not happen"
#14723 freebsd clone range fixes
#14728 Fix BLAKE3 aarch64 assembly for FreeBSD and macOS
#14735 Fix in check_filesystem()
#14739 Fix data corruption when cloning embedded blocks
#14758 Fix VERIFY(!zil_replaying(zilog, tx)) panic
#14761 Revert "ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced()"
#14774 FreeBSD .zfs fixups
#14776 FreeBSD: make zfs_vfs_held() definition consistent with declaration
#14779 powerpc64: Support ELFv2 asm on Big Endian
#14788 FreeBSD: add missing vop_fplookup assignments
#14789 PAM: support the authentication facility
#14790 Revert "Fix data race between zil_commit() and zil_suspend()"
#14795 Fix positive ABD size assertion in abd_verify()
#14798 Mark TX_COMMIT transaction with TXG_NOTHROTTLE
#14804 Correct ABD size for split block ZIOs
#14806 Use correct block pointer in block cloning case.
#14808 blake3: fix up bogus checksums in face of cpu migration

Obtained from: OpenZFS
OpenZFS commit: d96e29576c89e6e547cb82b477651d2b85ea0fed


# 2a58b312 03-Apr-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@431083f75

Notable upstream pull request merges:
#12194 Fix short-lived txg caused by autotrim
#13368 ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced()
#13392 Implementation of block cloning for ZFS
#13741 SHA2 reworking and API for iterating over multiple implementations
#14282 Sync thread should avoid holding the spa config write lock
when possible
#14283 txg_sync should handle write errors in ZIL
#14359 More adaptive ARC eviction
#14469 Fix NULL pointer dereference in zio_ready()
#14479 zfs redact fails when dnodesize=auto
#14496 improve error message of zfs redact
#14500 Skip memory allocation when compressing holes
#14501 FreeBSD: don't verify recycled vnode for zfs control directory
#14502 partially revert PR 14304 (eee9362a7)
#14509 Fix per-jail zfs.mount_snapshot setting
#14514 Fix data race between zil_commit() and zil_suspend()
#14516 System-wide speculative prefetch limit
#14517 Use rw_tryupgrade() in dmu_bonus_hold_by_dnode()
#14519 Do not hold spa_config in ZIL while blocked on IO
#14523 Move dmu_buf_rele() after dsl_dataset_sync_done()
#14524 Ignore too large stack in case of dsl_deadlist_merge
#14526 Use .section .rodata instead of .rodata on FreeBSD
#14528 ICP: AES-GCM: Refactor gcm_clear_ctx()
#14529 ICP: AES-GCM: Unify gcm_init_ctx() and gmac_init_ctx()
#14532 Handle unexpected errors in zil_lwb_commit() without ASSERT()
#14544 icp: Prevent compilers from optimizing away memset()
in gcm_clear_ctx()
#14546 Revert zfeature_active() to static
#14556 Remove bad kmem_free() oversight from previous zfsdev_state_list
patch
#14563 Optimize the is_l2cacheable functions
#14565 FreeBSD: zfs_znode_alloc: lock the vnode earlier
#14566 FreeBSD: fix false assert in cache_vop_rmdir when replaying ZIL
#14567 spl: Add cmn_err_once() to log a message only on the first call
#14568 Fix incremental receive silently failing for recursive sends
#14569 Restore ASMABI and other Unify work
#14576 Fix detection of IBM Power8 machines (ISA 2.07)
#14577 Better handling for future crypto parameters
#14600 zcommon: Refactor FPU state handling in fletcher4
#14603 Fix prefetching of indirect blocks while destroying
#14633 Fixes in persistent error log
#14639 FreeBSD: Remove extra arc_reduce_target_size() call
#14641 Additional limits on hole reporting
#14649 Drop lying to the compiler in the fletcher4 code
#14652 panic loop when removing slog device
#14653 Update vdev state for spare vdev
#14655 Fix cloning into already dirty dbufs
#14678 Revert "Do not hold spa_config in ZIL while blocked on IO"

Obtained from: OpenZFS
OpenZFS commit: 431083f75bdd3efaee992bdd672625ec7240d252


# c9539b89 16-Feb-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@57cfae4a2 (master)

Notable upstream pull request merges:
#13816 Fix a race condition in dsl_dataset_sync() when
activating features
#14402 Prefetch on deadlists merge
#14410 Improve resilver ETAs
#14428 Resilver performance tuning
#14439 Resolve WS-2021-0184 vulnerability in zstd
#14440 EIO caused by encryption + recursive gang
#14448 Fix console progress reporting for recursive send
#14454 Improve arc_read() error reporting
#14460 Restore FreeBSD to use .rodata
#14474 Reduce need for contiguous memory for ioctls

Obtained from: OpenZFS
OpenZFS commit: 57cfae4a2f04aaff10c45b3f7975e0fe3ef3e8b8


# bb2d13b6 07-Dec-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@59493b63c (master)

Notable upstream pull request merges:
#13782 Fix setting the large_block feature after receiving a snapshot
#14157 FreeBSD: stop using buffer cache-only routines on sync
#14172 zed: post a udev change event from spa_vdev_attach()
#14181 zed: unclean disk attachment faults the vdev
#14190 Bump checksum error counter before reporting to ZED
#14196 Remove atomics from zh_refcount
#14197 Don't leak packed recieved proprties
#14198 Switch dnode stats to wmsums
#14199 Remove few pointer dereferences in dbuf_read()
#14200 Micro-optimize zrl_remove()
#14204 Lua: Fix bad bitshift in lua_strx2number()
#14212 Zstd fixes
#14218 Avoid a null pointer dereference in zfs_mount() on FreeBSD
#14235 nopwrites on dmu_sync-ed blocks can result in a panic
#14236 zio can deadlock during device removal
#14247 Micro-optimize fletcher4 calculations
#14261 FreeBSD: zfs_register_callbacks() must implement error check
correctly

Obtained from: OpenZFS
OpenZFS commit: 59493b63c18ea223857066218d6a58b67eb88159


# dbd5678d 16-Nov-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@2163cde45

Notable upstream pull request merges:
#13680 Add options to zfs redundant_metadata property
#13758 Allow mounting snapshots in .zfs/snapshot as a regular user
#13838 quota: disable quota check for ZVOL
#13839 quota: extend quota for dataset
#13973 Fix memory leaks in dmu_send()/dmu_send_obj()
#13977 Avoid unnecessary metaslab_check_free calling
#13978 PAM: Fix unchecked return value from zfs_key_config_load()
#13979 Handle possible null pointers from malloc/strdup/strndup()
#13997 zstream: allow decompress to fix metadata for uncompressed
records
#13998 zvol_wait logic may terminate prematurely
#14001 FreeBSD: Fix a pair of bugs in zfs_fhtovp()
#14003 Stop ganging due to past vdev write errors
#14039 Optimize microzaps
#14050 Fix draid2+2s metadata error on simultaneous 2 drive failures
#14062 zed: Avoid core dump if wholedisk property does not exist
#14077 Propagate extent_bytes change to autotrim thread
#14079 FreeBSD: vn_flush_cached_data: observe vnode locking contract
#14093 Fix ARC target collapse when zfs_arc_meta_limit_percent=100
#14106 Add ability to recompress send streams with new compression
algorithm
#14119 Deny receiving into encrypted datasets if the keys are not
loaded
#14120 Fix arc_p aggressive increase
#14129 zed: Prevent special vdev to be replaced by hot spare
#14133 Expose zfs_vdev_open_timeout_ms as a tunable
#14135 FreeBSD: Fix out of bounds read in zfs_ioctl_ozfs_to_legacy()
#14152 Adds the `-p` option to `zfs holds`
#14161 Handle and detect #13709's unlock regression

Obtained from: OpenZFS
OpenZFS commit: 2163cde450d0898b5f7bac16afb4e238485411ff


# be181ee2 04-Oct-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@d62bafee9

Notable upstream pull request merges:
#13857 Enforce "-F" flag on resuming recv of full/newfs on existing dataset
#13928 Revert "Reduce dbuf_find() lock contention"
#13928 Dynamically size dbuf hash mutex array
#13930 zpool: Don't print "repairing" on force faulted drives
#13938 Bring per_txg_dirty_frees_percent back to 30
#13939 Fix panic in dsl_process_sub_livelist for EINTR
#13954 Fix bad free in skein code
#13967 Fix potential NULL pointer dereference in dsl_dataset_promote_check()

Obtained from: OpenZFS
OpenZFS commit: d62bafee9fc38f8b9653c531e1861e83dcba4618


# 271171e0 13-Aug-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@b3d0568cf

Notable upstream pull request merges:
#9372 Implement a new type of zfs receive: corrective receive (-c)
#13635 Add snapshots_changed as property
#13636 Add support for per dataset zil stats and use wmsum counters
#13643 Fix scrub resume from newly created hole
#13670 Fix memory allocation for the checksum benchmark
#13695 Skip checksum benchmarks on systems with slow cpu
#13711 zpool: fix redundancy check after vdev removal

Obtained from: OpenZFS
OpenZFS commit: b3d0568cfd65458c92f7ab3d7bb709087992628e


# a0b956f5 07-Jul-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@cb01da680

Notable upstream pull request merges:
#12438 Avoid panic with recordsize > 128k, raw sending and no large_blocks
#13015 Fix dnode byteswapping
#13256 Add a "zstream decompress" subcommand
#13555 Scrub mirror children without BPs
#13576 Several sorted scrub optimizations
#13579 Fix and disable blocks statistics during scrub
#13582 Several B-tree optimizations
#13591 Avoid two 64-bit divisions per scanned block
#13606 Avoid memory copies during mirror scrub
#13613 Avoid memory copy when verifying raidz/draid parity

Obtained from: OpenZFS
OpenZFS commit: cb01da68057dcb9e612e8d2e97d058c46c3574af


# 1f1e2261 23-Jun-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@deb121309

Notable upstream pull request merges:
#12918 Introduce BLAKE3 checksums as an OpenZFS feature
#13553 Reduce ZIO io_lock contention on sorted scrub
#13537 Improve sorted scan memory accounting
#13540 AVL: Remove obsolete branching optimizations
#13563 FreeBSD: Improve crypto_dispatch() handling

Obtained from: OpenZFS
OpenZFS commit: deb1213098e2dc10e6eee5e5c57bb40584e096a6


# da5137ab 28-Mar-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bc3f12bfa (master) into main

Notable upstream pull request merges:
#12083 libzfs: FreeBSD doesn't resize partitions for you
#13106 add physical device size to SIZE column in 'zpool list -v'
#13158 Allow zfs send to exclude datasets
#13190 module: zfs: zio_inject: zio_match_handler: don't << -1
#13219 FreeBSD: add missing replay check to an assert in zfs_xvattr_set
#13220 module: freebsd: avoid a taking a destroyed lock in zfs_zevent bits
#13221 Fix ACL checks for NFS kernel server

Obtained from: OpenZFS
OpenZFS commit: bc3f12bfac152a0c28951cec92340ba14f9ccee9


# e92ffd9b 22-Jan-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@17b2ae0b2 (master) into main

Notable upstream pull request merges:
#12766 Fix error propagation from lzc_send_redacted
#12805 Updated the lz4 decompressor
#12851 FreeBSD: Provide correct file generation number
#12857 Verify dRAID empty sectors
#12874 FreeBSD: Update argument types for VOP_READDIR
#12896 Reduce number of arc_prune threads
#12934 FreeBSD: Fix zvol_*_open() locking
#12947 lz4: Cherrypick fix for CVE-2021-3520
#12961 FreeBSD: Fix leaked strings in libspl mnttab
#12964 Fix handling of errors from dmu_write_uio_dbuf() on FreeBSD
#12981 Introduce a flag to skip comparing the local mac when raw sending
#12985 Avoid memory allocations in the ARC eviction thread

Obtained from: OpenZFS
OpenZFS commit: 17b2ae0b24d487fdda2ef1098ec26fa7f79a61f6


# 681ce946 16-Dec-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f291fa658 (master) into main

Notable upstream pull request merges:
#11711 Vdev Properties Feature
#12717 VOP_RENAME fixes for FreeBSD
#12746 Enable strict hole reporting by default
#12770 ZFS send/recv with ashift 9->12 leads to data corruption
#12828 FreeBSD: Add vop_standard_writecount_nomsyn
#12828 zfs: Fix a deadlock between page busy and the teardown lock
#12828 FreeBSD: Catch up with more VFS changes

Obtained from: OpenZFS
OpenZFS commit: f291fa658efd146540b03ce386133632bde237bf


# 1f88aa09 07-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f3678d70f (master) into main

Notable upstream pull request merges:
#12339 Read past end of argv array in zpool_do_import()
#12365 Fixes in persistent L2ARC
#12383 Fixes for KMSAN reports
#12425 Avoid small buffer copying on write
#12428 Fix unfortunate NULL in spa_update_dspace
#12446 Allow disabling of unmapped I/O on FreeBSD

Obtained from: OpenZFS
OpenZFS commit: f3678d70ff8f98d67caf377ec0326c9a6c7bcf29


# 3f9d360c 22-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@14b43fbd9 (master) into main

Notable upstream pull request merges:
#12271 Tinker with slop space accounting with dedup
#12279 Fix ARC ghost states eviction accounting
#12284 Add Module Parameter Regarding Log Size Limit
#12300 Introduce dsl_dir_diduse_transfer_space()
#12314 Optimize allocation throttling
#12348 Minor ARC optimizations
#12350 Detect HAVE_LARGE_STACKS at compile time
#12356 Use SET_ERROR for more errors in FreeBSD vnops
#12375 FreeBSD: Ignore make_dev_s() errors
#12378 FreeBSD: Switch from MAXPHYS to maxphys on FreeBSD 13+

Obtained from: OpenZFS
OpenZFS commit: 14b43fbd9c13d802409ed886bb6b66fd528fb209


# 7cd22ac4 07-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bdd11cbb9 (master) into main

Notable upstream pull request merges:
#12274 Optimize txg_kick() process
#12281 Move gethrtime() calls out of vdev queue lock
#12287 Remove refcount from spa_config_*(
#12289 Compact dbuf/buf hashes and lock arrays
#12290 Remove avl_size field from struct avl_tree
#12294 Upstream: dmu_zfetch_stream_fini leaks refcount
#12295 Fix abd leak, kmem_free correct size of abd_t
#12328 FreeBSD: Hardcode abd_chunk_size to PAGE_SIZE

Obtained from: OpenZFS
OpenZFS commit: bdd11cbb90a2afa54fd00935ac0d34b4ddf2515c


# 33b8c039 25-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@5e2c8338b (master) into main

Notable upstream pull request merges:
#12183 Optimize small random numbers generation
#12227 Revert Consolidate arc_buf allocation checks
#12266 Fix flag copying in resume case
#12273 zfs_metaslab_mem_limit should be 25 instead of 75
#12276 Update cache file when setting compatibility property
#12280 Help compiller optimize out abd_verify()
#12282 FreeBSD: fix compilation of FreeBSD world after 29274c9f6

Obtained from: OpenZFS
OpenZFS commit: 5e2c8338bf17d31b44eb1dbbb3c9b6a0f64e96ee


# 9db44a8e 13-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9305ff2ed

Notable upstream pull request merges:
#11153 Scalable teardown lock for FreeBSD
#11651 Don't bomb out when using keylocation=file://
#11667 zvol: call zil_replaying() during replay
#11683 abd_get_offset_struct() may allocate new abd
#11693 Intentionally allow ZFS_READONLY in zfs_write
#11716 zpool import cachefile improvements
#11720 FreeBSD: Clean up zfsdev_close to match Linux
#11730 FreeBSD: bring back possibility to rewind the
checkpoint from bootloader

Obtained from: OpenZFS
MFC after: 2 weeks


# caed7b1c 02-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-bedbc13da

Notable upstream commits:
8e43fa12c Fix vdev_rebuild_thread deadlock
03ef8f09e Add missing checks for unsupported features
2e160dee9 Fix assert in FreeBSD-specific dmu_read_pages
bedbc13da Cancel TRIM / initialize on FAULTED non-writeable vdevs

MFC after: 1 week
Obtained from: OpenZFS


# 184c1b94 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-436ab35a5

- speed up writing to ZFS pools without ZIL devices (aa755b3)
- speed up importing ZFS pools (2d8f72d, a0e0199, cf0977a)
...

MFC after: 2 weeks
Reviewed by: mjg (partial)
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D28677


# 7877fdeb 07-Jan-2021 Matt Macy <mmacy@FreeBSD.org>

OpenZFS merge main-gf11b09

- add dRAID support
- fix duplicate close handling
- fix memory leak in prefetch
- fix problem with SIMD benchmarking on FreeBSD boot
...

# c40487d4 01-Oct-2020 Matt Macy <mmacy@FreeBSD.org>

OpenZFS: MFV 2.0-rc3-gfc5966

- Annotate FreeBSD sysctls with CTLFLAG_MPSAFE
- Reduce stack usage of Lua
- Don't save user FPU context in kernel threads
- Add support for procfs_list
- Code cleanup in zio_crypt
- Add DB_RF_NOPREFETCH to dbuf_read()s in dnode.c
- Drop references when skipping dmu_send due to EXDEV
- Eliminate gratuitous bzeroing in dbuf_stats_hash_table_data
- Fix legacy compat for platform IOCs


# eda14cbc 24-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

Initial import from vendor-sys branch of openzfs


# 315ee00f 26-Aug-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@804414aad

Notable upstream pull request merges:
#15024 Add missed DMU_PROJECTUSED_OBJECT prefetch
#15029 Do not request data L1 buffers on scan prefetch
#15036 FreeBSD: catch up to __FreeBSD_version 1400093
#15039 Fix raw receive with different indirect block size
#15047 FreeBSD: Fix build on stable/13 after 1302506
#15049 Fix the ZFS checksum error histograms with larger record sizes
#15052 Reduce bloat in ereport.fs.zfs.checksum events
#15056 Avoid extra snprintf() in dsl_deadlist_merge()
#15061 Ignore pool ashift property during vdev attachment
#15063 Don't panic if setting vdev properties is unsupported for this vdev type
#15067 spa_min_alloc should be GCD, not min
#15071 Add explicit prefetches to bpobj_iterate()
#15072 Adjust prefetch parameters
#15076 Refactor dmu_prefetch()
#15079 set autotrim default to 'off' everywhere
#15080 ZIL: Fix config lock deadlock
#15088 metaslab: tuneable to better control force ganging
#15096 Avoid waiting in dmu_sync_late_arrival()
#15097 BRT should return EOPNOTSUPP
#15103 Remove zl_issuer_lock from zil_suspend()
#15107 Remove fastwrite mechanism
#15113 libzfs: sendrecv: send_progress_thread: handle SIGINFO/SIGUSR1
#15122 ZIL: Second attempt to reduce scope of zl_issuer_lock
#15129 zpool_vdev_remove() should handle EALREADY error return
#15132 ZIL: Replay blocks without next block pointer
#15148 zfs_clone_range should return descriptive error codes
#15153 ZIL: Avoid dbuf_read() before dmu_sync()
#15172 copy_file_range: fix fallback when source create on same txg
#15180 Update outdated assertion from zio_write_compress

Obtained from: OpenZFS
OpenZFS commit: 804414aad224b432590afe3f9ec114ffb49e0f13


# 0a97523d 30-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@009d3288d

Notable upstream pull request merges:
#14654 Pack our DDT ZAPs a bit denser
#14979 Again fix race between zil_commit() and zil_suspend()
#14985 Some ZIO micro-optimizations
#15000 Fix remount when setting multiple properties
#15004 ddt_addref: remove unnecessary phys fill when refcount is 0
#15007 Do not report bytes skipped by scan as issued
#15023 Enable tuning of ZVOL open timeout value

Obtained from: OpenZFS
OpenZFS commit: 009d3288dea524c7ad373b04b65bee8bb6f0bfea
OpenZFS tag: zfs-2.2.0-rc1


# 7b5e6873 28-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@a9d6b0690

Notable upstream pull request merges:
#14925 Another set of vdev queue optimizations
#14964 Use big transactions for small recordsize writes
#14999 ZIL: Fix another use-after-free

Obtained from: OpenZFS
OpenZFS commit: a9d6b0690b1863f39a7efce08b1227f2e9e26abb


# 4e8d558c 10-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@feff9dfed

Notable upstream pull request merges:
#14833 Update compatibility.d files
#14841 ZIL: Reduce scope of per-dataset zl_issuer_lock
#14863 zil: Add some more statistics
#14866 btree: Implement faster binary search algorithm
#14894 Fix inconsistent definition of zfs_scrub_error_blocks_per_txg
#14892 Fix concurrent resilvers initiated at same time
#14903 Fix NULL pointer dereference when doing concurrent 'send' operations
#14910 ZIL: Allow to replay blocks of any size
#14939 Fix the L2ARC write size calculating logic
#14934 Introduce zfs_refcount_(add|remove)_few()
#14946 Improve l2arc reporting in arc_summary
#14953 Finally drop long disabled vdev cache
#14954 Fix the L2ARC write size calculating logic (2)
#14955 Use list_remove_head() where possible
#14959 ZIL: Fix race introduced by f63811f0721

Obtained from: OpenZFS
OpenZFS commit: feff9dfed3df1bbae5dd74959a6ad87d11f27ffb


# c0a83fe0 23-May-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@ad0a55461

Notable upstream pull request merges:
#12355 Teach zpool scrub to scrub only blocks in error log
#14811 Refine special_small_blocks property validation
#14854 zil: Some micro-optimizations
#14855 zil: Free lwb_buf after write completion
#14860 Fixes for issues identified by recent Coverity defect reports
#14861 Probe vdevs before marking removed
#14873 Add the ability to uninitialize a zpool
#14875 Hold db_mtx when updating db_state

Obtained from: OpenZFS
OpenZFS commit: ad0a554614b096698d9969340c4c593690042d5b


# d411c1d6 02-May-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@d96e29576

Notable upstream pull request merges:

#11680 Add support for zpool user properties
#14145 Storage device expansion "silently" fails on degraded vdev
#14405 Create zap for root vdev
#14659 Allow MMP to bypass waiting for other threads
#14674 Miscellaneous FreBSD compilation bugfixes
#14692 Fix some signedness issues in arc_evict()
#14702 Fix typo in check_clones()
#14715 module: small fixes for FreeBSD/aarch64
#14716 Trim needless zeroes from checksum events
#14719 vdev: expose zfs_vdev_max_ms_shift as a module parameter
#14722 Fix "Detach spare vdev in case if resilvering does not happen"
#14723 freebsd clone range fixes
#14728 Fix BLAKE3 aarch64 assembly for FreeBSD and macOS
#14735 Fix in check_filesystem()
#14739 Fix data corruption when cloning embedded blocks
#14758 Fix VERIFY(!zil_replaying(zilog, tx)) panic
#14761 Revert "ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced()"
#14774 FreeBSD .zfs fixups
#14776 FreeBSD: make zfs_vfs_held() definition consistent with declaration
#14779 powerpc64: Support ELFv2 asm on Big Endian
#14788 FreeBSD: add missing vop_fplookup assignments
#14789 PAM: support the authentication facility
#14790 Revert "Fix data race between zil_commit() and zil_suspend()"
#14795 Fix positive ABD size assertion in abd_verify()
#14798 Mark TX_COMMIT transaction with TXG_NOTHROTTLE
#14804 Correct ABD size for split block ZIOs
#14806 Use correct block pointer in block cloning case.
#14808 blake3: fix up bogus checksums in face of cpu migration

Obtained from: OpenZFS
OpenZFS commit: d96e29576c89e6e547cb82b477651d2b85ea0fed


# 2a58b312 03-Apr-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@431083f75

Notable upstream pull request merges:
#12194 Fix short-lived txg caused by autotrim
#13368 ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced()
#13392 Implementation of block cloning for ZFS
#13741 SHA2 reworking and API for iterating over multiple implementations
#14282 Sync thread should avoid holding the spa config write lock
when possible
#14283 txg_sync should handle write errors in ZIL
#14359 More adaptive ARC eviction
#14469 Fix NULL pointer dereference in zio_ready()
#14479 zfs redact fails when dnodesize=auto
#14496 improve error message of zfs redact
#14500 Skip memory allocation when compressing holes
#14501 FreeBSD: don't verify recycled vnode for zfs control directory
#14502 partially revert PR 14304 (eee9362a7)
#14509 Fix per-jail zfs.mount_snapshot setting
#14514 Fix data race between zil_commit() and zil_suspend()
#14516 System-wide speculative prefetch limit
#14517 Use rw_tryupgrade() in dmu_bonus_hold_by_dnode()
#14519 Do not hold spa_config in ZIL while blocked on IO
#14523 Move dmu_buf_rele() after dsl_dataset_sync_done()
#14524 Ignore too large stack in case of dsl_deadlist_merge
#14526 Use .section .rodata instead of .rodata on FreeBSD
#14528 ICP: AES-GCM: Refactor gcm_clear_ctx()
#14529 ICP: AES-GCM: Unify gcm_init_ctx() and gmac_init_ctx()
#14532 Handle unexpected errors in zil_lwb_commit() without ASSERT()
#14544 icp: Prevent compilers from optimizing away memset()
in gcm_clear_ctx()
#14546 Revert zfeature_active() to static
#14556 Remove bad kmem_free() oversight from previous zfsdev_state_list
patch
#14563 Optimize the is_l2cacheable functions
#14565 FreeBSD: zfs_znode_alloc: lock the vnode earlier
#14566 FreeBSD: fix false assert in cache_vop_rmdir when replaying ZIL
#14567 spl: Add cmn_err_once() to log a message only on the first call
#14568 Fix incremental receive silently failing for recursive sends
#14569 Restore ASMABI and other Unify work
#14576 Fix detection of IBM Power8 machines (ISA 2.07)
#14577 Better handling for future crypto parameters
#14600 zcommon: Refactor FPU state handling in fletcher4
#14603 Fix prefetching of indirect blocks while destroying
#14633 Fixes in persistent error log
#14639 FreeBSD: Remove extra arc_reduce_target_size() call
#14641 Additional limits on hole reporting
#14649 Drop lying to the compiler in the fletcher4 code
#14652 panic loop when removing slog device
#14653 Update vdev state for spare vdev
#14655 Fix cloning into already dirty dbufs
#14678 Revert "Do not hold spa_config in ZIL while blocked on IO"

Obtained from: OpenZFS
OpenZFS commit: 431083f75bdd3efaee992bdd672625ec7240d252


# c9539b89 16-Feb-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@57cfae4a2 (master)

Notable upstream pull request merges:
#13816 Fix a race condition in dsl_dataset_sync() when
activating features
#14402 Prefetch on deadlists merge
#14410 Improve resilver ETAs
#14428 Resilver performance tuning
#14439 Resolve WS-2021-0184 vulnerability in zstd
#14440 EIO caused by encryption + recursive gang
#14448 Fix console progress reporting for recursive send
#14454 Improve arc_read() error reporting
#14460 Restore FreeBSD to use .rodata
#14474 Reduce need for contiguous memory for ioctls

Obtained from: OpenZFS
OpenZFS commit: 57cfae4a2f04aaff10c45b3f7975e0fe3ef3e8b8


# bb2d13b6 07-Dec-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@59493b63c (master)

Notable upstream pull request merges:
#13782 Fix setting the large_block feature after receiving a snapshot
#14157 FreeBSD: stop using buffer cache-only routines on sync
#14172 zed: post a udev change event from spa_vdev_attach()
#14181 zed: unclean disk attachment faults the vdev
#14190 Bump checksum error counter before reporting to ZED
#14196 Remove atomics from zh_refcount
#14197 Don't leak packed recieved proprties
#14198 Switch dnode stats to wmsums
#14199 Remove few pointer dereferences in dbuf_read()
#14200 Micro-optimize zrl_remove()
#14204 Lua: Fix bad bitshift in lua_strx2number()
#14212 Zstd fixes
#14218 Avoid a null pointer dereference in zfs_mount() on FreeBSD
#14235 nopwrites on dmu_sync-ed blocks can result in a panic
#14236 zio can deadlock during device removal
#14247 Micro-optimize fletcher4 calculations
#14261 FreeBSD: zfs_register_callbacks() must implement error check
correctly

Obtained from: OpenZFS
OpenZFS commit: 59493b63c18ea223857066218d6a58b67eb88159


# dbd5678d 16-Nov-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@2163cde45

Notable upstream pull request merges:
#13680 Add options to zfs redundant_metadata property
#13758 Allow mounting snapshots in .zfs/snapshot as a regular user
#13838 quota: disable quota check for ZVOL
#13839 quota: extend quota for dataset
#13973 Fix memory leaks in dmu_send()/dmu_send_obj()
#13977 Avoid unnecessary metaslab_check_free calling
#13978 PAM: Fix unchecked return value from zfs_key_config_load()
#13979 Handle possible null pointers from malloc/strdup/strndup()
#13997 zstream: allow decompress to fix metadata for uncompressed
records
#13998 zvol_wait logic may terminate prematurely
#14001 FreeBSD: Fix a pair of bugs in zfs_fhtovp()
#14003 Stop ganging due to past vdev write errors
#14039 Optimize microzaps
#14050 Fix draid2+2s metadata error on simultaneous 2 drive failures
#14062 zed: Avoid core dump if wholedisk property does not exist
#14077 Propagate extent_bytes change to autotrim thread
#14079 FreeBSD: vn_flush_cached_data: observe vnode locking contract
#14093 Fix ARC target collapse when zfs_arc_meta_limit_percent=100
#14106 Add ability to recompress send streams with new compression
algorithm
#14119 Deny receiving into encrypted datasets if the keys are not
loaded
#14120 Fix arc_p aggressive increase
#14129 zed: Prevent special vdev to be replaced by hot spare
#14133 Expose zfs_vdev_open_timeout_ms as a tunable
#14135 FreeBSD: Fix out of bounds read in zfs_ioctl_ozfs_to_legacy()
#14152 Adds the `-p` option to `zfs holds`
#14161 Handle and detect #13709's unlock regression

Obtained from: OpenZFS
OpenZFS commit: 2163cde450d0898b5f7bac16afb4e238485411ff


# be181ee2 04-Oct-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@d62bafee9

Notable upstream pull request merges:
#13857 Enforce "-F" flag on resuming recv of full/newfs on existing dataset
#13928 Revert "Reduce dbuf_find() lock contention"
#13928 Dynamically size dbuf hash mutex array
#13930 zpool: Don't print "repairing" on force faulted drives
#13938 Bring per_txg_dirty_frees_percent back to 30
#13939 Fix panic in dsl_process_sub_livelist for EINTR
#13954 Fix bad free in skein code
#13967 Fix potential NULL pointer dereference in dsl_dataset_promote_check()

Obtained from: OpenZFS
OpenZFS commit: d62bafee9fc38f8b9653c531e1861e83dcba4618


# 271171e0 13-Aug-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@b3d0568cf

Notable upstream pull request merges:
#9372 Implement a new type of zfs receive: corrective receive (-c)
#13635 Add snapshots_changed as property
#13636 Add support for per dataset zil stats and use wmsum counters
#13643 Fix scrub resume from newly created hole
#13670 Fix memory allocation for the checksum benchmark
#13695 Skip checksum benchmarks on systems with slow cpu
#13711 zpool: fix redundancy check after vdev removal

Obtained from: OpenZFS
OpenZFS commit: b3d0568cfd65458c92f7ab3d7bb709087992628e


# a0b956f5 07-Jul-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@cb01da680

Notable upstream pull request merges:
#12438 Avoid panic with recordsize > 128k, raw sending and no large_blocks
#13015 Fix dnode byteswapping
#13256 Add a "zstream decompress" subcommand
#13555 Scrub mirror children without BPs
#13576 Several sorted scrub optimizations
#13579 Fix and disable blocks statistics during scrub
#13582 Several B-tree optimizations
#13591 Avoid two 64-bit divisions per scanned block
#13606 Avoid memory copies during mirror scrub
#13613 Avoid memory copy when verifying raidz/draid parity

Obtained from: OpenZFS
OpenZFS commit: cb01da68057dcb9e612e8d2e97d058c46c3574af


# 1f1e2261 23-Jun-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@deb121309

Notable upstream pull request merges:
#12918 Introduce BLAKE3 checksums as an OpenZFS feature
#13553 Reduce ZIO io_lock contention on sorted scrub
#13537 Improve sorted scan memory accounting
#13540 AVL: Remove obsolete branching optimizations
#13563 FreeBSD: Improve crypto_dispatch() handling

Obtained from: OpenZFS
OpenZFS commit: deb1213098e2dc10e6eee5e5c57bb40584e096a6


# da5137ab 28-Mar-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bc3f12bfa (master) into main

Notable upstream pull request merges:
#12083 libzfs: FreeBSD doesn't resize partitions for you
#13106 add physical device size to SIZE column in 'zpool list -v'
#13158 Allow zfs send to exclude datasets
#13190 module: zfs: zio_inject: zio_match_handler: don't << -1
#13219 FreeBSD: add missing replay check to an assert in zfs_xvattr_set
#13220 module: freebsd: avoid a taking a destroyed lock in zfs_zevent bits
#13221 Fix ACL checks for NFS kernel server

Obtained from: OpenZFS
OpenZFS commit: bc3f12bfac152a0c28951cec92340ba14f9ccee9


# e92ffd9b 22-Jan-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@17b2ae0b2 (master) into main

Notable upstream pull request merges:
#12766 Fix error propagation from lzc_send_redacted
#12805 Updated the lz4 decompressor
#12851 FreeBSD: Provide correct file generation number
#12857 Verify dRAID empty sectors
#12874 FreeBSD: Update argument types for VOP_READDIR
#12896 Reduce number of arc_prune threads
#12934 FreeBSD: Fix zvol_*_open() locking
#12947 lz4: Cherrypick fix for CVE-2021-3520
#12961 FreeBSD: Fix leaked strings in libspl mnttab
#12964 Fix handling of errors from dmu_write_uio_dbuf() on FreeBSD
#12981 Introduce a flag to skip comparing the local mac when raw sending
#12985 Avoid memory allocations in the ARC eviction thread

Obtained from: OpenZFS
OpenZFS commit: 17b2ae0b24d487fdda2ef1098ec26fa7f79a61f6


# 681ce946 16-Dec-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f291fa658 (master) into main

Notable upstream pull request merges:
#11711 Vdev Properties Feature
#12717 VOP_RENAME fixes for FreeBSD
#12746 Enable strict hole reporting by default
#12770 ZFS send/recv with ashift 9->12 leads to data corruption
#12828 FreeBSD: Add vop_standard_writecount_nomsyn
#12828 zfs: Fix a deadlock between page busy and the teardown lock
#12828 FreeBSD: Catch up with more VFS changes

Obtained from: OpenZFS
OpenZFS commit: f291fa658efd146540b03ce386133632bde237bf


# 1f88aa09 07-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f3678d70f (master) into main

Notable upstream pull request merges:
#12339 Read past end of argv array in zpool_do_import()
#12365 Fixes in persistent L2ARC
#12383 Fixes for KMSAN reports
#12425 Avoid small buffer copying on write
#12428 Fix unfortunate NULL in spa_update_dspace
#12446 Allow disabling of unmapped I/O on FreeBSD

Obtained from: OpenZFS
OpenZFS commit: f3678d70ff8f98d67caf377ec0326c9a6c7bcf29


# 3f9d360c 22-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@14b43fbd9 (master) into main

Notable upstream pull request merges:
#12271 Tinker with slop space accounting with dedup
#12279 Fix ARC ghost states eviction accounting
#12284 Add Module Parameter Regarding Log Size Limit
#12300 Introduce dsl_dir_diduse_transfer_space()
#12314 Optimize allocation throttling
#12348 Minor ARC optimizations
#12350 Detect HAVE_LARGE_STACKS at compile time
#12356 Use SET_ERROR for more errors in FreeBSD vnops
#12375 FreeBSD: Ignore make_dev_s() errors
#12378 FreeBSD: Switch from MAXPHYS to maxphys on FreeBSD 13+

Obtained from: OpenZFS
OpenZFS commit: 14b43fbd9c13d802409ed886bb6b66fd528fb209


# 7cd22ac4 07-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bdd11cbb9 (master) into main

Notable upstream pull request merges:
#12274 Optimize txg_kick() process
#12281 Move gethrtime() calls out of vdev queue lock
#12287 Remove refcount from spa_config_*(
#12289 Compact dbuf/buf hashes and lock arrays
#12290 Remove avl_size field from struct avl_tree
#12294 Upstream: dmu_zfetch_stream_fini leaks refcount
#12295 Fix abd leak, kmem_free correct size of abd_t
#12328 FreeBSD: Hardcode abd_chunk_size to PAGE_SIZE

Obtained from: OpenZFS
OpenZFS commit: bdd11cbb90a2afa54fd00935ac0d34b4ddf2515c


# 33b8c039 25-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@5e2c8338b (master) into main

Notable upstream pull request merges:
#12183 Optimize small random numbers generation
#12227 Revert Consolidate arc_buf allocation checks
#12266 Fix flag copying in resume case
#12273 zfs_metaslab_mem_limit should be 25 instead of 75
#12276 Update cache file when setting compatibility property
#12280 Help compiller optimize out abd_verify()
#12282 FreeBSD: fix compilation of FreeBSD world after 29274c9f6

Obtained from: OpenZFS
OpenZFS commit: 5e2c8338bf17d31b44eb1dbbb3c9b6a0f64e96ee


# 9db44a8e 13-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9305ff2ed

Notable upstream pull request merges:
#11153 Scalable teardown lock for FreeBSD
#11651 Don't bomb out when using keylocation=file://
#11667 zvol: call zil_replaying() during replay
#11683 abd_get_offset_struct() may allocate new abd
#11693 Intentionally allow ZFS_READONLY in zfs_write
#11716 zpool import cachefile improvements
#11720 FreeBSD: Clean up zfsdev_close to match Linux
#11730 FreeBSD: bring back possibility to rewind the
checkpoint from bootloader

Obtained from: OpenZFS
MFC after: 2 weeks


# caed7b1c 02-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-bedbc13da

Notable upstream commits:
8e43fa12c Fix vdev_rebuild_thread deadlock
03ef8f09e Add missing checks for unsupported features
2e160dee9 Fix assert in FreeBSD-specific dmu_read_pages
bedbc13da Cancel TRIM / initialize on FAULTED non-writeable vdevs

MFC after: 1 week
Obtained from: OpenZFS


# 184c1b94 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-436ab35a5

- speed up writing to ZFS pools without ZIL devices (aa755b3)
- speed up importing ZFS pools (2d8f72d, a0e0199, cf0977a)
...

MFC after: 2 weeks
Reviewed by: mjg (partial)
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D28677


# 7877fdeb 07-Jan-2021 Matt Macy <mmacy@FreeBSD.org>

OpenZFS merge main-gf11b09

- add dRAID support
- fix duplicate close handling
- fix memory leak in prefetch
- fix problem with SIMD benchmarking on FreeBSD boot
...

# c40487d4 01-Oct-2020 Matt Macy <mmacy@FreeBSD.org>

OpenZFS: MFV 2.0-rc3-gfc5966

- Annotate FreeBSD sysctls with CTLFLAG_MPSAFE
- Reduce stack usage of Lua
- Don't save user FPU context in kernel threads
- Add support for procfs_list
- Code cleanup in zio_crypt
- Add DB_RF_NOPREFETCH to dbuf_read()s in dnode.c
- Drop references when skipping dmu_send due to EXDEV
- Eliminate gratuitous bzeroing in dbuf_stats_hash_table_data
- Fix legacy compat for platform IOCs


# eda14cbc 24-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

Initial import from vendor-sys branch of openzfs


# 0a97523d 30-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@009d3288d

Notable upstream pull request merges:
#14654 Pack our DDT ZAPs a bit denser
#14979 Again fix race between zil_commit() and zil_suspend()
#14985 Some ZIO micro-optimizations
#15000 Fix remount when setting multiple properties
#15004 ddt_addref: remove unnecessary phys fill when refcount is 0
#15007 Do not report bytes skipped by scan as issued
#15023 Enable tuning of ZVOL open timeout value

Obtained from: OpenZFS
OpenZFS commit: 009d3288dea524c7ad373b04b65bee8bb6f0bfea
OpenZFS tag: zfs-2.2.0-rc1


# 7b5e6873 28-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@a9d6b0690

Notable upstream pull request merges:
#14925 Another set of vdev queue optimizations
#14964 Use big transactions for small recordsize writes
#14999 ZIL: Fix another use-after-free

Obtained from: OpenZFS
OpenZFS commit: a9d6b0690b1863f39a7efce08b1227f2e9e26abb


# 4e8d558c 10-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@feff9dfed

Notable upstream pull request merges:
#14833 Update compatibility.d files
#14841 ZIL: Reduce scope of per-dataset zl_issuer_lock
#14863 zil: Add some more statistics
#14866 btree: Implement faster binary search algorithm
#14894 Fix inconsistent definition of zfs_scrub_error_blocks_per_txg
#14892 Fix concurrent resilvers initiated at same time
#14903 Fix NULL pointer dereference when doing concurrent 'send' operations
#14910 ZIL: Allow to replay blocks of any size
#14939 Fix the L2ARC write size calculating logic
#14934 Introduce zfs_refcount_(add|remove)_few()
#14946 Improve l2arc reporting in arc_summary
#14953 Finally drop long disabled vdev cache
#14954 Fix the L2ARC write size calculating logic (2)
#14955 Use list_remove_head() where possible
#14959 ZIL: Fix race introduced by f63811f0721

Obtained from: OpenZFS
OpenZFS commit: feff9dfed3df1bbae5dd74959a6ad87d11f27ffb


# c0a83fe0 23-May-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@ad0a55461

Notable upstream pull request merges:
#12355 Teach zpool scrub to scrub only blocks in error log
#14811 Refine special_small_blocks property validation
#14854 zil: Some micro-optimizations
#14855 zil: Free lwb_buf after write completion
#14860 Fixes for issues identified by recent Coverity defect reports
#14861 Probe vdevs before marking removed
#14873 Add the ability to uninitialize a zpool
#14875 Hold db_mtx when updating db_state

Obtained from: OpenZFS
OpenZFS commit: ad0a554614b096698d9969340c4c593690042d5b


# d411c1d6 02-May-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@d96e29576

Notable upstream pull request merges:

#11680 Add support for zpool user properties
#14145 Storage device expansion "silently" fails on degraded vdev
#14405 Create zap for root vdev
#14659 Allow MMP to bypass waiting for other threads
#14674 Miscellaneous FreBSD compilation bugfixes
#14692 Fix some signedness issues in arc_evict()
#14702 Fix typo in check_clones()
#14715 module: small fixes for FreeBSD/aarch64
#14716 Trim needless zeroes from checksum events
#14719 vdev: expose zfs_vdev_max_ms_shift as a module parameter
#14722 Fix "Detach spare vdev in case if resilvering does not happen"
#14723 freebsd clone range fixes
#14728 Fix BLAKE3 aarch64 assembly for FreeBSD and macOS
#14735 Fix in check_filesystem()
#14739 Fix data corruption when cloning embedded blocks
#14758 Fix VERIFY(!zil_replaying(zilog, tx)) panic
#14761 Revert "ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced()"
#14774 FreeBSD .zfs fixups
#14776 FreeBSD: make zfs_vfs_held() definition consistent with declaration
#14779 powerpc64: Support ELFv2 asm on Big Endian
#14788 FreeBSD: add missing vop_fplookup assignments
#14789 PAM: support the authentication facility
#14790 Revert "Fix data race between zil_commit() and zil_suspend()"
#14795 Fix positive ABD size assertion in abd_verify()
#14798 Mark TX_COMMIT transaction with TXG_NOTHROTTLE
#14804 Correct ABD size for split block ZIOs
#14806 Use correct block pointer in block cloning case.
#14808 blake3: fix up bogus checksums in face of cpu migration

Obtained from: OpenZFS
OpenZFS commit: d96e29576c89e6e547cb82b477651d2b85ea0fed


# 2a58b312 03-Apr-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@431083f75

Notable upstream pull request merges:
#12194 Fix short-lived txg caused by autotrim
#13368 ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced()
#13392 Implementation of block cloning for ZFS
#13741 SHA2 reworking and API for iterating over multiple implementations
#14282 Sync thread should avoid holding the spa config write lock
when possible
#14283 txg_sync should handle write errors in ZIL
#14359 More adaptive ARC eviction
#14469 Fix NULL pointer dereference in zio_ready()
#14479 zfs redact fails when dnodesize=auto
#14496 improve error message of zfs redact
#14500 Skip memory allocation when compressing holes
#14501 FreeBSD: don't verify recycled vnode for zfs control directory
#14502 partially revert PR 14304 (eee9362a7)
#14509 Fix per-jail zfs.mount_snapshot setting
#14514 Fix data race between zil_commit() and zil_suspend()
#14516 System-wide speculative prefetch limit
#14517 Use rw_tryupgrade() in dmu_bonus_hold_by_dnode()
#14519 Do not hold spa_config in ZIL while blocked on IO
#14523 Move dmu_buf_rele() after dsl_dataset_sync_done()
#14524 Ignore too large stack in case of dsl_deadlist_merge
#14526 Use .section .rodata instead of .rodata on FreeBSD
#14528 ICP: AES-GCM: Refactor gcm_clear_ctx()
#14529 ICP: AES-GCM: Unify gcm_init_ctx() and gmac_init_ctx()
#14532 Handle unexpected errors in zil_lwb_commit() without ASSERT()
#14544 icp: Prevent compilers from optimizing away memset()
in gcm_clear_ctx()
#14546 Revert zfeature_active() to static
#14556 Remove bad kmem_free() oversight from previous zfsdev_state_list
patch
#14563 Optimize the is_l2cacheable functions
#14565 FreeBSD: zfs_znode_alloc: lock the vnode earlier
#14566 FreeBSD: fix false assert in cache_vop_rmdir when replaying ZIL
#14567 spl: Add cmn_err_once() to log a message only on the first call
#14568 Fix incremental receive silently failing for recursive sends
#14569 Restore ASMABI and other Unify work
#14576 Fix detection of IBM Power8 machines (ISA 2.07)
#14577 Better handling for future crypto parameters
#14600 zcommon: Refactor FPU state handling in fletcher4
#14603 Fix prefetching of indirect blocks while destroying
#14633 Fixes in persistent error log
#14639 FreeBSD: Remove extra arc_reduce_target_size() call
#14641 Additional limits on hole reporting
#14649 Drop lying to the compiler in the fletcher4 code
#14652 panic loop when removing slog device
#14653 Update vdev state for spare vdev
#14655 Fix cloning into already dirty dbufs
#14678 Revert "Do not hold spa_config in ZIL while blocked on IO"

Obtained from: OpenZFS
OpenZFS commit: 431083f75bdd3efaee992bdd672625ec7240d252


# c9539b89 16-Feb-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@57cfae4a2 (master)

Notable upstream pull request merges:
#13816 Fix a race condition in dsl_dataset_sync() when
activating features
#14402 Prefetch on deadlists merge
#14410 Improve resilver ETAs
#14428 Resilver performance tuning
#14439 Resolve WS-2021-0184 vulnerability in zstd
#14440 EIO caused by encryption + recursive gang
#14448 Fix console progress reporting for recursive send
#14454 Improve arc_read() error reporting
#14460 Restore FreeBSD to use .rodata
#14474 Reduce need for contiguous memory for ioctls

Obtained from: OpenZFS
OpenZFS commit: 57cfae4a2f04aaff10c45b3f7975e0fe3ef3e8b8


# bb2d13b6 07-Dec-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@59493b63c (master)

Notable upstream pull request merges:
#13782 Fix setting the large_block feature after receiving a snapshot
#14157 FreeBSD: stop using buffer cache-only routines on sync
#14172 zed: post a udev change event from spa_vdev_attach()
#14181 zed: unclean disk attachment faults the vdev
#14190 Bump checksum error counter before reporting to ZED
#14196 Remove atomics from zh_refcount
#14197 Don't leak packed recieved proprties
#14198 Switch dnode stats to wmsums
#14199 Remove few pointer dereferences in dbuf_read()
#14200 Micro-optimize zrl_remove()
#14204 Lua: Fix bad bitshift in lua_strx2number()
#14212 Zstd fixes
#14218 Avoid a null pointer dereference in zfs_mount() on FreeBSD
#14235 nopwrites on dmu_sync-ed blocks can result in a panic
#14236 zio can deadlock during device removal
#14247 Micro-optimize fletcher4 calculations
#14261 FreeBSD: zfs_register_callbacks() must implement error check
correctly

Obtained from: OpenZFS
OpenZFS commit: 59493b63c18ea223857066218d6a58b67eb88159


# dbd5678d 16-Nov-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@2163cde45

Notable upstream pull request merges:
#13680 Add options to zfs redundant_metadata property
#13758 Allow mounting snapshots in .zfs/snapshot as a regular user
#13838 quota: disable quota check for ZVOL
#13839 quota: extend quota for dataset
#13973 Fix memory leaks in dmu_send()/dmu_send_obj()
#13977 Avoid unnecessary metaslab_check_free calling
#13978 PAM: Fix unchecked return value from zfs_key_config_load()
#13979 Handle possible null pointers from malloc/strdup/strndup()
#13997 zstream: allow decompress to fix metadata for uncompressed
records
#13998 zvol_wait logic may terminate prematurely
#14001 FreeBSD: Fix a pair of bugs in zfs_fhtovp()
#14003 Stop ganging due to past vdev write errors
#14039 Optimize microzaps
#14050 Fix draid2+2s metadata error on simultaneous 2 drive failures
#14062 zed: Avoid core dump if wholedisk property does not exist
#14077 Propagate extent_bytes change to autotrim thread
#14079 FreeBSD: vn_flush_cached_data: observe vnode locking contract
#14093 Fix ARC target collapse when zfs_arc_meta_limit_percent=100
#14106 Add ability to recompress send streams with new compression
algorithm
#14119 Deny receiving into encrypted datasets if the keys are not
loaded
#14120 Fix arc_p aggressive increase
#14129 zed: Prevent special vdev to be replaced by hot spare
#14133 Expose zfs_vdev_open_timeout_ms as a tunable
#14135 FreeBSD: Fix out of bounds read in zfs_ioctl_ozfs_to_legacy()
#14152 Adds the `-p` option to `zfs holds`
#14161 Handle and detect #13709's unlock regression

Obtained from: OpenZFS
OpenZFS commit: 2163cde450d0898b5f7bac16afb4e238485411ff


# be181ee2 04-Oct-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@d62bafee9

Notable upstream pull request merges:
#13857 Enforce "-F" flag on resuming recv of full/newfs on existing dataset
#13928 Revert "Reduce dbuf_find() lock contention"
#13928 Dynamically size dbuf hash mutex array
#13930 zpool: Don't print "repairing" on force faulted drives
#13938 Bring per_txg_dirty_frees_percent back to 30
#13939 Fix panic in dsl_process_sub_livelist for EINTR
#13954 Fix bad free in skein code
#13967 Fix potential NULL pointer dereference in dsl_dataset_promote_check()

Obtained from: OpenZFS
OpenZFS commit: d62bafee9fc38f8b9653c531e1861e83dcba4618


# 271171e0 13-Aug-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@b3d0568cf

Notable upstream pull request merges:
#9372 Implement a new type of zfs receive: corrective receive (-c)
#13635 Add snapshots_changed as property
#13636 Add support for per dataset zil stats and use wmsum counters
#13643 Fix scrub resume from newly created hole
#13670 Fix memory allocation for the checksum benchmark
#13695 Skip checksum benchmarks on systems with slow cpu
#13711 zpool: fix redundancy check after vdev removal

Obtained from: OpenZFS
OpenZFS commit: b3d0568cfd65458c92f7ab3d7bb709087992628e


# a0b956f5 07-Jul-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@cb01da680

Notable upstream pull request merges:
#12438 Avoid panic with recordsize > 128k, raw sending and no large_blocks
#13015 Fix dnode byteswapping
#13256 Add a "zstream decompress" subcommand
#13555 Scrub mirror children without BPs
#13576 Several sorted scrub optimizations
#13579 Fix and disable blocks statistics during scrub
#13582 Several B-tree optimizations
#13591 Avoid two 64-bit divisions per scanned block
#13606 Avoid memory copies during mirror scrub
#13613 Avoid memory copy when verifying raidz/draid parity

Obtained from: OpenZFS
OpenZFS commit: cb01da68057dcb9e612e8d2e97d058c46c3574af


# 1f1e2261 23-Jun-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@deb121309

Notable upstream pull request merges:
#12918 Introduce BLAKE3 checksums as an OpenZFS feature
#13553 Reduce ZIO io_lock contention on sorted scrub
#13537 Improve sorted scan memory accounting
#13540 AVL: Remove obsolete branching optimizations
#13563 FreeBSD: Improve crypto_dispatch() handling

Obtained from: OpenZFS
OpenZFS commit: deb1213098e2dc10e6eee5e5c57bb40584e096a6


# da5137ab 28-Mar-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bc3f12bfa (master) into main

Notable upstream pull request merges:
#12083 libzfs: FreeBSD doesn't resize partitions for you
#13106 add physical device size to SIZE column in 'zpool list -v'
#13158 Allow zfs send to exclude datasets
#13190 module: zfs: zio_inject: zio_match_handler: don't << -1
#13219 FreeBSD: add missing replay check to an assert in zfs_xvattr_set
#13220 module: freebsd: avoid a taking a destroyed lock in zfs_zevent bits
#13221 Fix ACL checks for NFS kernel server

Obtained from: OpenZFS
OpenZFS commit: bc3f12bfac152a0c28951cec92340ba14f9ccee9


# e92ffd9b 22-Jan-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@17b2ae0b2 (master) into main

Notable upstream pull request merges:
#12766 Fix error propagation from lzc_send_redacted
#12805 Updated the lz4 decompressor
#12851 FreeBSD: Provide correct file generation number
#12857 Verify dRAID empty sectors
#12874 FreeBSD: Update argument types for VOP_READDIR
#12896 Reduce number of arc_prune threads
#12934 FreeBSD: Fix zvol_*_open() locking
#12947 lz4: Cherrypick fix for CVE-2021-3520
#12961 FreeBSD: Fix leaked strings in libspl mnttab
#12964 Fix handling of errors from dmu_write_uio_dbuf() on FreeBSD
#12981 Introduce a flag to skip comparing the local mac when raw sending
#12985 Avoid memory allocations in the ARC eviction thread

Obtained from: OpenZFS
OpenZFS commit: 17b2ae0b24d487fdda2ef1098ec26fa7f79a61f6


# 681ce946 16-Dec-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f291fa658 (master) into main

Notable upstream pull request merges:
#11711 Vdev Properties Feature
#12717 VOP_RENAME fixes for FreeBSD
#12746 Enable strict hole reporting by default
#12770 ZFS send/recv with ashift 9->12 leads to data corruption
#12828 FreeBSD: Add vop_standard_writecount_nomsyn
#12828 zfs: Fix a deadlock between page busy and the teardown lock
#12828 FreeBSD: Catch up with more VFS changes

Obtained from: OpenZFS
OpenZFS commit: f291fa658efd146540b03ce386133632bde237bf


# 1f88aa09 07-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f3678d70f (master) into main

Notable upstream pull request merges:
#12339 Read past end of argv array in zpool_do_import()
#12365 Fixes in persistent L2ARC
#12383 Fixes for KMSAN reports
#12425 Avoid small buffer copying on write
#12428 Fix unfortunate NULL in spa_update_dspace
#12446 Allow disabling of unmapped I/O on FreeBSD

Obtained from: OpenZFS
OpenZFS commit: f3678d70ff8f98d67caf377ec0326c9a6c7bcf29


# 3f9d360c 22-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@14b43fbd9 (master) into main

Notable upstream pull request merges:
#12271 Tinker with slop space accounting with dedup
#12279 Fix ARC ghost states eviction accounting
#12284 Add Module Parameter Regarding Log Size Limit
#12300 Introduce dsl_dir_diduse_transfer_space()
#12314 Optimize allocation throttling
#12348 Minor ARC optimizations
#12350 Detect HAVE_LARGE_STACKS at compile time
#12356 Use SET_ERROR for more errors in FreeBSD vnops
#12375 FreeBSD: Ignore make_dev_s() errors
#12378 FreeBSD: Switch from MAXPHYS to maxphys on FreeBSD 13+

Obtained from: OpenZFS
OpenZFS commit: 14b43fbd9c13d802409ed886bb6b66fd528fb209


# 7cd22ac4 07-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bdd11cbb9 (master) into main

Notable upstream pull request merges:
#12274 Optimize txg_kick() process
#12281 Move gethrtime() calls out of vdev queue lock
#12287 Remove refcount from spa_config_*(
#12289 Compact dbuf/buf hashes and lock arrays
#12290 Remove avl_size field from struct avl_tree
#12294 Upstream: dmu_zfetch_stream_fini leaks refcount
#12295 Fix abd leak, kmem_free correct size of abd_t
#12328 FreeBSD: Hardcode abd_chunk_size to PAGE_SIZE

Obtained from: OpenZFS
OpenZFS commit: bdd11cbb90a2afa54fd00935ac0d34b4ddf2515c


# 33b8c039 25-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@5e2c8338b (master) into main

Notable upstream pull request merges:
#12183 Optimize small random numbers generation
#12227 Revert Consolidate arc_buf allocation checks
#12266 Fix flag copying in resume case
#12273 zfs_metaslab_mem_limit should be 25 instead of 75
#12276 Update cache file when setting compatibility property
#12280 Help compiller optimize out abd_verify()
#12282 FreeBSD: fix compilation of FreeBSD world after 29274c9f6

Obtained from: OpenZFS
OpenZFS commit: 5e2c8338bf17d31b44eb1dbbb3c9b6a0f64e96ee


# 9db44a8e 13-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9305ff2ed

Notable upstream pull request merges:
#11153 Scalable teardown lock for FreeBSD
#11651 Don't bomb out when using keylocation=file://
#11667 zvol: call zil_replaying() during replay
#11683 abd_get_offset_struct() may allocate new abd
#11693 Intentionally allow ZFS_READONLY in zfs_write
#11716 zpool import cachefile improvements
#11720 FreeBSD: Clean up zfsdev_close to match Linux
#11730 FreeBSD: bring back possibility to rewind the
checkpoint from bootloader

Obtained from: OpenZFS
MFC after: 2 weeks


# caed7b1c 02-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-bedbc13da

Notable upstream commits:
8e43fa12c Fix vdev_rebuild_thread deadlock
03ef8f09e Add missing checks for unsupported features
2e160dee9 Fix assert in FreeBSD-specific dmu_read_pages
bedbc13da Cancel TRIM / initialize on FAULTED non-writeable vdevs

MFC after: 1 week
Obtained from: OpenZFS


# 184c1b94 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-436ab35a5

- speed up writing to ZFS pools without ZIL devices (aa755b3)
- speed up importing ZFS pools (2d8f72d, a0e0199, cf0977a)
...

MFC after: 2 weeks
Reviewed by: mjg (partial)
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D28677


# 7877fdeb 07-Jan-2021 Matt Macy <mmacy@FreeBSD.org>

OpenZFS merge main-gf11b09

- add dRAID support
- fix duplicate close handling
- fix memory leak in prefetch
- fix problem with SIMD benchmarking on FreeBSD boot
...

# c40487d4 01-Oct-2020 Matt Macy <mmacy@FreeBSD.org>

OpenZFS: MFV 2.0-rc3-gfc5966

- Annotate FreeBSD sysctls with CTLFLAG_MPSAFE
- Reduce stack usage of Lua
- Don't save user FPU context in kernel threads
- Add support for procfs_list
- Code cleanup in zio_crypt
- Add DB_RF_NOPREFETCH to dbuf_read()s in dnode.c
- Drop references when skipping dmu_send due to EXDEV
- Eliminate gratuitous bzeroing in dbuf_stats_hash_table_data
- Fix legacy compat for platform IOCs


# eda14cbc 24-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

Initial import from vendor-sys branch of openzfs


# 7b5e6873 28-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@a9d6b0690

Notable upstream pull request merges:
#14925 Another set of vdev queue optimizations
#14964 Use big transactions for small recordsize writes
#14999 ZIL: Fix another use-after-free

Obtained from: OpenZFS
OpenZFS commit: a9d6b0690b1863f39a7efce08b1227f2e9e26abb


# 4e8d558c 10-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@feff9dfed

Notable upstream pull request merges:
#14833 Update compatibility.d files
#14841 ZIL: Reduce scope of per-dataset zl_issuer_lock
#14863 zil: Add some more statistics
#14866 btree: Implement faster binary search algorithm
#14894 Fix inconsistent definition of zfs_scrub_error_blocks_per_txg
#14892 Fix concurrent resilvers initiated at same time
#14903 Fix NULL pointer dereference when doing concurrent 'send' operations
#14910 ZIL: Allow to replay blocks of any size
#14939 Fix the L2ARC write size calculating logic
#14934 Introduce zfs_refcount_(add|remove)_few()
#14946 Improve l2arc reporting in arc_summary
#14953 Finally drop long disabled vdev cache
#14954 Fix the L2ARC write size calculating logic (2)
#14955 Use list_remove_head() where possible
#14959 ZIL: Fix race introduced by f63811f0721

Obtained from: OpenZFS
OpenZFS commit: feff9dfed3df1bbae5dd74959a6ad87d11f27ffb


# c0a83fe0 23-May-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@ad0a55461

Notable upstream pull request merges:
#12355 Teach zpool scrub to scrub only blocks in error log
#14811 Refine special_small_blocks property validation
#14854 zil: Some micro-optimizations
#14855 zil: Free lwb_buf after write completion
#14860 Fixes for issues identified by recent Coverity defect reports
#14861 Probe vdevs before marking removed
#14873 Add the ability to uninitialize a zpool
#14875 Hold db_mtx when updating db_state

Obtained from: OpenZFS
OpenZFS commit: ad0a554614b096698d9969340c4c593690042d5b


# d411c1d6 02-May-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@d96e29576

Notable upstream pull request merges:

#11680 Add support for zpool user properties
#14145 Storage device expansion "silently" fails on degraded vdev
#14405 Create zap for root vdev
#14659 Allow MMP to bypass waiting for other threads
#14674 Miscellaneous FreBSD compilation bugfixes
#14692 Fix some signedness issues in arc_evict()
#14702 Fix typo in check_clones()
#14715 module: small fixes for FreeBSD/aarch64
#14716 Trim needless zeroes from checksum events
#14719 vdev: expose zfs_vdev_max_ms_shift as a module parameter
#14722 Fix "Detach spare vdev in case if resilvering does not happen"
#14723 freebsd clone range fixes
#14728 Fix BLAKE3 aarch64 assembly for FreeBSD and macOS
#14735 Fix in check_filesystem()
#14739 Fix data corruption when cloning embedded blocks
#14758 Fix VERIFY(!zil_replaying(zilog, tx)) panic
#14761 Revert "ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced()"
#14774 FreeBSD .zfs fixups
#14776 FreeBSD: make zfs_vfs_held() definition consistent with declaration
#14779 powerpc64: Support ELFv2 asm on Big Endian
#14788 FreeBSD: add missing vop_fplookup assignments
#14789 PAM: support the authentication facility
#14790 Revert "Fix data race between zil_commit() and zil_suspend()"
#14795 Fix positive ABD size assertion in abd_verify()
#14798 Mark TX_COMMIT transaction with TXG_NOTHROTTLE
#14804 Correct ABD size for split block ZIOs
#14806 Use correct block pointer in block cloning case.
#14808 blake3: fix up bogus checksums in face of cpu migration

Obtained from: OpenZFS
OpenZFS commit: d96e29576c89e6e547cb82b477651d2b85ea0fed


# 2a58b312 03-Apr-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@431083f75

Notable upstream pull request merges:
#12194 Fix short-lived txg caused by autotrim
#13368 ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced()
#13392 Implementation of block cloning for ZFS
#13741 SHA2 reworking and API for iterating over multiple implementations
#14282 Sync thread should avoid holding the spa config write lock
when possible
#14283 txg_sync should handle write errors in ZIL
#14359 More adaptive ARC eviction
#14469 Fix NULL pointer dereference in zio_ready()
#14479 zfs redact fails when dnodesize=auto
#14496 improve error message of zfs redact
#14500 Skip memory allocation when compressing holes
#14501 FreeBSD: don't verify recycled vnode for zfs control directory
#14502 partially revert PR 14304 (eee9362a7)
#14509 Fix per-jail zfs.mount_snapshot setting
#14514 Fix data race between zil_commit() and zil_suspend()
#14516 System-wide speculative prefetch limit
#14517 Use rw_tryupgrade() in dmu_bonus_hold_by_dnode()
#14519 Do not hold spa_config in ZIL while blocked on IO
#14523 Move dmu_buf_rele() after dsl_dataset_sync_done()
#14524 Ignore too large stack in case of dsl_deadlist_merge
#14526 Use .section .rodata instead of .rodata on FreeBSD
#14528 ICP: AES-GCM: Refactor gcm_clear_ctx()
#14529 ICP: AES-GCM: Unify gcm_init_ctx() and gmac_init_ctx()
#14532 Handle unexpected errors in zil_lwb_commit() without ASSERT()
#14544 icp: Prevent compilers from optimizing away memset()
in gcm_clear_ctx()
#14546 Revert zfeature_active() to static
#14556 Remove bad kmem_free() oversight from previous zfsdev_state_list
patch
#14563 Optimize the is_l2cacheable functions
#14565 FreeBSD: zfs_znode_alloc: lock the vnode earlier
#14566 FreeBSD: fix false assert in cache_vop_rmdir when replaying ZIL
#14567 spl: Add cmn_err_once() to log a message only on the first call
#14568 Fix incremental receive silently failing for recursive sends
#14569 Restore ASMABI and other Unify work
#14576 Fix detection of IBM Power8 machines (ISA 2.07)
#14577 Better handling for future crypto parameters
#14600 zcommon: Refactor FPU state handling in fletcher4
#14603 Fix prefetching of indirect blocks while destroying
#14633 Fixes in persistent error log
#14639 FreeBSD: Remove extra arc_reduce_target_size() call
#14641 Additional limits on hole reporting
#14649 Drop lying to the compiler in the fletcher4 code
#14652 panic loop when removing slog device
#14653 Update vdev state for spare vdev
#14655 Fix cloning into already dirty dbufs
#14678 Revert "Do not hold spa_config in ZIL while blocked on IO"

Obtained from: OpenZFS
OpenZFS commit: 431083f75bdd3efaee992bdd672625ec7240d252


# c9539b89 16-Feb-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@57cfae4a2 (master)

Notable upstream pull request merges:
#13816 Fix a race condition in dsl_dataset_sync() when
activating features
#14402 Prefetch on deadlists merge
#14410 Improve resilver ETAs
#14428 Resilver performance tuning
#14439 Resolve WS-2021-0184 vulnerability in zstd
#14440 EIO caused by encryption + recursive gang
#14448 Fix console progress reporting for recursive send
#14454 Improve arc_read() error reporting
#14460 Restore FreeBSD to use .rodata
#14474 Reduce need for contiguous memory for ioctls

Obtained from: OpenZFS
OpenZFS commit: 57cfae4a2f04aaff10c45b3f7975e0fe3ef3e8b8


# bb2d13b6 07-Dec-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@59493b63c (master)

Notable upstream pull request merges:
#13782 Fix setting the large_block feature after receiving a snapshot
#14157 FreeBSD: stop using buffer cache-only routines on sync
#14172 zed: post a udev change event from spa_vdev_attach()
#14181 zed: unclean disk attachment faults the vdev
#14190 Bump checksum error counter before reporting to ZED
#14196 Remove atomics from zh_refcount
#14197 Don't leak packed recieved proprties
#14198 Switch dnode stats to wmsums
#14199 Remove few pointer dereferences in dbuf_read()
#14200 Micro-optimize zrl_remove()
#14204 Lua: Fix bad bitshift in lua_strx2number()
#14212 Zstd fixes
#14218 Avoid a null pointer dereference in zfs_mount() on FreeBSD
#14235 nopwrites on dmu_sync-ed blocks can result in a panic
#14236 zio can deadlock during device removal
#14247 Micro-optimize fletcher4 calculations
#14261 FreeBSD: zfs_register_callbacks() must implement error check
correctly

Obtained from: OpenZFS
OpenZFS commit: 59493b63c18ea223857066218d6a58b67eb88159


# dbd5678d 16-Nov-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@2163cde45

Notable upstream pull request merges:
#13680 Add options to zfs redundant_metadata property
#13758 Allow mounting snapshots in .zfs/snapshot as a regular user
#13838 quota: disable quota check for ZVOL
#13839 quota: extend quota for dataset
#13973 Fix memory leaks in dmu_send()/dmu_send_obj()
#13977 Avoid unnecessary metaslab_check_free calling
#13978 PAM: Fix unchecked return value from zfs_key_config_load()
#13979 Handle possible null pointers from malloc/strdup/strndup()
#13997 zstream: allow decompress to fix metadata for uncompressed
records
#13998 zvol_wait logic may terminate prematurely
#14001 FreeBSD: Fix a pair of bugs in zfs_fhtovp()
#14003 Stop ganging due to past vdev write errors
#14039 Optimize microzaps
#14050 Fix draid2+2s metadata error on simultaneous 2 drive failures
#14062 zed: Avoid core dump if wholedisk property does not exist
#14077 Propagate extent_bytes change to autotrim thread
#14079 FreeBSD: vn_flush_cached_data: observe vnode locking contract
#14093 Fix ARC target collapse when zfs_arc_meta_limit_percent=100
#14106 Add ability to recompress send streams with new compression
algorithm
#14119 Deny receiving into encrypted datasets if the keys are not
loaded
#14120 Fix arc_p aggressive increase
#14129 zed: Prevent special vdev to be replaced by hot spare
#14133 Expose zfs_vdev_open_timeout_ms as a tunable
#14135 FreeBSD: Fix out of bounds read in zfs_ioctl_ozfs_to_legacy()
#14152 Adds the `-p` option to `zfs holds`
#14161 Handle and detect #13709's unlock regression

Obtained from: OpenZFS
OpenZFS commit: 2163cde450d0898b5f7bac16afb4e238485411ff


# be181ee2 04-Oct-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@d62bafee9

Notable upstream pull request merges:
#13857 Enforce "-F" flag on resuming recv of full/newfs on existing dataset
#13928 Revert "Reduce dbuf_find() lock contention"
#13928 Dynamically size dbuf hash mutex array
#13930 zpool: Don't print "repairing" on force faulted drives
#13938 Bring per_txg_dirty_frees_percent back to 30
#13939 Fix panic in dsl_process_sub_livelist for EINTR
#13954 Fix bad free in skein code
#13967 Fix potential NULL pointer dereference in dsl_dataset_promote_check()

Obtained from: OpenZFS
OpenZFS commit: d62bafee9fc38f8b9653c531e1861e83dcba4618


# 271171e0 13-Aug-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@b3d0568cf

Notable upstream pull request merges:
#9372 Implement a new type of zfs receive: corrective receive (-c)
#13635 Add snapshots_changed as property
#13636 Add support for per dataset zil stats and use wmsum counters
#13643 Fix scrub resume from newly created hole
#13670 Fix memory allocation for the checksum benchmark
#13695 Skip checksum benchmarks on systems with slow cpu
#13711 zpool: fix redundancy check after vdev removal

Obtained from: OpenZFS
OpenZFS commit: b3d0568cfd65458c92f7ab3d7bb709087992628e


# a0b956f5 07-Jul-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@cb01da680

Notable upstream pull request merges:
#12438 Avoid panic with recordsize > 128k, raw sending and no large_blocks
#13015 Fix dnode byteswapping
#13256 Add a "zstream decompress" subcommand
#13555 Scrub mirror children without BPs
#13576 Several sorted scrub optimizations
#13579 Fix and disable blocks statistics during scrub
#13582 Several B-tree optimizations
#13591 Avoid two 64-bit divisions per scanned block
#13606 Avoid memory copies during mirror scrub
#13613 Avoid memory copy when verifying raidz/draid parity

Obtained from: OpenZFS
OpenZFS commit: cb01da68057dcb9e612e8d2e97d058c46c3574af


# 1f1e2261 23-Jun-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@deb121309

Notable upstream pull request merges:
#12918 Introduce BLAKE3 checksums as an OpenZFS feature
#13553 Reduce ZIO io_lock contention on sorted scrub
#13537 Improve sorted scan memory accounting
#13540 AVL: Remove obsolete branching optimizations
#13563 FreeBSD: Improve crypto_dispatch() handling

Obtained from: OpenZFS
OpenZFS commit: deb1213098e2dc10e6eee5e5c57bb40584e096a6


# da5137ab 28-Mar-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bc3f12bfa (master) into main

Notable upstream pull request merges:
#12083 libzfs: FreeBSD doesn't resize partitions for you
#13106 add physical device size to SIZE column in 'zpool list -v'
#13158 Allow zfs send to exclude datasets
#13190 module: zfs: zio_inject: zio_match_handler: don't << -1
#13219 FreeBSD: add missing replay check to an assert in zfs_xvattr_set
#13220 module: freebsd: avoid a taking a destroyed lock in zfs_zevent bits
#13221 Fix ACL checks for NFS kernel server

Obtained from: OpenZFS
OpenZFS commit: bc3f12bfac152a0c28951cec92340ba14f9ccee9


# e92ffd9b 22-Jan-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@17b2ae0b2 (master) into main

Notable upstream pull request merges:
#12766 Fix error propagation from lzc_send_redacted
#12805 Updated the lz4 decompressor
#12851 FreeBSD: Provide correct file generation number
#12857 Verify dRAID empty sectors
#12874 FreeBSD: Update argument types for VOP_READDIR
#12896 Reduce number of arc_prune threads
#12934 FreeBSD: Fix zvol_*_open() locking
#12947 lz4: Cherrypick fix for CVE-2021-3520
#12961 FreeBSD: Fix leaked strings in libspl mnttab
#12964 Fix handling of errors from dmu_write_uio_dbuf() on FreeBSD
#12981 Introduce a flag to skip comparing the local mac when raw sending
#12985 Avoid memory allocations in the ARC eviction thread

Obtained from: OpenZFS
OpenZFS commit: 17b2ae0b24d487fdda2ef1098ec26fa7f79a61f6


# 681ce946 16-Dec-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f291fa658 (master) into main

Notable upstream pull request merges:
#11711 Vdev Properties Feature
#12717 VOP_RENAME fixes for FreeBSD
#12746 Enable strict hole reporting by default
#12770 ZFS send/recv with ashift 9->12 leads to data corruption
#12828 FreeBSD: Add vop_standard_writecount_nomsyn
#12828 zfs: Fix a deadlock between page busy and the teardown lock
#12828 FreeBSD: Catch up with more VFS changes

Obtained from: OpenZFS
OpenZFS commit: f291fa658efd146540b03ce386133632bde237bf


# 1f88aa09 07-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f3678d70f (master) into main

Notable upstream pull request merges:
#12339 Read past end of argv array in zpool_do_import()
#12365 Fixes in persistent L2ARC
#12383 Fixes for KMSAN reports
#12425 Avoid small buffer copying on write
#12428 Fix unfortunate NULL in spa_update_dspace
#12446 Allow disabling of unmapped I/O on FreeBSD

Obtained from: OpenZFS
OpenZFS commit: f3678d70ff8f98d67caf377ec0326c9a6c7bcf29


# 3f9d360c 22-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@14b43fbd9 (master) into main

Notable upstream pull request merges:
#12271 Tinker with slop space accounting with dedup
#12279 Fix ARC ghost states eviction accounting
#12284 Add Module Parameter Regarding Log Size Limit
#12300 Introduce dsl_dir_diduse_transfer_space()
#12314 Optimize allocation throttling
#12348 Minor ARC optimizations
#12350 Detect HAVE_LARGE_STACKS at compile time
#12356 Use SET_ERROR for more errors in FreeBSD vnops
#12375 FreeBSD: Ignore make_dev_s() errors
#12378 FreeBSD: Switch from MAXPHYS to maxphys on FreeBSD 13+

Obtained from: OpenZFS
OpenZFS commit: 14b43fbd9c13d802409ed886bb6b66fd528fb209


# 7cd22ac4 07-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bdd11cbb9 (master) into main

Notable upstream pull request merges:
#12274 Optimize txg_kick() process
#12281 Move gethrtime() calls out of vdev queue lock
#12287 Remove refcount from spa_config_*(
#12289 Compact dbuf/buf hashes and lock arrays
#12290 Remove avl_size field from struct avl_tree
#12294 Upstream: dmu_zfetch_stream_fini leaks refcount
#12295 Fix abd leak, kmem_free correct size of abd_t
#12328 FreeBSD: Hardcode abd_chunk_size to PAGE_SIZE

Obtained from: OpenZFS
OpenZFS commit: bdd11cbb90a2afa54fd00935ac0d34b4ddf2515c


# 33b8c039 25-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@5e2c8338b (master) into main

Notable upstream pull request merges:
#12183 Optimize small random numbers generation
#12227 Revert Consolidate arc_buf allocation checks
#12266 Fix flag copying in resume case
#12273 zfs_metaslab_mem_limit should be 25 instead of 75
#12276 Update cache file when setting compatibility property
#12280 Help compiller optimize out abd_verify()
#12282 FreeBSD: fix compilation of FreeBSD world after 29274c9f6

Obtained from: OpenZFS
OpenZFS commit: 5e2c8338bf17d31b44eb1dbbb3c9b6a0f64e96ee


# 9db44a8e 13-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9305ff2ed

Notable upstream pull request merges:
#11153 Scalable teardown lock for FreeBSD
#11651 Don't bomb out when using keylocation=file://
#11667 zvol: call zil_replaying() during replay
#11683 abd_get_offset_struct() may allocate new abd
#11693 Intentionally allow ZFS_READONLY in zfs_write
#11716 zpool import cachefile improvements
#11720 FreeBSD: Clean up zfsdev_close to match Linux
#11730 FreeBSD: bring back possibility to rewind the
checkpoint from bootloader

Obtained from: OpenZFS
MFC after: 2 weeks


# caed7b1c 02-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-bedbc13da

Notable upstream commits:
8e43fa12c Fix vdev_rebuild_thread deadlock
03ef8f09e Add missing checks for unsupported features
2e160dee9 Fix assert in FreeBSD-specific dmu_read_pages
bedbc13da Cancel TRIM / initialize on FAULTED non-writeable vdevs

MFC after: 1 week
Obtained from: OpenZFS


# 184c1b94 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-436ab35a5

- speed up writing to ZFS pools without ZIL devices (aa755b3)
- speed up importing ZFS pools (2d8f72d, a0e0199, cf0977a)
...

MFC after: 2 weeks
Reviewed by: mjg (partial)
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D28677


# 7877fdeb 07-Jan-2021 Matt Macy <mmacy@FreeBSD.org>

OpenZFS merge main-gf11b09

- add dRAID support
- fix duplicate close handling
- fix memory leak in prefetch
- fix problem with SIMD benchmarking on FreeBSD boot
...

# c40487d4 01-Oct-2020 Matt Macy <mmacy@FreeBSD.org>

OpenZFS: MFV 2.0-rc3-gfc5966

- Annotate FreeBSD sysctls with CTLFLAG_MPSAFE
- Reduce stack usage of Lua
- Don't save user FPU context in kernel threads
- Add support for procfs_list
- Code cleanup in zio_crypt
- Add DB_RF_NOPREFETCH to dbuf_read()s in dnode.c
- Drop references when skipping dmu_send due to EXDEV
- Eliminate gratuitous bzeroing in dbuf_stats_hash_table_data
- Fix legacy compat for platform IOCs


# eda14cbc 24-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

Initial import from vendor-sys branch of openzfs


# 2a58b312 03-Apr-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@431083f75

Notable upstream pull request merges:
#12194 Fix short-lived txg caused by autotrim
#13368 ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced()
#13392 Implementation of block cloning for ZFS
#13741 SHA2 reworking and API for iterating over multiple implementations
#14282 Sync thread should avoid holding the spa config write lock
when possible
#14283 txg_sync should handle write errors in ZIL
#14359 More adaptive ARC eviction
#14469 Fix NULL pointer dereference in zio_ready()
#14479 zfs redact fails when dnodesize=auto
#14496 improve error message of zfs redact
#14500 Skip memory allocation when compressing holes
#14501 FreeBSD: don't verify recycled vnode for zfs control directory
#14502 partially revert PR 14304 (eee9362a7)
#14509 Fix per-jail zfs.mount_snapshot setting
#14514 Fix data race between zil_commit() and zil_suspend()
#14516 System-wide speculative prefetch limit
#14517 Use rw_tryupgrade() in dmu_bonus_hold_by_dnode()
#14519 Do not hold spa_config in ZIL while blocked on IO
#14523 Move dmu_buf_rele() after dsl_dataset_sync_done()
#14524 Ignore too large stack in case of dsl_deadlist_merge
#14526 Use .section .rodata instead of .rodata on FreeBSD
#14528 ICP: AES-GCM: Refactor gcm_clear_ctx()
#14529 ICP: AES-GCM: Unify gcm_init_ctx() and gmac_init_ctx()
#14532 Handle unexpected errors in zil_lwb_commit() without ASSERT()
#14544 icp: Prevent compilers from optimizing away memset()
in gcm_clear_ctx()
#14546 Revert zfeature_active() to static
#14556 Remove bad kmem_free() oversight from previous zfsdev_state_list
patch
#14563 Optimize the is_l2cacheable functions
#14565 FreeBSD: zfs_znode_alloc: lock the vnode earlier
#14566 FreeBSD: fix false assert in cache_vop_rmdir when replaying ZIL
#14567 spl: Add cmn_err_once() to log a message only on the first call
#14568 Fix incremental receive silently failing for recursive sends
#14569 Restore ASMABI and other Unify work
#14576 Fix detection of IBM Power8 machines (ISA 2.07)
#14577 Better handling for future crypto parameters
#14600 zcommon: Refactor FPU state handling in fletcher4
#14603 Fix prefetching of indirect blocks while destroying
#14633 Fixes in persistent error log
#14639 FreeBSD: Remove extra arc_reduce_target_size() call
#14641 Additional limits on hole reporting
#14649 Drop lying to the compiler in the fletcher4 code
#14652 panic loop when removing slog device
#14653 Update vdev state for spare vdev
#14655 Fix cloning into already dirty dbufs
#14678 Revert "Do not hold spa_config in ZIL while blocked on IO"

Obtained from: OpenZFS
OpenZFS commit: 431083f75bdd3efaee992bdd672625ec7240d252


# c9539b89 16-Feb-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@57cfae4a2 (master)

Notable upstream pull request merges:
#13816 Fix a race condition in dsl_dataset_sync() when
activating features
#14402 Prefetch on deadlists merge
#14410 Improve resilver ETAs
#14428 Resilver performance tuning
#14439 Resolve WS-2021-0184 vulnerability in zstd
#14440 EIO caused by encryption + recursive gang
#14448 Fix console progress reporting for recursive send
#14454 Improve arc_read() error reporting
#14460 Restore FreeBSD to use .rodata
#14474 Reduce need for contiguous memory for ioctls

Obtained from: OpenZFS
OpenZFS commit: 57cfae4a2f04aaff10c45b3f7975e0fe3ef3e8b8


# bb2d13b6 07-Dec-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@59493b63c (master)

Notable upstream pull request merges:
#13782 Fix setting the large_block feature after receiving a snapshot
#14157 FreeBSD: stop using buffer cache-only routines on sync
#14172 zed: post a udev change event from spa_vdev_attach()
#14181 zed: unclean disk attachment faults the vdev
#14190 Bump checksum error counter before reporting to ZED
#14196 Remove atomics from zh_refcount
#14197 Don't leak packed recieved proprties
#14198 Switch dnode stats to wmsums
#14199 Remove few pointer dereferences in dbuf_read()
#14200 Micro-optimize zrl_remove()
#14204 Lua: Fix bad bitshift in lua_strx2number()
#14212 Zstd fixes
#14218 Avoid a null pointer dereference in zfs_mount() on FreeBSD
#14235 nopwrites on dmu_sync-ed blocks can result in a panic
#14236 zio can deadlock during device removal
#14247 Micro-optimize fletcher4 calculations
#14261 FreeBSD: zfs_register_callbacks() must implement error check
correctly

Obtained from: OpenZFS
OpenZFS commit: 59493b63c18ea223857066218d6a58b67eb88159


# dbd5678d 16-Nov-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@2163cde45

Notable upstream pull request merges:
#13680 Add options to zfs redundant_metadata property
#13758 Allow mounting snapshots in .zfs/snapshot as a regular user
#13838 quota: disable quota check for ZVOL
#13839 quota: extend quota for dataset
#13973 Fix memory leaks in dmu_send()/dmu_send_obj()
#13977 Avoid unnecessary metaslab_check_free calling
#13978 PAM: Fix unchecked return value from zfs_key_config_load()
#13979 Handle possible null pointers from malloc/strdup/strndup()
#13997 zstream: allow decompress to fix metadata for uncompressed
records
#13998 zvol_wait logic may terminate prematurely
#14001 FreeBSD: Fix a pair of bugs in zfs_fhtovp()
#14003 Stop ganging due to past vdev write errors
#14039 Optimize microzaps
#14050 Fix draid2+2s metadata error on simultaneous 2 drive failures
#14062 zed: Avoid core dump if wholedisk property does not exist
#14077 Propagate extent_bytes change to autotrim thread
#14079 FreeBSD: vn_flush_cached_data: observe vnode locking contract
#14093 Fix ARC target collapse when zfs_arc_meta_limit_percent=100
#14106 Add ability to recompress send streams with new compression
algorithm
#14119 Deny receiving into encrypted datasets if the keys are not
loaded
#14120 Fix arc_p aggressive increase
#14129 zed: Prevent special vdev to be replaced by hot spare
#14133 Expose zfs_vdev_open_timeout_ms as a tunable
#14135 FreeBSD: Fix out of bounds read in zfs_ioctl_ozfs_to_legacy()
#14152 Adds the `-p` option to `zfs holds`
#14161 Handle and detect #13709's unlock regression

Obtained from: OpenZFS
OpenZFS commit: 2163cde450d0898b5f7bac16afb4e238485411ff


# be181ee2 04-Oct-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@d62bafee9

Notable upstream pull request merges:
#13857 Enforce "-F" flag on resuming recv of full/newfs on existing dataset
#13928 Revert "Reduce dbuf_find() lock contention"
#13928 Dynamically size dbuf hash mutex array
#13930 zpool: Don't print "repairing" on force faulted drives
#13938 Bring per_txg_dirty_frees_percent back to 30
#13939 Fix panic in dsl_process_sub_livelist for EINTR
#13954 Fix bad free in skein code
#13967 Fix potential NULL pointer dereference in dsl_dataset_promote_check()

Obtained from: OpenZFS
OpenZFS commit: d62bafee9fc38f8b9653c531e1861e83dcba4618


# 271171e0 13-Aug-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@b3d0568cf

Notable upstream pull request merges:
#9372 Implement a new type of zfs receive: corrective receive (-c)
#13635 Add snapshots_changed as property
#13636 Add support for per dataset zil stats and use wmsum counters
#13643 Fix scrub resume from newly created hole
#13670 Fix memory allocation for the checksum benchmark
#13695 Skip checksum benchmarks on systems with slow cpu
#13711 zpool: fix redundancy check after vdev removal

Obtained from: OpenZFS
OpenZFS commit: b3d0568cfd65458c92f7ab3d7bb709087992628e


# a0b956f5 07-Jul-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@cb01da680

Notable upstream pull request merges:
#12438 Avoid panic with recordsize > 128k, raw sending and no large_blocks
#13015 Fix dnode byteswapping
#13256 Add a "zstream decompress" subcommand
#13555 Scrub mirror children without BPs
#13576 Several sorted scrub optimizations
#13579 Fix and disable blocks statistics during scrub
#13582 Several B-tree optimizations
#13591 Avoid two 64-bit divisions per scanned block
#13606 Avoid memory copies during mirror scrub
#13613 Avoid memory copy when verifying raidz/draid parity

Obtained from: OpenZFS
OpenZFS commit: cb01da68057dcb9e612e8d2e97d058c46c3574af


# 1f1e2261 23-Jun-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@deb121309

Notable upstream pull request merges:
#12918 Introduce BLAKE3 checksums as an OpenZFS feature
#13553 Reduce ZIO io_lock contention on sorted scrub
#13537 Improve sorted scan memory accounting
#13540 AVL: Remove obsolete branching optimizations
#13563 FreeBSD: Improve crypto_dispatch() handling

Obtained from: OpenZFS
OpenZFS commit: deb1213098e2dc10e6eee5e5c57bb40584e096a6


# da5137ab 28-Mar-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bc3f12bfa (master) into main

Notable upstream pull request merges:
#12083 libzfs: FreeBSD doesn't resize partitions for you
#13106 add physical device size to SIZE column in 'zpool list -v'
#13158 Allow zfs send to exclude datasets
#13190 module: zfs: zio_inject: zio_match_handler: don't << -1
#13219 FreeBSD: add missing replay check to an assert in zfs_xvattr_set
#13220 module: freebsd: avoid a taking a destroyed lock in zfs_zevent bits
#13221 Fix ACL checks for NFS kernel server

Obtained from: OpenZFS
OpenZFS commit: bc3f12bfac152a0c28951cec92340ba14f9ccee9


# e92ffd9b 22-Jan-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@17b2ae0b2 (master) into main

Notable upstream pull request merges:
#12766 Fix error propagation from lzc_send_redacted
#12805 Updated the lz4 decompressor
#12851 FreeBSD: Provide correct file generation number
#12857 Verify dRAID empty sectors
#12874 FreeBSD: Update argument types for VOP_READDIR
#12896 Reduce number of arc_prune threads
#12934 FreeBSD: Fix zvol_*_open() locking
#12947 lz4: Cherrypick fix for CVE-2021-3520
#12961 FreeBSD: Fix leaked strings in libspl mnttab
#12964 Fix handling of errors from dmu_write_uio_dbuf() on FreeBSD
#12981 Introduce a flag to skip comparing the local mac when raw sending
#12985 Avoid memory allocations in the ARC eviction thread

Obtained from: OpenZFS
OpenZFS commit: 17b2ae0b24d487fdda2ef1098ec26fa7f79a61f6


# 681ce946 16-Dec-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f291fa658 (master) into main

Notable upstream pull request merges:
#11711 Vdev Properties Feature
#12717 VOP_RENAME fixes for FreeBSD
#12746 Enable strict hole reporting by default
#12770 ZFS send/recv with ashift 9->12 leads to data corruption
#12828 FreeBSD: Add vop_standard_writecount_nomsyn
#12828 zfs: Fix a deadlock between page busy and the teardown lock
#12828 FreeBSD: Catch up with more VFS changes

Obtained from: OpenZFS
OpenZFS commit: f291fa658efd146540b03ce386133632bde237bf


# 1f88aa09 07-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f3678d70f (master) into main

Notable upstream pull request merges:
#12339 Read past end of argv array in zpool_do_import()
#12365 Fixes in persistent L2ARC
#12383 Fixes for KMSAN reports
#12425 Avoid small buffer copying on write
#12428 Fix unfortunate NULL in spa_update_dspace
#12446 Allow disabling of unmapped I/O on FreeBSD

Obtained from: OpenZFS
OpenZFS commit: f3678d70ff8f98d67caf377ec0326c9a6c7bcf29


# 3f9d360c 22-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@14b43fbd9 (master) into main

Notable upstream pull request merges:
#12271 Tinker with slop space accounting with dedup
#12279 Fix ARC ghost states eviction accounting
#12284 Add Module Parameter Regarding Log Size Limit
#12300 Introduce dsl_dir_diduse_transfer_space()
#12314 Optimize allocation throttling
#12348 Minor ARC optimizations
#12350 Detect HAVE_LARGE_STACKS at compile time
#12356 Use SET_ERROR for more errors in FreeBSD vnops
#12375 FreeBSD: Ignore make_dev_s() errors
#12378 FreeBSD: Switch from MAXPHYS to maxphys on FreeBSD 13+

Obtained from: OpenZFS
OpenZFS commit: 14b43fbd9c13d802409ed886bb6b66fd528fb209


# 7cd22ac4 07-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bdd11cbb9 (master) into main

Notable upstream pull request merges:
#12274 Optimize txg_kick() process
#12281 Move gethrtime() calls out of vdev queue lock
#12287 Remove refcount from spa_config_*(
#12289 Compact dbuf/buf hashes and lock arrays
#12290 Remove avl_size field from struct avl_tree
#12294 Upstream: dmu_zfetch_stream_fini leaks refcount
#12295 Fix abd leak, kmem_free correct size of abd_t
#12328 FreeBSD: Hardcode abd_chunk_size to PAGE_SIZE

Obtained from: OpenZFS
OpenZFS commit: bdd11cbb90a2afa54fd00935ac0d34b4ddf2515c


# 33b8c039 25-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@5e2c8338b (master) into main

Notable upstream pull request merges:
#12183 Optimize small random numbers generation
#12227 Revert Consolidate arc_buf allocation checks
#12266 Fix flag copying in resume case
#12273 zfs_metaslab_mem_limit should be 25 instead of 75
#12276 Update cache file when setting compatibility property
#12280 Help compiller optimize out abd_verify()
#12282 FreeBSD: fix compilation of FreeBSD world after 29274c9f6

Obtained from: OpenZFS
OpenZFS commit: 5e2c8338bf17d31b44eb1dbbb3c9b6a0f64e96ee


# 9db44a8e 13-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9305ff2ed

Notable upstream pull request merges:
#11153 Scalable teardown lock for FreeBSD
#11651 Don't bomb out when using keylocation=file://
#11667 zvol: call zil_replaying() during replay
#11683 abd_get_offset_struct() may allocate new abd
#11693 Intentionally allow ZFS_READONLY in zfs_write
#11716 zpool import cachefile improvements
#11720 FreeBSD: Clean up zfsdev_close to match Linux
#11730 FreeBSD: bring back possibility to rewind the
checkpoint from bootloader

Obtained from: OpenZFS
MFC after: 2 weeks


# caed7b1c 02-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-bedbc13da

Notable upstream commits:
8e43fa12c Fix vdev_rebuild_thread deadlock
03ef8f09e Add missing checks for unsupported features
2e160dee9 Fix assert in FreeBSD-specific dmu_read_pages
bedbc13da Cancel TRIM / initialize on FAULTED non-writeable vdevs

MFC after: 1 week
Obtained from: OpenZFS


# 184c1b94 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-436ab35a5

- speed up writing to ZFS pools without ZIL devices (aa755b3)
- speed up importing ZFS pools (2d8f72d, a0e0199, cf0977a)
...

MFC after: 2 weeks
Reviewed by: mjg (partial)
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D28677


# 7877fdeb 07-Jan-2021 Matt Macy <mmacy@FreeBSD.org>

OpenZFS merge main-gf11b09

- add dRAID support
- fix duplicate close handling
- fix memory leak in prefetch
- fix problem with SIMD benchmarking on FreeBSD boot
...

# c40487d4 01-Oct-2020 Matt Macy <mmacy@FreeBSD.org>

OpenZFS: MFV 2.0-rc3-gfc5966

- Annotate FreeBSD sysctls with CTLFLAG_MPSAFE
- Reduce stack usage of Lua
- Don't save user FPU context in kernel threads
- Add support for procfs_list
- Code cleanup in zio_crypt
- Add DB_RF_NOPREFETCH to dbuf_read()s in dnode.c
- Drop references when skipping dmu_send due to EXDEV
- Eliminate gratuitous bzeroing in dbuf_stats_hash_table_data
- Fix legacy compat for platform IOCs


# eda14cbc 24-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

Initial import from vendor-sys branch of openzfs


# c9539b89 16-Feb-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@57cfae4a2 (master)

Notable upstream pull request merges:
#13816 Fix a race condition in dsl_dataset_sync() when
activating features
#14402 Prefetch on deadlists merge
#14410 Improve resilver ETAs
#14428 Resilver performance tuning
#14439 Resolve WS-2021-0184 vulnerability in zstd
#14440 EIO caused by encryption + recursive gang
#14448 Fix console progress reporting for recursive send
#14454 Improve arc_read() error reporting
#14460 Restore FreeBSD to use .rodata
#14474 Reduce need for contiguous memory for ioctls

Obtained from: OpenZFS
OpenZFS commit: 57cfae4a2f04aaff10c45b3f7975e0fe3ef3e8b8


# bb2d13b6 07-Dec-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@59493b63c (master)

Notable upstream pull request merges:
#13782 Fix setting the large_block feature after receiving a snapshot
#14157 FreeBSD: stop using buffer cache-only routines on sync
#14172 zed: post a udev change event from spa_vdev_attach()
#14181 zed: unclean disk attachment faults the vdev
#14190 Bump checksum error counter before reporting to ZED
#14196 Remove atomics from zh_refcount
#14197 Don't leak packed recieved proprties
#14198 Switch dnode stats to wmsums
#14199 Remove few pointer dereferences in dbuf_read()
#14200 Micro-optimize zrl_remove()
#14204 Lua: Fix bad bitshift in lua_strx2number()
#14212 Zstd fixes
#14218 Avoid a null pointer dereference in zfs_mount() on FreeBSD
#14235 nopwrites on dmu_sync-ed blocks can result in a panic
#14236 zio can deadlock during device removal
#14247 Micro-optimize fletcher4 calculations
#14261 FreeBSD: zfs_register_callbacks() must implement error check
correctly

Obtained from: OpenZFS
OpenZFS commit: 59493b63c18ea223857066218d6a58b67eb88159


# dbd5678d 16-Nov-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@2163cde45

Notable upstream pull request merges:
#13680 Add options to zfs redundant_metadata property
#13758 Allow mounting snapshots in .zfs/snapshot as a regular user
#13838 quota: disable quota check for ZVOL
#13839 quota: extend quota for dataset
#13973 Fix memory leaks in dmu_send()/dmu_send_obj()
#13977 Avoid unnecessary metaslab_check_free calling
#13978 PAM: Fix unchecked return value from zfs_key_config_load()
#13979 Handle possible null pointers from malloc/strdup/strndup()
#13997 zstream: allow decompress to fix metadata for uncompressed
records
#13998 zvol_wait logic may terminate prematurely
#14001 FreeBSD: Fix a pair of bugs in zfs_fhtovp()
#14003 Stop ganging due to past vdev write errors
#14039 Optimize microzaps
#14050 Fix draid2+2s metadata error on simultaneous 2 drive failures
#14062 zed: Avoid core dump if wholedisk property does not exist
#14077 Propagate extent_bytes change to autotrim thread
#14079 FreeBSD: vn_flush_cached_data: observe vnode locking contract
#14093 Fix ARC target collapse when zfs_arc_meta_limit_percent=100
#14106 Add ability to recompress send streams with new compression
algorithm
#14119 Deny receiving into encrypted datasets if the keys are not
loaded
#14120 Fix arc_p aggressive increase
#14129 zed: Prevent special vdev to be replaced by hot spare
#14133 Expose zfs_vdev_open_timeout_ms as a tunable
#14135 FreeBSD: Fix out of bounds read in zfs_ioctl_ozfs_to_legacy()
#14152 Adds the `-p` option to `zfs holds`
#14161 Handle and detect #13709's unlock regression

Obtained from: OpenZFS
OpenZFS commit: 2163cde450d0898b5f7bac16afb4e238485411ff


# be181ee2 04-Oct-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@d62bafee9

Notable upstream pull request merges:
#13857 Enforce "-F" flag on resuming recv of full/newfs on existing dataset
#13928 Revert "Reduce dbuf_find() lock contention"
#13928 Dynamically size dbuf hash mutex array
#13930 zpool: Don't print "repairing" on force faulted drives
#13938 Bring per_txg_dirty_frees_percent back to 30
#13939 Fix panic in dsl_process_sub_livelist for EINTR
#13954 Fix bad free in skein code
#13967 Fix potential NULL pointer dereference in dsl_dataset_promote_check()

Obtained from: OpenZFS
OpenZFS commit: d62bafee9fc38f8b9653c531e1861e83dcba4618


# 271171e0 13-Aug-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@b3d0568cf

Notable upstream pull request merges:
#9372 Implement a new type of zfs receive: corrective receive (-c)
#13635 Add snapshots_changed as property
#13636 Add support for per dataset zil stats and use wmsum counters
#13643 Fix scrub resume from newly created hole
#13670 Fix memory allocation for the checksum benchmark
#13695 Skip checksum benchmarks on systems with slow cpu
#13711 zpool: fix redundancy check after vdev removal

Obtained from: OpenZFS
OpenZFS commit: b3d0568cfd65458c92f7ab3d7bb709087992628e


# a0b956f5 07-Jul-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@cb01da680

Notable upstream pull request merges:
#12438 Avoid panic with recordsize > 128k, raw sending and no large_blocks
#13015 Fix dnode byteswapping
#13256 Add a "zstream decompress" subcommand
#13555 Scrub mirror children without BPs
#13576 Several sorted scrub optimizations
#13579 Fix and disable blocks statistics during scrub
#13582 Several B-tree optimizations
#13591 Avoid two 64-bit divisions per scanned block
#13606 Avoid memory copies during mirror scrub
#13613 Avoid memory copy when verifying raidz/draid parity

Obtained from: OpenZFS
OpenZFS commit: cb01da68057dcb9e612e8d2e97d058c46c3574af


# 1f1e2261 23-Jun-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@deb121309

Notable upstream pull request merges:
#12918 Introduce BLAKE3 checksums as an OpenZFS feature
#13553 Reduce ZIO io_lock contention on sorted scrub
#13537 Improve sorted scan memory accounting
#13540 AVL: Remove obsolete branching optimizations
#13563 FreeBSD: Improve crypto_dispatch() handling

Obtained from: OpenZFS
OpenZFS commit: deb1213098e2dc10e6eee5e5c57bb40584e096a6


# da5137ab 28-Mar-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bc3f12bfa (master) into main

Notable upstream pull request merges:
#12083 libzfs: FreeBSD doesn't resize partitions for you
#13106 add physical device size to SIZE column in 'zpool list -v'
#13158 Allow zfs send to exclude datasets
#13190 module: zfs: zio_inject: zio_match_handler: don't << -1
#13219 FreeBSD: add missing replay check to an assert in zfs_xvattr_set
#13220 module: freebsd: avoid a taking a destroyed lock in zfs_zevent bits
#13221 Fix ACL checks for NFS kernel server

Obtained from: OpenZFS
OpenZFS commit: bc3f12bfac152a0c28951cec92340ba14f9ccee9


# e92ffd9b 22-Jan-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@17b2ae0b2 (master) into main

Notable upstream pull request merges:
#12766 Fix error propagation from lzc_send_redacted
#12805 Updated the lz4 decompressor
#12851 FreeBSD: Provide correct file generation number
#12857 Verify dRAID empty sectors
#12874 FreeBSD: Update argument types for VOP_READDIR
#12896 Reduce number of arc_prune threads
#12934 FreeBSD: Fix zvol_*_open() locking
#12947 lz4: Cherrypick fix for CVE-2021-3520
#12961 FreeBSD: Fix leaked strings in libspl mnttab
#12964 Fix handling of errors from dmu_write_uio_dbuf() on FreeBSD
#12981 Introduce a flag to skip comparing the local mac when raw sending
#12985 Avoid memory allocations in the ARC eviction thread

Obtained from: OpenZFS
OpenZFS commit: 17b2ae0b24d487fdda2ef1098ec26fa7f79a61f6


# 681ce946 16-Dec-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f291fa658 (master) into main

Notable upstream pull request merges:
#11711 Vdev Properties Feature
#12717 VOP_RENAME fixes for FreeBSD
#12746 Enable strict hole reporting by default
#12770 ZFS send/recv with ashift 9->12 leads to data corruption
#12828 FreeBSD: Add vop_standard_writecount_nomsyn
#12828 zfs: Fix a deadlock between page busy and the teardown lock
#12828 FreeBSD: Catch up with more VFS changes

Obtained from: OpenZFS
OpenZFS commit: f291fa658efd146540b03ce386133632bde237bf


# 1f88aa09 07-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f3678d70f (master) into main

Notable upstream pull request merges:
#12339 Read past end of argv array in zpool_do_import()
#12365 Fixes in persistent L2ARC
#12383 Fixes for KMSAN reports
#12425 Avoid small buffer copying on write
#12428 Fix unfortunate NULL in spa_update_dspace
#12446 Allow disabling of unmapped I/O on FreeBSD

Obtained from: OpenZFS
OpenZFS commit: f3678d70ff8f98d67caf377ec0326c9a6c7bcf29


# 3f9d360c 22-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@14b43fbd9 (master) into main

Notable upstream pull request merges:
#12271 Tinker with slop space accounting with dedup
#12279 Fix ARC ghost states eviction accounting
#12284 Add Module Parameter Regarding Log Size Limit
#12300 Introduce dsl_dir_diduse_transfer_space()
#12314 Optimize allocation throttling
#12348 Minor ARC optimizations
#12350 Detect HAVE_LARGE_STACKS at compile time
#12356 Use SET_ERROR for more errors in FreeBSD vnops
#12375 FreeBSD: Ignore make_dev_s() errors
#12378 FreeBSD: Switch from MAXPHYS to maxphys on FreeBSD 13+

Obtained from: OpenZFS
OpenZFS commit: 14b43fbd9c13d802409ed886bb6b66fd528fb209


# 7cd22ac4 07-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bdd11cbb9 (master) into main

Notable upstream pull request merges:
#12274 Optimize txg_kick() process
#12281 Move gethrtime() calls out of vdev queue lock
#12287 Remove refcount from spa_config_*(
#12289 Compact dbuf/buf hashes and lock arrays
#12290 Remove avl_size field from struct avl_tree
#12294 Upstream: dmu_zfetch_stream_fini leaks refcount
#12295 Fix abd leak, kmem_free correct size of abd_t
#12328 FreeBSD: Hardcode abd_chunk_size to PAGE_SIZE

Obtained from: OpenZFS
OpenZFS commit: bdd11cbb90a2afa54fd00935ac0d34b4ddf2515c


# 33b8c039 25-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@5e2c8338b (master) into main

Notable upstream pull request merges:
#12183 Optimize small random numbers generation
#12227 Revert Consolidate arc_buf allocation checks
#12266 Fix flag copying in resume case
#12273 zfs_metaslab_mem_limit should be 25 instead of 75
#12276 Update cache file when setting compatibility property
#12280 Help compiller optimize out abd_verify()
#12282 FreeBSD: fix compilation of FreeBSD world after 29274c9f6

Obtained from: OpenZFS
OpenZFS commit: 5e2c8338bf17d31b44eb1dbbb3c9b6a0f64e96ee


# 9db44a8e 13-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9305ff2ed

Notable upstream pull request merges:
#11153 Scalable teardown lock for FreeBSD
#11651 Don't bomb out when using keylocation=file://
#11667 zvol: call zil_replaying() during replay
#11683 abd_get_offset_struct() may allocate new abd
#11693 Intentionally allow ZFS_READONLY in zfs_write
#11716 zpool import cachefile improvements
#11720 FreeBSD: Clean up zfsdev_close to match Linux
#11730 FreeBSD: bring back possibility to rewind the
checkpoint from bootloader

Obtained from: OpenZFS
MFC after: 2 weeks


# caed7b1c 02-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-bedbc13da

Notable upstream commits:
8e43fa12c Fix vdev_rebuild_thread deadlock
03ef8f09e Add missing checks for unsupported features
2e160dee9 Fix assert in FreeBSD-specific dmu_read_pages
bedbc13da Cancel TRIM / initialize on FAULTED non-writeable vdevs

MFC after: 1 week
Obtained from: OpenZFS


# 184c1b94 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-436ab35a5

- speed up writing to ZFS pools without ZIL devices (aa755b3)
- speed up importing ZFS pools (2d8f72d, a0e0199, cf0977a)
...

MFC after: 2 weeks
Reviewed by: mjg (partial)
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D28677


# 7877fdeb 07-Jan-2021 Matt Macy <mmacy@FreeBSD.org>

OpenZFS merge main-gf11b09

- add dRAID support
- fix duplicate close handling
- fix memory leak in prefetch
- fix problem with SIMD benchmarking on FreeBSD boot
...

# c40487d4 01-Oct-2020 Matt Macy <mmacy@FreeBSD.org>

OpenZFS: MFV 2.0-rc3-gfc5966

- Annotate FreeBSD sysctls with CTLFLAG_MPSAFE
- Reduce stack usage of Lua
- Don't save user FPU context in kernel threads
- Add support for procfs_list
- Code cleanup in zio_crypt
- Add DB_RF_NOPREFETCH to dbuf_read()s in dnode.c
- Drop references when skipping dmu_send due to EXDEV
- Eliminate gratuitous bzeroing in dbuf_stats_hash_table_data
- Fix legacy compat for platform IOCs


# eda14cbc 24-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

Initial import from vendor-sys branch of openzfs


# bb2d13b6 07-Dec-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@59493b63c (master)

Notable upstream pull request merges:
#13782 Fix setting the large_block feature after receiving a snapshot
#14157 FreeBSD: stop using buffer cache-only routines on sync
#14172 zed: post a udev change event from spa_vdev_attach()
#14181 zed: unclean disk attachment faults the vdev
#14190 Bump checksum error counter before reporting to ZED
#14196 Remove atomics from zh_refcount
#14197 Don't leak packed recieved proprties
#14198 Switch dnode stats to wmsums
#14199 Remove few pointer dereferences in dbuf_read()
#14200 Micro-optimize zrl_remove()
#14204 Lua: Fix bad bitshift in lua_strx2number()
#14212 Zstd fixes
#14218 Avoid a null pointer dereference in zfs_mount() on FreeBSD
#14235 nopwrites on dmu_sync-ed blocks can result in a panic
#14236 zio can deadlock during device removal
#14247 Micro-optimize fletcher4 calculations
#14261 FreeBSD: zfs_register_callbacks() must implement error check
correctly

Obtained from: OpenZFS
OpenZFS commit: 59493b63c18ea223857066218d6a58b67eb88159


# dbd5678d 16-Nov-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@2163cde45

Notable upstream pull request merges:
#13680 Add options to zfs redundant_metadata property
#13758 Allow mounting snapshots in .zfs/snapshot as a regular user
#13838 quota: disable quota check for ZVOL
#13839 quota: extend quota for dataset
#13973 Fix memory leaks in dmu_send()/dmu_send_obj()
#13977 Avoid unnecessary metaslab_check_free calling
#13978 PAM: Fix unchecked return value from zfs_key_config_load()
#13979 Handle possible null pointers from malloc/strdup/strndup()
#13997 zstream: allow decompress to fix metadata for uncompressed
records
#13998 zvol_wait logic may terminate prematurely
#14001 FreeBSD: Fix a pair of bugs in zfs_fhtovp()
#14003 Stop ganging due to past vdev write errors
#14039 Optimize microzaps
#14050 Fix draid2+2s metadata error on simultaneous 2 drive failures
#14062 zed: Avoid core dump if wholedisk property does not exist
#14077 Propagate extent_bytes change to autotrim thread
#14079 FreeBSD: vn_flush_cached_data: observe vnode locking contract
#14093 Fix ARC target collapse when zfs_arc_meta_limit_percent=100
#14106 Add ability to recompress send streams with new compression
algorithm
#14119 Deny receiving into encrypted datasets if the keys are not
loaded
#14120 Fix arc_p aggressive increase
#14129 zed: Prevent special vdev to be replaced by hot spare
#14133 Expose zfs_vdev_open_timeout_ms as a tunable
#14135 FreeBSD: Fix out of bounds read in zfs_ioctl_ozfs_to_legacy()
#14152 Adds the `-p` option to `zfs holds`
#14161 Handle and detect #13709's unlock regression

Obtained from: OpenZFS
OpenZFS commit: 2163cde450d0898b5f7bac16afb4e238485411ff


# be181ee2 04-Oct-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@d62bafee9

Notable upstream pull request merges:
#13857 Enforce "-F" flag on resuming recv of full/newfs on existing dataset
#13928 Revert "Reduce dbuf_find() lock contention"
#13928 Dynamically size dbuf hash mutex array
#13930 zpool: Don't print "repairing" on force faulted drives
#13938 Bring per_txg_dirty_frees_percent back to 30
#13939 Fix panic in dsl_process_sub_livelist for EINTR
#13954 Fix bad free in skein code
#13967 Fix potential NULL pointer dereference in dsl_dataset_promote_check()

Obtained from: OpenZFS
OpenZFS commit: d62bafee9fc38f8b9653c531e1861e83dcba4618


# 271171e0 13-Aug-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@b3d0568cf

Notable upstream pull request merges:
#9372 Implement a new type of zfs receive: corrective receive (-c)
#13635 Add snapshots_changed as property
#13636 Add support for per dataset zil stats and use wmsum counters
#13643 Fix scrub resume from newly created hole
#13670 Fix memory allocation for the checksum benchmark
#13695 Skip checksum benchmarks on systems with slow cpu
#13711 zpool: fix redundancy check after vdev removal

Obtained from: OpenZFS
OpenZFS commit: b3d0568cfd65458c92f7ab3d7bb709087992628e


# a0b956f5 07-Jul-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@cb01da680

Notable upstream pull request merges:
#12438 Avoid panic with recordsize > 128k, raw sending and no large_blocks
#13015 Fix dnode byteswapping
#13256 Add a "zstream decompress" subcommand
#13555 Scrub mirror children without BPs
#13576 Several sorted scrub optimizations
#13579 Fix and disable blocks statistics during scrub
#13582 Several B-tree optimizations
#13591 Avoid two 64-bit divisions per scanned block
#13606 Avoid memory copies during mirror scrub
#13613 Avoid memory copy when verifying raidz/draid parity

Obtained from: OpenZFS
OpenZFS commit: cb01da68057dcb9e612e8d2e97d058c46c3574af


# 1f1e2261 23-Jun-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@deb121309

Notable upstream pull request merges:
#12918 Introduce BLAKE3 checksums as an OpenZFS feature
#13553 Reduce ZIO io_lock contention on sorted scrub
#13537 Improve sorted scan memory accounting
#13540 AVL: Remove obsolete branching optimizations
#13563 FreeBSD: Improve crypto_dispatch() handling

Obtained from: OpenZFS
OpenZFS commit: deb1213098e2dc10e6eee5e5c57bb40584e096a6


# da5137ab 28-Mar-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bc3f12bfa (master) into main

Notable upstream pull request merges:
#12083 libzfs: FreeBSD doesn't resize partitions for you
#13106 add physical device size to SIZE column in 'zpool list -v'
#13158 Allow zfs send to exclude datasets
#13190 module: zfs: zio_inject: zio_match_handler: don't << -1
#13219 FreeBSD: add missing replay check to an assert in zfs_xvattr_set
#13220 module: freebsd: avoid a taking a destroyed lock in zfs_zevent bits
#13221 Fix ACL checks for NFS kernel server

Obtained from: OpenZFS
OpenZFS commit: bc3f12bfac152a0c28951cec92340ba14f9ccee9


# e92ffd9b 22-Jan-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@17b2ae0b2 (master) into main

Notable upstream pull request merges:
#12766 Fix error propagation from lzc_send_redacted
#12805 Updated the lz4 decompressor
#12851 FreeBSD: Provide correct file generation number
#12857 Verify dRAID empty sectors
#12874 FreeBSD: Update argument types for VOP_READDIR
#12896 Reduce number of arc_prune threads
#12934 FreeBSD: Fix zvol_*_open() locking
#12947 lz4: Cherrypick fix for CVE-2021-3520
#12961 FreeBSD: Fix leaked strings in libspl mnttab
#12964 Fix handling of errors from dmu_write_uio_dbuf() on FreeBSD
#12981 Introduce a flag to skip comparing the local mac when raw sending
#12985 Avoid memory allocations in the ARC eviction thread

Obtained from: OpenZFS
OpenZFS commit: 17b2ae0b24d487fdda2ef1098ec26fa7f79a61f6


# 681ce946 16-Dec-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f291fa658 (master) into main

Notable upstream pull request merges:
#11711 Vdev Properties Feature
#12717 VOP_RENAME fixes for FreeBSD
#12746 Enable strict hole reporting by default
#12770 ZFS send/recv with ashift 9->12 leads to data corruption
#12828 FreeBSD: Add vop_standard_writecount_nomsyn
#12828 zfs: Fix a deadlock between page busy and the teardown lock
#12828 FreeBSD: Catch up with more VFS changes

Obtained from: OpenZFS
OpenZFS commit: f291fa658efd146540b03ce386133632bde237bf


# 1f88aa09 07-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f3678d70f (master) into main

Notable upstream pull request merges:
#12339 Read past end of argv array in zpool_do_import()
#12365 Fixes in persistent L2ARC
#12383 Fixes for KMSAN reports
#12425 Avoid small buffer copying on write
#12428 Fix unfortunate NULL in spa_update_dspace
#12446 Allow disabling of unmapped I/O on FreeBSD

Obtained from: OpenZFS
OpenZFS commit: f3678d70ff8f98d67caf377ec0326c9a6c7bcf29


# 3f9d360c 22-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@14b43fbd9 (master) into main

Notable upstream pull request merges:
#12271 Tinker with slop space accounting with dedup
#12279 Fix ARC ghost states eviction accounting
#12284 Add Module Parameter Regarding Log Size Limit
#12300 Introduce dsl_dir_diduse_transfer_space()
#12314 Optimize allocation throttling
#12348 Minor ARC optimizations
#12350 Detect HAVE_LARGE_STACKS at compile time
#12356 Use SET_ERROR for more errors in FreeBSD vnops
#12375 FreeBSD: Ignore make_dev_s() errors
#12378 FreeBSD: Switch from MAXPHYS to maxphys on FreeBSD 13+

Obtained from: OpenZFS
OpenZFS commit: 14b43fbd9c13d802409ed886bb6b66fd528fb209


# 7cd22ac4 07-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bdd11cbb9 (master) into main

Notable upstream pull request merges:
#12274 Optimize txg_kick() process
#12281 Move gethrtime() calls out of vdev queue lock
#12287 Remove refcount from spa_config_*(
#12289 Compact dbuf/buf hashes and lock arrays
#12290 Remove avl_size field from struct avl_tree
#12294 Upstream: dmu_zfetch_stream_fini leaks refcount
#12295 Fix abd leak, kmem_free correct size of abd_t
#12328 FreeBSD: Hardcode abd_chunk_size to PAGE_SIZE

Obtained from: OpenZFS
OpenZFS commit: bdd11cbb90a2afa54fd00935ac0d34b4ddf2515c


# 33b8c039 25-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@5e2c8338b (master) into main

Notable upstream pull request merges:
#12183 Optimize small random numbers generation
#12227 Revert Consolidate arc_buf allocation checks
#12266 Fix flag copying in resume case
#12273 zfs_metaslab_mem_limit should be 25 instead of 75
#12276 Update cache file when setting compatibility property
#12280 Help compiller optimize out abd_verify()
#12282 FreeBSD: fix compilation of FreeBSD world after 29274c9f6

Obtained from: OpenZFS
OpenZFS commit: 5e2c8338bf17d31b44eb1dbbb3c9b6a0f64e96ee


# 9db44a8e 13-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9305ff2ed

Notable upstream pull request merges:
#11153 Scalable teardown lock for FreeBSD
#11651 Don't bomb out when using keylocation=file://
#11667 zvol: call zil_replaying() during replay
#11683 abd_get_offset_struct() may allocate new abd
#11693 Intentionally allow ZFS_READONLY in zfs_write
#11716 zpool import cachefile improvements
#11720 FreeBSD: Clean up zfsdev_close to match Linux
#11730 FreeBSD: bring back possibility to rewind the
checkpoint from bootloader

Obtained from: OpenZFS
MFC after: 2 weeks


# caed7b1c 02-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-bedbc13da

Notable upstream commits:
8e43fa12c Fix vdev_rebuild_thread deadlock
03ef8f09e Add missing checks for unsupported features
2e160dee9 Fix assert in FreeBSD-specific dmu_read_pages
bedbc13da Cancel TRIM / initialize on FAULTED non-writeable vdevs

MFC after: 1 week
Obtained from: OpenZFS


# 184c1b94 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-436ab35a5

- speed up writing to ZFS pools without ZIL devices (aa755b3)
- speed up importing ZFS pools (2d8f72d, a0e0199, cf0977a)
...

MFC after: 2 weeks
Reviewed by: mjg (partial)
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D28677


# 7877fdeb 07-Jan-2021 Matt Macy <mmacy@FreeBSD.org>

OpenZFS merge main-gf11b09

- add dRAID support
- fix duplicate close handling
- fix memory leak in prefetch
- fix problem with SIMD benchmarking on FreeBSD boot
...

# c40487d4 01-Oct-2020 Matt Macy <mmacy@FreeBSD.org>

OpenZFS: MFV 2.0-rc3-gfc5966

- Annotate FreeBSD sysctls with CTLFLAG_MPSAFE
- Reduce stack usage of Lua
- Don't save user FPU context in kernel threads
- Add support for procfs_list
- Code cleanup in zio_crypt
- Add DB_RF_NOPREFETCH to dbuf_read()s in dnode.c
- Drop references when skipping dmu_send due to EXDEV
- Eliminate gratuitous bzeroing in dbuf_stats_hash_table_data
- Fix legacy compat for platform IOCs


# eda14cbc 24-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

Initial import from vendor-sys branch of openzfs


# dbd5678d 16-Nov-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@2163cde45

Notable upstream pull request merges:
#13680 Add options to zfs redundant_metadata property
#13758 Allow mounting snapshots in .zfs/snapshot as a regular user
#13838 quota: disable quota check for ZVOL
#13839 quota: extend quota for dataset
#13973 Fix memory leaks in dmu_send()/dmu_send_obj()
#13977 Avoid unnecessary metaslab_check_free calling
#13978 PAM: Fix unchecked return value from zfs_key_config_load()
#13979 Handle possible null pointers from malloc/strdup/strndup()
#13997 zstream: allow decompress to fix metadata for uncompressed
records
#13998 zvol_wait logic may terminate prematurely
#14001 FreeBSD: Fix a pair of bugs in zfs_fhtovp()
#14003 Stop ganging due to past vdev write errors
#14039 Optimize microzaps
#14050 Fix draid2+2s metadata error on simultaneous 2 drive failures
#14062 zed: Avoid core dump if wholedisk property does not exist
#14077 Propagate extent_bytes change to autotrim thread
#14079 FreeBSD: vn_flush_cached_data: observe vnode locking contract
#14093 Fix ARC target collapse when zfs_arc_meta_limit_percent=100
#14106 Add ability to recompress send streams with new compression
algorithm
#14119 Deny receiving into encrypted datasets if the keys are not
loaded
#14120 Fix arc_p aggressive increase
#14129 zed: Prevent special vdev to be replaced by hot spare
#14133 Expose zfs_vdev_open_timeout_ms as a tunable
#14135 FreeBSD: Fix out of bounds read in zfs_ioctl_ozfs_to_legacy()
#14152 Adds the `-p` option to `zfs holds`
#14161 Handle and detect #13709's unlock regression

Obtained from: OpenZFS
OpenZFS commit: 2163cde450d0898b5f7bac16afb4e238485411ff


# be181ee2 04-Oct-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@d62bafee9

Notable upstream pull request merges:
#13857 Enforce "-F" flag on resuming recv of full/newfs on existing dataset
#13928 Revert "Reduce dbuf_find() lock contention"
#13928 Dynamically size dbuf hash mutex array
#13930 zpool: Don't print "repairing" on force faulted drives
#13938 Bring per_txg_dirty_frees_percent back to 30
#13939 Fix panic in dsl_process_sub_livelist for EINTR
#13954 Fix bad free in skein code
#13967 Fix potential NULL pointer dereference in dsl_dataset_promote_check()

Obtained from: OpenZFS
OpenZFS commit: d62bafee9fc38f8b9653c531e1861e83dcba4618


# 271171e0 13-Aug-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@b3d0568cf

Notable upstream pull request merges:
#9372 Implement a new type of zfs receive: corrective receive (-c)
#13635 Add snapshots_changed as property
#13636 Add support for per dataset zil stats and use wmsum counters
#13643 Fix scrub resume from newly created hole
#13670 Fix memory allocation for the checksum benchmark
#13695 Skip checksum benchmarks on systems with slow cpu
#13711 zpool: fix redundancy check after vdev removal

Obtained from: OpenZFS
OpenZFS commit: b3d0568cfd65458c92f7ab3d7bb709087992628e


# a0b956f5 07-Jul-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@cb01da680

Notable upstream pull request merges:
#12438 Avoid panic with recordsize > 128k, raw sending and no large_blocks
#13015 Fix dnode byteswapping
#13256 Add a "zstream decompress" subcommand
#13555 Scrub mirror children without BPs
#13576 Several sorted scrub optimizations
#13579 Fix and disable blocks statistics during scrub
#13582 Several B-tree optimizations
#13591 Avoid two 64-bit divisions per scanned block
#13606 Avoid memory copies during mirror scrub
#13613 Avoid memory copy when verifying raidz/draid parity

Obtained from: OpenZFS
OpenZFS commit: cb01da68057dcb9e612e8d2e97d058c46c3574af


# 1f1e2261 23-Jun-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@deb121309

Notable upstream pull request merges:
#12918 Introduce BLAKE3 checksums as an OpenZFS feature
#13553 Reduce ZIO io_lock contention on sorted scrub
#13537 Improve sorted scan memory accounting
#13540 AVL: Remove obsolete branching optimizations
#13563 FreeBSD: Improve crypto_dispatch() handling

Obtained from: OpenZFS
OpenZFS commit: deb1213098e2dc10e6eee5e5c57bb40584e096a6


# da5137ab 28-Mar-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bc3f12bfa (master) into main

Notable upstream pull request merges:
#12083 libzfs: FreeBSD doesn't resize partitions for you
#13106 add physical device size to SIZE column in 'zpool list -v'
#13158 Allow zfs send to exclude datasets
#13190 module: zfs: zio_inject: zio_match_handler: don't << -1
#13219 FreeBSD: add missing replay check to an assert in zfs_xvattr_set
#13220 module: freebsd: avoid a taking a destroyed lock in zfs_zevent bits
#13221 Fix ACL checks for NFS kernel server

Obtained from: OpenZFS
OpenZFS commit: bc3f12bfac152a0c28951cec92340ba14f9ccee9


# e92ffd9b 22-Jan-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@17b2ae0b2 (master) into main

Notable upstream pull request merges:
#12766 Fix error propagation from lzc_send_redacted
#12805 Updated the lz4 decompressor
#12851 FreeBSD: Provide correct file generation number
#12857 Verify dRAID empty sectors
#12874 FreeBSD: Update argument types for VOP_READDIR
#12896 Reduce number of arc_prune threads
#12934 FreeBSD: Fix zvol_*_open() locking
#12947 lz4: Cherrypick fix for CVE-2021-3520
#12961 FreeBSD: Fix leaked strings in libspl mnttab
#12964 Fix handling of errors from dmu_write_uio_dbuf() on FreeBSD
#12981 Introduce a flag to skip comparing the local mac when raw sending
#12985 Avoid memory allocations in the ARC eviction thread

Obtained from: OpenZFS
OpenZFS commit: 17b2ae0b24d487fdda2ef1098ec26fa7f79a61f6


# 681ce946 16-Dec-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f291fa658 (master) into main

Notable upstream pull request merges:
#11711 Vdev Properties Feature
#12717 VOP_RENAME fixes for FreeBSD
#12746 Enable strict hole reporting by default
#12770 ZFS send/recv with ashift 9->12 leads to data corruption
#12828 FreeBSD: Add vop_standard_writecount_nomsyn
#12828 zfs: Fix a deadlock between page busy and the teardown lock
#12828 FreeBSD: Catch up with more VFS changes

Obtained from: OpenZFS
OpenZFS commit: f291fa658efd146540b03ce386133632bde237bf


# 1f88aa09 07-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f3678d70f (master) into main

Notable upstream pull request merges:
#12339 Read past end of argv array in zpool_do_import()
#12365 Fixes in persistent L2ARC
#12383 Fixes for KMSAN reports
#12425 Avoid small buffer copying on write
#12428 Fix unfortunate NULL in spa_update_dspace
#12446 Allow disabling of unmapped I/O on FreeBSD

Obtained from: OpenZFS
OpenZFS commit: f3678d70ff8f98d67caf377ec0326c9a6c7bcf29


# 3f9d360c 22-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@14b43fbd9 (master) into main

Notable upstream pull request merges:
#12271 Tinker with slop space accounting with dedup
#12279 Fix ARC ghost states eviction accounting
#12284 Add Module Parameter Regarding Log Size Limit
#12300 Introduce dsl_dir_diduse_transfer_space()
#12314 Optimize allocation throttling
#12348 Minor ARC optimizations
#12350 Detect HAVE_LARGE_STACKS at compile time
#12356 Use SET_ERROR for more errors in FreeBSD vnops
#12375 FreeBSD: Ignore make_dev_s() errors
#12378 FreeBSD: Switch from MAXPHYS to maxphys on FreeBSD 13+

Obtained from: OpenZFS
OpenZFS commit: 14b43fbd9c13d802409ed886bb6b66fd528fb209


# 7cd22ac4 07-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bdd11cbb9 (master) into main

Notable upstream pull request merges:
#12274 Optimize txg_kick() process
#12281 Move gethrtime() calls out of vdev queue lock
#12287 Remove refcount from spa_config_*(
#12289 Compact dbuf/buf hashes and lock arrays
#12290 Remove avl_size field from struct avl_tree
#12294 Upstream: dmu_zfetch_stream_fini leaks refcount
#12295 Fix abd leak, kmem_free correct size of abd_t
#12328 FreeBSD: Hardcode abd_chunk_size to PAGE_SIZE

Obtained from: OpenZFS
OpenZFS commit: bdd11cbb90a2afa54fd00935ac0d34b4ddf2515c


# 33b8c039 25-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@5e2c8338b (master) into main

Notable upstream pull request merges:
#12183 Optimize small random numbers generation
#12227 Revert Consolidate arc_buf allocation checks
#12266 Fix flag copying in resume case
#12273 zfs_metaslab_mem_limit should be 25 instead of 75
#12276 Update cache file when setting compatibility property
#12280 Help compiller optimize out abd_verify()
#12282 FreeBSD: fix compilation of FreeBSD world after 29274c9f6

Obtained from: OpenZFS
OpenZFS commit: 5e2c8338bf17d31b44eb1dbbb3c9b6a0f64e96ee


# 9db44a8e 13-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9305ff2ed

Notable upstream pull request merges:
#11153 Scalable teardown lock for FreeBSD
#11651 Don't bomb out when using keylocation=file://
#11667 zvol: call zil_replaying() during replay
#11683 abd_get_offset_struct() may allocate new abd
#11693 Intentionally allow ZFS_READONLY in zfs_write
#11716 zpool import cachefile improvements
#11720 FreeBSD: Clean up zfsdev_close to match Linux
#11730 FreeBSD: bring back possibility to rewind the
checkpoint from bootloader

Obtained from: OpenZFS
MFC after: 2 weeks


# caed7b1c 02-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-bedbc13da

Notable upstream commits:
8e43fa12c Fix vdev_rebuild_thread deadlock
03ef8f09e Add missing checks for unsupported features
2e160dee9 Fix assert in FreeBSD-specific dmu_read_pages
bedbc13da Cancel TRIM / initialize on FAULTED non-writeable vdevs

MFC after: 1 week
Obtained from: OpenZFS


# 184c1b94 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-436ab35a5

- speed up writing to ZFS pools without ZIL devices (aa755b3)
- speed up importing ZFS pools (2d8f72d, a0e0199, cf0977a)
...

MFC after: 2 weeks
Reviewed by: mjg (partial)
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D28677


# 7877fdeb 07-Jan-2021 Matt Macy <mmacy@FreeBSD.org>

OpenZFS merge main-gf11b09

- add dRAID support
- fix duplicate close handling
- fix memory leak in prefetch
- fix problem with SIMD benchmarking on FreeBSD boot
...

# c40487d4 01-Oct-2020 Matt Macy <mmacy@FreeBSD.org>

OpenZFS: MFV 2.0-rc3-gfc5966

- Annotate FreeBSD sysctls with CTLFLAG_MPSAFE
- Reduce stack usage of Lua
- Don't save user FPU context in kernel threads
- Add support for procfs_list
- Code cleanup in zio_crypt
- Add DB_RF_NOPREFETCH to dbuf_read()s in dnode.c
- Drop references when skipping dmu_send due to EXDEV
- Eliminate gratuitous bzeroing in dbuf_stats_hash_table_data
- Fix legacy compat for platform IOCs


# eda14cbc 24-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

Initial import from vendor-sys branch of openzfs


# be181ee2 04-Oct-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@d62bafee9

Notable upstream pull request merges:
#13857 Enforce "-F" flag on resuming recv of full/newfs on existing dataset
#13928 Revert "Reduce dbuf_find() lock contention"
#13928 Dynamically size dbuf hash mutex array
#13930 zpool: Don't print "repairing" on force faulted drives
#13938 Bring per_txg_dirty_frees_percent back to 30
#13939 Fix panic in dsl_process_sub_livelist for EINTR
#13954 Fix bad free in skein code
#13967 Fix potential NULL pointer dereference in dsl_dataset_promote_check()

Obtained from: OpenZFS
OpenZFS commit: d62bafee9fc38f8b9653c531e1861e83dcba4618


# 271171e0 13-Aug-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@b3d0568cf

Notable upstream pull request merges:
#9372 Implement a new type of zfs receive: corrective receive (-c)
#13635 Add snapshots_changed as property
#13636 Add support for per dataset zil stats and use wmsum counters
#13643 Fix scrub resume from newly created hole
#13670 Fix memory allocation for the checksum benchmark
#13695 Skip checksum benchmarks on systems with slow cpu
#13711 zpool: fix redundancy check after vdev removal

Obtained from: OpenZFS
OpenZFS commit: b3d0568cfd65458c92f7ab3d7bb709087992628e


# a0b956f5 07-Jul-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@cb01da680

Notable upstream pull request merges:
#12438 Avoid panic with recordsize > 128k, raw sending and no large_blocks
#13015 Fix dnode byteswapping
#13256 Add a "zstream decompress" subcommand
#13555 Scrub mirror children without BPs
#13576 Several sorted scrub optimizations
#13579 Fix and disable blocks statistics during scrub
#13582 Several B-tree optimizations
#13591 Avoid two 64-bit divisions per scanned block
#13606 Avoid memory copies during mirror scrub
#13613 Avoid memory copy when verifying raidz/draid parity

Obtained from: OpenZFS
OpenZFS commit: cb01da68057dcb9e612e8d2e97d058c46c3574af


# 1f1e2261 23-Jun-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@deb121309

Notable upstream pull request merges:
#12918 Introduce BLAKE3 checksums as an OpenZFS feature
#13553 Reduce ZIO io_lock contention on sorted scrub
#13537 Improve sorted scan memory accounting
#13540 AVL: Remove obsolete branching optimizations
#13563 FreeBSD: Improve crypto_dispatch() handling

Obtained from: OpenZFS
OpenZFS commit: deb1213098e2dc10e6eee5e5c57bb40584e096a6


# da5137ab 28-Mar-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bc3f12bfa (master) into main

Notable upstream pull request merges:
#12083 libzfs: FreeBSD doesn't resize partitions for you
#13106 add physical device size to SIZE column in 'zpool list -v'
#13158 Allow zfs send to exclude datasets
#13190 module: zfs: zio_inject: zio_match_handler: don't << -1
#13219 FreeBSD: add missing replay check to an assert in zfs_xvattr_set
#13220 module: freebsd: avoid a taking a destroyed lock in zfs_zevent bits
#13221 Fix ACL checks for NFS kernel server

Obtained from: OpenZFS
OpenZFS commit: bc3f12bfac152a0c28951cec92340ba14f9ccee9


# e92ffd9b 22-Jan-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@17b2ae0b2 (master) into main

Notable upstream pull request merges:
#12766 Fix error propagation from lzc_send_redacted
#12805 Updated the lz4 decompressor
#12851 FreeBSD: Provide correct file generation number
#12857 Verify dRAID empty sectors
#12874 FreeBSD: Update argument types for VOP_READDIR
#12896 Reduce number of arc_prune threads
#12934 FreeBSD: Fix zvol_*_open() locking
#12947 lz4: Cherrypick fix for CVE-2021-3520
#12961 FreeBSD: Fix leaked strings in libspl mnttab
#12964 Fix handling of errors from dmu_write_uio_dbuf() on FreeBSD
#12981 Introduce a flag to skip comparing the local mac when raw sending
#12985 Avoid memory allocations in the ARC eviction thread

Obtained from: OpenZFS
OpenZFS commit: 17b2ae0b24d487fdda2ef1098ec26fa7f79a61f6


# 681ce946 16-Dec-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f291fa658 (master) into main

Notable upstream pull request merges:
#11711 Vdev Properties Feature
#12717 VOP_RENAME fixes for FreeBSD
#12746 Enable strict hole reporting by default
#12770 ZFS send/recv with ashift 9->12 leads to data corruption
#12828 FreeBSD: Add vop_standard_writecount_nomsyn
#12828 zfs: Fix a deadlock between page busy and the teardown lock
#12828 FreeBSD: Catch up with more VFS changes

Obtained from: OpenZFS
OpenZFS commit: f291fa658efd146540b03ce386133632bde237bf


# 1f88aa09 07-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f3678d70f (master) into main

Notable upstream pull request merges:
#12339 Read past end of argv array in zpool_do_import()
#12365 Fixes in persistent L2ARC
#12383 Fixes for KMSAN reports
#12425 Avoid small buffer copying on write
#12428 Fix unfortunate NULL in spa_update_dspace
#12446 Allow disabling of unmapped I/O on FreeBSD

Obtained from: OpenZFS
OpenZFS commit: f3678d70ff8f98d67caf377ec0326c9a6c7bcf29


# 3f9d360c 22-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@14b43fbd9 (master) into main

Notable upstream pull request merges:
#12271 Tinker with slop space accounting with dedup
#12279 Fix ARC ghost states eviction accounting
#12284 Add Module Parameter Regarding Log Size Limit
#12300 Introduce dsl_dir_diduse_transfer_space()
#12314 Optimize allocation throttling
#12348 Minor ARC optimizations
#12350 Detect HAVE_LARGE_STACKS at compile time
#12356 Use SET_ERROR for more errors in FreeBSD vnops
#12375 FreeBSD: Ignore make_dev_s() errors
#12378 FreeBSD: Switch from MAXPHYS to maxphys on FreeBSD 13+

Obtained from: OpenZFS
OpenZFS commit: 14b43fbd9c13d802409ed886bb6b66fd528fb209


# 7cd22ac4 07-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bdd11cbb9 (master) into main

Notable upstream pull request merges:
#12274 Optimize txg_kick() process
#12281 Move gethrtime() calls out of vdev queue lock
#12287 Remove refcount from spa_config_*(
#12289 Compact dbuf/buf hashes and lock arrays
#12290 Remove avl_size field from struct avl_tree
#12294 Upstream: dmu_zfetch_stream_fini leaks refcount
#12295 Fix abd leak, kmem_free correct size of abd_t
#12328 FreeBSD: Hardcode abd_chunk_size to PAGE_SIZE

Obtained from: OpenZFS
OpenZFS commit: bdd11cbb90a2afa54fd00935ac0d34b4ddf2515c


# 33b8c039 25-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@5e2c8338b (master) into main

Notable upstream pull request merges:
#12183 Optimize small random numbers generation
#12227 Revert Consolidate arc_buf allocation checks
#12266 Fix flag copying in resume case
#12273 zfs_metaslab_mem_limit should be 25 instead of 75
#12276 Update cache file when setting compatibility property
#12280 Help compiller optimize out abd_verify()
#12282 FreeBSD: fix compilation of FreeBSD world after 29274c9f6

Obtained from: OpenZFS
OpenZFS commit: 5e2c8338bf17d31b44eb1dbbb3c9b6a0f64e96ee


# 9db44a8e 13-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9305ff2ed

Notable upstream pull request merges:
#11153 Scalable teardown lock for FreeBSD
#11651 Don't bomb out when using keylocation=file://
#11667 zvol: call zil_replaying() during replay
#11683 abd_get_offset_struct() may allocate new abd
#11693 Intentionally allow ZFS_READONLY in zfs_write
#11716 zpool import cachefile improvements
#11720 FreeBSD: Clean up zfsdev_close to match Linux
#11730 FreeBSD: bring back possibility to rewind the
checkpoint from bootloader

Obtained from: OpenZFS
MFC after: 2 weeks


# caed7b1c 02-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-bedbc13da

Notable upstream commits:
8e43fa12c Fix vdev_rebuild_thread deadlock
03ef8f09e Add missing checks for unsupported features
2e160dee9 Fix assert in FreeBSD-specific dmu_read_pages
bedbc13da Cancel TRIM / initialize on FAULTED non-writeable vdevs

MFC after: 1 week
Obtained from: OpenZFS


# 184c1b94 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-436ab35a5

- speed up writing to ZFS pools without ZIL devices (aa755b3)
- speed up importing ZFS pools (2d8f72d, a0e0199, cf0977a)
...

MFC after: 2 weeks
Reviewed by: mjg (partial)
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D28677


# 7877fdeb 07-Jan-2021 Matt Macy <mmacy@FreeBSD.org>

OpenZFS merge main-gf11b09

- add dRAID support
- fix duplicate close handling
- fix memory leak in prefetch
- fix problem with SIMD benchmarking on FreeBSD boot
...

# c40487d4 01-Oct-2020 Matt Macy <mmacy@FreeBSD.org>

OpenZFS: MFV 2.0-rc3-gfc5966

- Annotate FreeBSD sysctls with CTLFLAG_MPSAFE
- Reduce stack usage of Lua
- Don't save user FPU context in kernel threads
- Add support for procfs_list
- Code cleanup in zio_crypt
- Add DB_RF_NOPREFETCH to dbuf_read()s in dnode.c
- Drop references when skipping dmu_send due to EXDEV
- Eliminate gratuitous bzeroing in dbuf_stats_hash_table_data
- Fix legacy compat for platform IOCs


# eda14cbc 24-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

Initial import from vendor-sys branch of openzfs


# 271171e0 13-Aug-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@b3d0568cf

Notable upstream pull request merges:
#9372 Implement a new type of zfs receive: corrective receive (-c)
#13635 Add snapshots_changed as property
#13636 Add support for per dataset zil stats and use wmsum counters
#13643 Fix scrub resume from newly created hole
#13670 Fix memory allocation for the checksum benchmark
#13695 Skip checksum benchmarks on systems with slow cpu
#13711 zpool: fix redundancy check after vdev removal

Obtained from: OpenZFS
OpenZFS commit: b3d0568cfd65458c92f7ab3d7bb709087992628e


# a0b956f5 07-Jul-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@cb01da680

Notable upstream pull request merges:
#12438 Avoid panic with recordsize > 128k, raw sending and no large_blocks
#13015 Fix dnode byteswapping
#13256 Add a "zstream decompress" subcommand
#13555 Scrub mirror children without BPs
#13576 Several sorted scrub optimizations
#13579 Fix and disable blocks statistics during scrub
#13582 Several B-tree optimizations
#13591 Avoid two 64-bit divisions per scanned block
#13606 Avoid memory copies during mirror scrub
#13613 Avoid memory copy when verifying raidz/draid parity

Obtained from: OpenZFS
OpenZFS commit: cb01da68057dcb9e612e8d2e97d058c46c3574af


# 1f1e2261 23-Jun-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@deb121309

Notable upstream pull request merges:
#12918 Introduce BLAKE3 checksums as an OpenZFS feature
#13553 Reduce ZIO io_lock contention on sorted scrub
#13537 Improve sorted scan memory accounting
#13540 AVL: Remove obsolete branching optimizations
#13563 FreeBSD: Improve crypto_dispatch() handling

Obtained from: OpenZFS
OpenZFS commit: deb1213098e2dc10e6eee5e5c57bb40584e096a6


# da5137ab 28-Mar-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bc3f12bfa (master) into main

Notable upstream pull request merges:
#12083 libzfs: FreeBSD doesn't resize partitions for you
#13106 add physical device size to SIZE column in 'zpool list -v'
#13158 Allow zfs send to exclude datasets
#13190 module: zfs: zio_inject: zio_match_handler: don't << -1
#13219 FreeBSD: add missing replay check to an assert in zfs_xvattr_set
#13220 module: freebsd: avoid a taking a destroyed lock in zfs_zevent bits
#13221 Fix ACL checks for NFS kernel server

Obtained from: OpenZFS
OpenZFS commit: bc3f12bfac152a0c28951cec92340ba14f9ccee9


# e92ffd9b 22-Jan-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@17b2ae0b2 (master) into main

Notable upstream pull request merges:
#12766 Fix error propagation from lzc_send_redacted
#12805 Updated the lz4 decompressor
#12851 FreeBSD: Provide correct file generation number
#12857 Verify dRAID empty sectors
#12874 FreeBSD: Update argument types for VOP_READDIR
#12896 Reduce number of arc_prune threads
#12934 FreeBSD: Fix zvol_*_open() locking
#12947 lz4: Cherrypick fix for CVE-2021-3520
#12961 FreeBSD: Fix leaked strings in libspl mnttab
#12964 Fix handling of errors from dmu_write_uio_dbuf() on FreeBSD
#12981 Introduce a flag to skip comparing the local mac when raw sending
#12985 Avoid memory allocations in the ARC eviction thread

Obtained from: OpenZFS
OpenZFS commit: 17b2ae0b24d487fdda2ef1098ec26fa7f79a61f6


# 681ce946 16-Dec-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f291fa658 (master) into main

Notable upstream pull request merges:
#11711 Vdev Properties Feature
#12717 VOP_RENAME fixes for FreeBSD
#12746 Enable strict hole reporting by default
#12770 ZFS send/recv with ashift 9->12 leads to data corruption
#12828 FreeBSD: Add vop_standard_writecount_nomsyn
#12828 zfs: Fix a deadlock between page busy and the teardown lock
#12828 FreeBSD: Catch up with more VFS changes

Obtained from: OpenZFS
OpenZFS commit: f291fa658efd146540b03ce386133632bde237bf


# 1f88aa09 07-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f3678d70f (master) into main

Notable upstream pull request merges:
#12339 Read past end of argv array in zpool_do_import()
#12365 Fixes in persistent L2ARC
#12383 Fixes for KMSAN reports
#12425 Avoid small buffer copying on write
#12428 Fix unfortunate NULL in spa_update_dspace
#12446 Allow disabling of unmapped I/O on FreeBSD

Obtained from: OpenZFS
OpenZFS commit: f3678d70ff8f98d67caf377ec0326c9a6c7bcf29


# 3f9d360c 22-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@14b43fbd9 (master) into main

Notable upstream pull request merges:
#12271 Tinker with slop space accounting with dedup
#12279 Fix ARC ghost states eviction accounting
#12284 Add Module Parameter Regarding Log Size Limit
#12300 Introduce dsl_dir_diduse_transfer_space()
#12314 Optimize allocation throttling
#12348 Minor ARC optimizations
#12350 Detect HAVE_LARGE_STACKS at compile time
#12356 Use SET_ERROR for more errors in FreeBSD vnops
#12375 FreeBSD: Ignore make_dev_s() errors
#12378 FreeBSD: Switch from MAXPHYS to maxphys on FreeBSD 13+

Obtained from: OpenZFS
OpenZFS commit: 14b43fbd9c13d802409ed886bb6b66fd528fb209


# 7cd22ac4 07-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bdd11cbb9 (master) into main

Notable upstream pull request merges:
#12274 Optimize txg_kick() process
#12281 Move gethrtime() calls out of vdev queue lock
#12287 Remove refcount from spa_config_*(
#12289 Compact dbuf/buf hashes and lock arrays
#12290 Remove avl_size field from struct avl_tree
#12294 Upstream: dmu_zfetch_stream_fini leaks refcount
#12295 Fix abd leak, kmem_free correct size of abd_t
#12328 FreeBSD: Hardcode abd_chunk_size to PAGE_SIZE

Obtained from: OpenZFS
OpenZFS commit: bdd11cbb90a2afa54fd00935ac0d34b4ddf2515c


# 33b8c039 25-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@5e2c8338b (master) into main

Notable upstream pull request merges:
#12183 Optimize small random numbers generation
#12227 Revert Consolidate arc_buf allocation checks
#12266 Fix flag copying in resume case
#12273 zfs_metaslab_mem_limit should be 25 instead of 75
#12276 Update cache file when setting compatibility property
#12280 Help compiller optimize out abd_verify()
#12282 FreeBSD: fix compilation of FreeBSD world after 29274c9f6

Obtained from: OpenZFS
OpenZFS commit: 5e2c8338bf17d31b44eb1dbbb3c9b6a0f64e96ee


# 9db44a8e 13-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9305ff2ed

Notable upstream pull request merges:
#11153 Scalable teardown lock for FreeBSD
#11651 Don't bomb out when using keylocation=file://
#11667 zvol: call zil_replaying() during replay
#11683 abd_get_offset_struct() may allocate new abd
#11693 Intentionally allow ZFS_READONLY in zfs_write
#11716 zpool import cachefile improvements
#11720 FreeBSD: Clean up zfsdev_close to match Linux
#11730 FreeBSD: bring back possibility to rewind the
checkpoint from bootloader

Obtained from: OpenZFS
MFC after: 2 weeks


# caed7b1c 02-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-bedbc13da

Notable upstream commits:
8e43fa12c Fix vdev_rebuild_thread deadlock
03ef8f09e Add missing checks for unsupported features
2e160dee9 Fix assert in FreeBSD-specific dmu_read_pages
bedbc13da Cancel TRIM / initialize on FAULTED non-writeable vdevs

MFC after: 1 week
Obtained from: OpenZFS


# 184c1b94 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-436ab35a5

- speed up writing to ZFS pools without ZIL devices (aa755b3)
- speed up importing ZFS pools (2d8f72d, a0e0199, cf0977a)
...

MFC after: 2 weeks
Reviewed by: mjg (partial)
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D28677


# 7877fdeb 07-Jan-2021 Matt Macy <mmacy@FreeBSD.org>

OpenZFS merge main-gf11b09

- add dRAID support
- fix duplicate close handling
- fix memory leak in prefetch
- fix problem with SIMD benchmarking on FreeBSD boot
...

# c40487d4 01-Oct-2020 Matt Macy <mmacy@FreeBSD.org>

OpenZFS: MFV 2.0-rc3-gfc5966

- Annotate FreeBSD sysctls with CTLFLAG_MPSAFE
- Reduce stack usage of Lua
- Don't save user FPU context in kernel threads
- Add support for procfs_list
- Code cleanup in zio_crypt
- Add DB_RF_NOPREFETCH to dbuf_read()s in dnode.c
- Drop references when skipping dmu_send due to EXDEV
- Eliminate gratuitous bzeroing in dbuf_stats_hash_table_data
- Fix legacy compat for platform IOCs


# eda14cbc 24-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

Initial import from vendor-sys branch of openzfs


# a0b956f5 07-Jul-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@cb01da680

Notable upstream pull request merges:
#12438 Avoid panic with recordsize > 128k, raw sending and no large_blocks
#13015 Fix dnode byteswapping
#13256 Add a "zstream decompress" subcommand
#13555 Scrub mirror children without BPs
#13576 Several sorted scrub optimizations
#13579 Fix and disable blocks statistics during scrub
#13582 Several B-tree optimizations
#13591 Avoid two 64-bit divisions per scanned block
#13606 Avoid memory copies during mirror scrub
#13613 Avoid memory copy when verifying raidz/draid parity

Obtained from: OpenZFS
OpenZFS commit: cb01da68057dcb9e612e8d2e97d058c46c3574af


# 1f1e2261 23-Jun-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@deb121309

Notable upstream pull request merges:
#12918 Introduce BLAKE3 checksums as an OpenZFS feature
#13553 Reduce ZIO io_lock contention on sorted scrub
#13537 Improve sorted scan memory accounting
#13540 AVL: Remove obsolete branching optimizations
#13563 FreeBSD: Improve crypto_dispatch() handling

Obtained from: OpenZFS
OpenZFS commit: deb1213098e2dc10e6eee5e5c57bb40584e096a6


# da5137ab 28-Mar-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bc3f12bfa (master) into main

Notable upstream pull request merges:
#12083 libzfs: FreeBSD doesn't resize partitions for you
#13106 add physical device size to SIZE column in 'zpool list -v'
#13158 Allow zfs send to exclude datasets
#13190 module: zfs: zio_inject: zio_match_handler: don't << -1
#13219 FreeBSD: add missing replay check to an assert in zfs_xvattr_set
#13220 module: freebsd: avoid a taking a destroyed lock in zfs_zevent bits
#13221 Fix ACL checks for NFS kernel server

Obtained from: OpenZFS
OpenZFS commit: bc3f12bfac152a0c28951cec92340ba14f9ccee9


# e92ffd9b 22-Jan-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@17b2ae0b2 (master) into main

Notable upstream pull request merges:
#12766 Fix error propagation from lzc_send_redacted
#12805 Updated the lz4 decompressor
#12851 FreeBSD: Provide correct file generation number
#12857 Verify dRAID empty sectors
#12874 FreeBSD: Update argument types for VOP_READDIR
#12896 Reduce number of arc_prune threads
#12934 FreeBSD: Fix zvol_*_open() locking
#12947 lz4: Cherrypick fix for CVE-2021-3520
#12961 FreeBSD: Fix leaked strings in libspl mnttab
#12964 Fix handling of errors from dmu_write_uio_dbuf() on FreeBSD
#12981 Introduce a flag to skip comparing the local mac when raw sending
#12985 Avoid memory allocations in the ARC eviction thread

Obtained from: OpenZFS
OpenZFS commit: 17b2ae0b24d487fdda2ef1098ec26fa7f79a61f6


# 681ce946 16-Dec-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f291fa658 (master) into main

Notable upstream pull request merges:
#11711 Vdev Properties Feature
#12717 VOP_RENAME fixes for FreeBSD
#12746 Enable strict hole reporting by default
#12770 ZFS send/recv with ashift 9->12 leads to data corruption
#12828 FreeBSD: Add vop_standard_writecount_nomsyn
#12828 zfs: Fix a deadlock between page busy and the teardown lock
#12828 FreeBSD: Catch up with more VFS changes

Obtained from: OpenZFS
OpenZFS commit: f291fa658efd146540b03ce386133632bde237bf


# 1f88aa09 07-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f3678d70f (master) into main

Notable upstream pull request merges:
#12339 Read past end of argv array in zpool_do_import()
#12365 Fixes in persistent L2ARC
#12383 Fixes for KMSAN reports
#12425 Avoid small buffer copying on write
#12428 Fix unfortunate NULL in spa_update_dspace
#12446 Allow disabling of unmapped I/O on FreeBSD

Obtained from: OpenZFS
OpenZFS commit: f3678d70ff8f98d67caf377ec0326c9a6c7bcf29


# 3f9d360c 22-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@14b43fbd9 (master) into main

Notable upstream pull request merges:
#12271 Tinker with slop space accounting with dedup
#12279 Fix ARC ghost states eviction accounting
#12284 Add Module Parameter Regarding Log Size Limit
#12300 Introduce dsl_dir_diduse_transfer_space()
#12314 Optimize allocation throttling
#12348 Minor ARC optimizations
#12350 Detect HAVE_LARGE_STACKS at compile time
#12356 Use SET_ERROR for more errors in FreeBSD vnops
#12375 FreeBSD: Ignore make_dev_s() errors
#12378 FreeBSD: Switch from MAXPHYS to maxphys on FreeBSD 13+

Obtained from: OpenZFS
OpenZFS commit: 14b43fbd9c13d802409ed886bb6b66fd528fb209


# 7cd22ac4 07-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bdd11cbb9 (master) into main

Notable upstream pull request merges:
#12274 Optimize txg_kick() process
#12281 Move gethrtime() calls out of vdev queue lock
#12287 Remove refcount from spa_config_*(
#12289 Compact dbuf/buf hashes and lock arrays
#12290 Remove avl_size field from struct avl_tree
#12294 Upstream: dmu_zfetch_stream_fini leaks refcount
#12295 Fix abd leak, kmem_free correct size of abd_t
#12328 FreeBSD: Hardcode abd_chunk_size to PAGE_SIZE

Obtained from: OpenZFS
OpenZFS commit: bdd11cbb90a2afa54fd00935ac0d34b4ddf2515c


# 33b8c039 25-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@5e2c8338b (master) into main

Notable upstream pull request merges:
#12183 Optimize small random numbers generation
#12227 Revert Consolidate arc_buf allocation checks
#12266 Fix flag copying in resume case
#12273 zfs_metaslab_mem_limit should be 25 instead of 75
#12276 Update cache file when setting compatibility property
#12280 Help compiller optimize out abd_verify()
#12282 FreeBSD: fix compilation of FreeBSD world after 29274c9f6

Obtained from: OpenZFS
OpenZFS commit: 5e2c8338bf17d31b44eb1dbbb3c9b6a0f64e96ee


# 9db44a8e 13-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9305ff2ed

Notable upstream pull request merges:
#11153 Scalable teardown lock for FreeBSD
#11651 Don't bomb out when using keylocation=file://
#11667 zvol: call zil_replaying() during replay
#11683 abd_get_offset_struct() may allocate new abd
#11693 Intentionally allow ZFS_READONLY in zfs_write
#11716 zpool import cachefile improvements
#11720 FreeBSD: Clean up zfsdev_close to match Linux
#11730 FreeBSD: bring back possibility to rewind the
checkpoint from bootloader

Obtained from: OpenZFS
MFC after: 2 weeks


# caed7b1c 02-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-bedbc13da

Notable upstream commits:
8e43fa12c Fix vdev_rebuild_thread deadlock
03ef8f09e Add missing checks for unsupported features
2e160dee9 Fix assert in FreeBSD-specific dmu_read_pages
bedbc13da Cancel TRIM / initialize on FAULTED non-writeable vdevs

MFC after: 1 week
Obtained from: OpenZFS


# 184c1b94 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-436ab35a5

- speed up writing to ZFS pools without ZIL devices (aa755b3)
- speed up importing ZFS pools (2d8f72d, a0e0199, cf0977a)
...

MFC after: 2 weeks
Reviewed by: mjg (partial)
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D28677


# 7877fdeb 07-Jan-2021 Matt Macy <mmacy@FreeBSD.org>

OpenZFS merge main-gf11b09

- add dRAID support
- fix duplicate close handling
- fix memory leak in prefetch
- fix problem with SIMD benchmarking on FreeBSD boot
...

# c40487d4 01-Oct-2020 Matt Macy <mmacy@FreeBSD.org>

OpenZFS: MFV 2.0-rc3-gfc5966

- Annotate FreeBSD sysctls with CTLFLAG_MPSAFE
- Reduce stack usage of Lua
- Don't save user FPU context in kernel threads
- Add support for procfs_list
- Code cleanup in zio_crypt
- Add DB_RF_NOPREFETCH to dbuf_read()s in dnode.c
- Drop references when skipping dmu_send due to EXDEV
- Eliminate gratuitous bzeroing in dbuf_stats_hash_table_data
- Fix legacy compat for platform IOCs


# eda14cbc 24-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

Initial import from vendor-sys branch of openzfs


# 1f1e2261 23-Jun-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@deb121309

Notable upstream pull request merges:
#12918 Introduce BLAKE3 checksums as an OpenZFS feature
#13553 Reduce ZIO io_lock contention on sorted scrub
#13537 Improve sorted scan memory accounting
#13540 AVL: Remove obsolete branching optimizations
#13563 FreeBSD: Improve crypto_dispatch() handling

Obtained from: OpenZFS
OpenZFS commit: deb1213098e2dc10e6eee5e5c57bb40584e096a6


# da5137ab 28-Mar-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bc3f12bfa (master) into main

Notable upstream pull request merges:
#12083 libzfs: FreeBSD doesn't resize partitions for you
#13106 add physical device size to SIZE column in 'zpool list -v'
#13158 Allow zfs send to exclude datasets
#13190 module: zfs: zio_inject: zio_match_handler: don't << -1
#13219 FreeBSD: add missing replay check to an assert in zfs_xvattr_set
#13220 module: freebsd: avoid a taking a destroyed lock in zfs_zevent bits
#13221 Fix ACL checks for NFS kernel server

Obtained from: OpenZFS
OpenZFS commit: bc3f12bfac152a0c28951cec92340ba14f9ccee9


# e92ffd9b 22-Jan-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@17b2ae0b2 (master) into main

Notable upstream pull request merges:
#12766 Fix error propagation from lzc_send_redacted
#12805 Updated the lz4 decompressor
#12851 FreeBSD: Provide correct file generation number
#12857 Verify dRAID empty sectors
#12874 FreeBSD: Update argument types for VOP_READDIR
#12896 Reduce number of arc_prune threads
#12934 FreeBSD: Fix zvol_*_open() locking
#12947 lz4: Cherrypick fix for CVE-2021-3520
#12961 FreeBSD: Fix leaked strings in libspl mnttab
#12964 Fix handling of errors from dmu_write_uio_dbuf() on FreeBSD
#12981 Introduce a flag to skip comparing the local mac when raw sending
#12985 Avoid memory allocations in the ARC eviction thread

Obtained from: OpenZFS
OpenZFS commit: 17b2ae0b24d487fdda2ef1098ec26fa7f79a61f6


# 681ce946 16-Dec-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f291fa658 (master) into main

Notable upstream pull request merges:
#11711 Vdev Properties Feature
#12717 VOP_RENAME fixes for FreeBSD
#12746 Enable strict hole reporting by default
#12770 ZFS send/recv with ashift 9->12 leads to data corruption
#12828 FreeBSD: Add vop_standard_writecount_nomsyn
#12828 zfs: Fix a deadlock between page busy and the teardown lock
#12828 FreeBSD: Catch up with more VFS changes

Obtained from: OpenZFS
OpenZFS commit: f291fa658efd146540b03ce386133632bde237bf


# 1f88aa09 07-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f3678d70f (master) into main

Notable upstream pull request merges:
#12339 Read past end of argv array in zpool_do_import()
#12365 Fixes in persistent L2ARC
#12383 Fixes for KMSAN reports
#12425 Avoid small buffer copying on write
#12428 Fix unfortunate NULL in spa_update_dspace
#12446 Allow disabling of unmapped I/O on FreeBSD

Obtained from: OpenZFS
OpenZFS commit: f3678d70ff8f98d67caf377ec0326c9a6c7bcf29


# 3f9d360c 22-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@14b43fbd9 (master) into main

Notable upstream pull request merges:
#12271 Tinker with slop space accounting with dedup
#12279 Fix ARC ghost states eviction accounting
#12284 Add Module Parameter Regarding Log Size Limit
#12300 Introduce dsl_dir_diduse_transfer_space()
#12314 Optimize allocation throttling
#12348 Minor ARC optimizations
#12350 Detect HAVE_LARGE_STACKS at compile time
#12356 Use SET_ERROR for more errors in FreeBSD vnops
#12375 FreeBSD: Ignore make_dev_s() errors
#12378 FreeBSD: Switch from MAXPHYS to maxphys on FreeBSD 13+

Obtained from: OpenZFS
OpenZFS commit: 14b43fbd9c13d802409ed886bb6b66fd528fb209


# 7cd22ac4 07-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bdd11cbb9 (master) into main

Notable upstream pull request merges:
#12274 Optimize txg_kick() process
#12281 Move gethrtime() calls out of vdev queue lock
#12287 Remove refcount from spa_config_*(
#12289 Compact dbuf/buf hashes and lock arrays
#12290 Remove avl_size field from struct avl_tree
#12294 Upstream: dmu_zfetch_stream_fini leaks refcount
#12295 Fix abd leak, kmem_free correct size of abd_t
#12328 FreeBSD: Hardcode abd_chunk_size to PAGE_SIZE

Obtained from: OpenZFS
OpenZFS commit: bdd11cbb90a2afa54fd00935ac0d34b4ddf2515c


# 33b8c039 25-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@5e2c8338b (master) into main

Notable upstream pull request merges:
#12183 Optimize small random numbers generation
#12227 Revert Consolidate arc_buf allocation checks
#12266 Fix flag copying in resume case
#12273 zfs_metaslab_mem_limit should be 25 instead of 75
#12276 Update cache file when setting compatibility property
#12280 Help compiller optimize out abd_verify()
#12282 FreeBSD: fix compilation of FreeBSD world after 29274c9f6

Obtained from: OpenZFS
OpenZFS commit: 5e2c8338bf17d31b44eb1dbbb3c9b6a0f64e96ee


# 9db44a8e 13-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9305ff2ed

Notable upstream pull request merges:
#11153 Scalable teardown lock for FreeBSD
#11651 Don't bomb out when using keylocation=file://
#11667 zvol: call zil_replaying() during replay
#11683 abd_get_offset_struct() may allocate new abd
#11693 Intentionally allow ZFS_READONLY in zfs_write
#11716 zpool import cachefile improvements
#11720 FreeBSD: Clean up zfsdev_close to match Linux
#11730 FreeBSD: bring back possibility to rewind the
checkpoint from bootloader

Obtained from: OpenZFS
MFC after: 2 weeks


# caed7b1c 02-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-bedbc13da

Notable upstream commits:
8e43fa12c Fix vdev_rebuild_thread deadlock
03ef8f09e Add missing checks for unsupported features
2e160dee9 Fix assert in FreeBSD-specific dmu_read_pages
bedbc13da Cancel TRIM / initialize on FAULTED non-writeable vdevs

MFC after: 1 week
Obtained from: OpenZFS


# 184c1b94 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-436ab35a5

- speed up writing to ZFS pools without ZIL devices (aa755b3)
- speed up importing ZFS pools (2d8f72d, a0e0199, cf0977a)
...

MFC after: 2 weeks
Reviewed by: mjg (partial)
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D28677


# 7877fdeb 07-Jan-2021 Matt Macy <mmacy@FreeBSD.org>

OpenZFS merge main-gf11b09

- add dRAID support
- fix duplicate close handling
- fix memory leak in prefetch
- fix problem with SIMD benchmarking on FreeBSD boot
...

# c40487d4 01-Oct-2020 Matt Macy <mmacy@FreeBSD.org>

OpenZFS: MFV 2.0-rc3-gfc5966

- Annotate FreeBSD sysctls with CTLFLAG_MPSAFE
- Reduce stack usage of Lua
- Don't save user FPU context in kernel threads
- Add support for procfs_list
- Code cleanup in zio_crypt
- Add DB_RF_NOPREFETCH to dbuf_read()s in dnode.c
- Drop references when skipping dmu_send due to EXDEV
- Eliminate gratuitous bzeroing in dbuf_stats_hash_table_data
- Fix legacy compat for platform IOCs


# eda14cbc 24-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

Initial import from vendor-sys branch of openzfs


# da5137ab 28-Mar-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bc3f12bfa (master) into main

Notable upstream pull request merges:
#12083 libzfs: FreeBSD doesn't resize partitions for you
#13106 add physical device size to SIZE column in 'zpool list -v'
#13158 Allow zfs send to exclude datasets
#13190 module: zfs: zio_inject: zio_match_handler: don't << -1
#13219 FreeBSD: add missing replay check to an assert in zfs_xvattr_set
#13220 module: freebsd: avoid a taking a destroyed lock in zfs_zevent bits
#13221 Fix ACL checks for NFS kernel server

Obtained from: OpenZFS
OpenZFS commit: bc3f12bfac152a0c28951cec92340ba14f9ccee9


# e92ffd9b 22-Jan-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@17b2ae0b2 (master) into main

Notable upstream pull request merges:
#12766 Fix error propagation from lzc_send_redacted
#12805 Updated the lz4 decompressor
#12851 FreeBSD: Provide correct file generation number
#12857 Verify dRAID empty sectors
#12874 FreeBSD: Update argument types for VOP_READDIR
#12896 Reduce number of arc_prune threads
#12934 FreeBSD: Fix zvol_*_open() locking
#12947 lz4: Cherrypick fix for CVE-2021-3520
#12961 FreeBSD: Fix leaked strings in libspl mnttab
#12964 Fix handling of errors from dmu_write_uio_dbuf() on FreeBSD
#12981 Introduce a flag to skip comparing the local mac when raw sending
#12985 Avoid memory allocations in the ARC eviction thread

Obtained from: OpenZFS
OpenZFS commit: 17b2ae0b24d487fdda2ef1098ec26fa7f79a61f6


# 681ce946 16-Dec-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f291fa658 (master) into main

Notable upstream pull request merges:
#11711 Vdev Properties Feature
#12717 VOP_RENAME fixes for FreeBSD
#12746 Enable strict hole reporting by default
#12770 ZFS send/recv with ashift 9->12 leads to data corruption
#12828 FreeBSD: Add vop_standard_writecount_nomsyn
#12828 zfs: Fix a deadlock between page busy and the teardown lock
#12828 FreeBSD: Catch up with more VFS changes

Obtained from: OpenZFS
OpenZFS commit: f291fa658efd146540b03ce386133632bde237bf


# 1f88aa09 07-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f3678d70f (master) into main

Notable upstream pull request merges:
#12339 Read past end of argv array in zpool_do_import()
#12365 Fixes in persistent L2ARC
#12383 Fixes for KMSAN reports
#12425 Avoid small buffer copying on write
#12428 Fix unfortunate NULL in spa_update_dspace
#12446 Allow disabling of unmapped I/O on FreeBSD

Obtained from: OpenZFS
OpenZFS commit: f3678d70ff8f98d67caf377ec0326c9a6c7bcf29


# 3f9d360c 22-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@14b43fbd9 (master) into main

Notable upstream pull request merges:
#12271 Tinker with slop space accounting with dedup
#12279 Fix ARC ghost states eviction accounting
#12284 Add Module Parameter Regarding Log Size Limit
#12300 Introduce dsl_dir_diduse_transfer_space()
#12314 Optimize allocation throttling
#12348 Minor ARC optimizations
#12350 Detect HAVE_LARGE_STACKS at compile time
#12356 Use SET_ERROR for more errors in FreeBSD vnops
#12375 FreeBSD: Ignore make_dev_s() errors
#12378 FreeBSD: Switch from MAXPHYS to maxphys on FreeBSD 13+

Obtained from: OpenZFS
OpenZFS commit: 14b43fbd9c13d802409ed886bb6b66fd528fb209


# 7cd22ac4 07-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bdd11cbb9 (master) into main

Notable upstream pull request merges:
#12274 Optimize txg_kick() process
#12281 Move gethrtime() calls out of vdev queue lock
#12287 Remove refcount from spa_config_*(
#12289 Compact dbuf/buf hashes and lock arrays
#12290 Remove avl_size field from struct avl_tree
#12294 Upstream: dmu_zfetch_stream_fini leaks refcount
#12295 Fix abd leak, kmem_free correct size of abd_t
#12328 FreeBSD: Hardcode abd_chunk_size to PAGE_SIZE

Obtained from: OpenZFS
OpenZFS commit: bdd11cbb90a2afa54fd00935ac0d34b4ddf2515c


# 33b8c039 25-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@5e2c8338b (master) into main

Notable upstream pull request merges:
#12183 Optimize small random numbers generation
#12227 Revert Consolidate arc_buf allocation checks
#12266 Fix flag copying in resume case
#12273 zfs_metaslab_mem_limit should be 25 instead of 75
#12276 Update cache file when setting compatibility property
#12280 Help compiller optimize out abd_verify()
#12282 FreeBSD: fix compilation of FreeBSD world after 29274c9f6

Obtained from: OpenZFS
OpenZFS commit: 5e2c8338bf17d31b44eb1dbbb3c9b6a0f64e96ee


# 9db44a8e 13-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9305ff2ed

Notable upstream pull request merges:
#11153 Scalable teardown lock for FreeBSD
#11651 Don't bomb out when using keylocation=file://
#11667 zvol: call zil_replaying() during replay
#11683 abd_get_offset_struct() may allocate new abd
#11693 Intentionally allow ZFS_READONLY in zfs_write
#11716 zpool import cachefile improvements
#11720 FreeBSD: Clean up zfsdev_close to match Linux
#11730 FreeBSD: bring back possibility to rewind the
checkpoint from bootloader

Obtained from: OpenZFS
MFC after: 2 weeks


# caed7b1c 02-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-bedbc13da

Notable upstream commits:
8e43fa12c Fix vdev_rebuild_thread deadlock
03ef8f09e Add missing checks for unsupported features
2e160dee9 Fix assert in FreeBSD-specific dmu_read_pages
bedbc13da Cancel TRIM / initialize on FAULTED non-writeable vdevs

MFC after: 1 week
Obtained from: OpenZFS


# 184c1b94 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-436ab35a5

- speed up writing to ZFS pools without ZIL devices (aa755b3)
- speed up importing ZFS pools (2d8f72d, a0e0199, cf0977a)
...

MFC after: 2 weeks
Reviewed by: mjg (partial)
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D28677


# 7877fdeb 07-Jan-2021 Matt Macy <mmacy@FreeBSD.org>

OpenZFS merge main-gf11b09

- add dRAID support
- fix duplicate close handling
- fix memory leak in prefetch
- fix problem with SIMD benchmarking on FreeBSD boot
...

# c40487d4 01-Oct-2020 Matt Macy <mmacy@FreeBSD.org>

OpenZFS: MFV 2.0-rc3-gfc5966

- Annotate FreeBSD sysctls with CTLFLAG_MPSAFE
- Reduce stack usage of Lua
- Don't save user FPU context in kernel threads
- Add support for procfs_list
- Code cleanup in zio_crypt
- Add DB_RF_NOPREFETCH to dbuf_read()s in dnode.c
- Drop references when skipping dmu_send due to EXDEV
- Eliminate gratuitous bzeroing in dbuf_stats_hash_table_data
- Fix legacy compat for platform IOCs


# eda14cbc 24-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

Initial import from vendor-sys branch of openzfs


# e92ffd9b 22-Jan-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@17b2ae0b2 (master) into main

Notable upstream pull request merges:
#12766 Fix error propagation from lzc_send_redacted
#12805 Updated the lz4 decompressor
#12851 FreeBSD: Provide correct file generation number
#12857 Verify dRAID empty sectors
#12874 FreeBSD: Update argument types for VOP_READDIR
#12896 Reduce number of arc_prune threads
#12934 FreeBSD: Fix zvol_*_open() locking
#12947 lz4: Cherrypick fix for CVE-2021-3520
#12961 FreeBSD: Fix leaked strings in libspl mnttab
#12964 Fix handling of errors from dmu_write_uio_dbuf() on FreeBSD
#12981 Introduce a flag to skip comparing the local mac when raw sending
#12985 Avoid memory allocations in the ARC eviction thread

Obtained from: OpenZFS
OpenZFS commit: 17b2ae0b24d487fdda2ef1098ec26fa7f79a61f6


# 681ce946 16-Dec-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f291fa658 (master) into main

Notable upstream pull request merges:
#11711 Vdev Properties Feature
#12717 VOP_RENAME fixes for FreeBSD
#12746 Enable strict hole reporting by default
#12770 ZFS send/recv with ashift 9->12 leads to data corruption
#12828 FreeBSD: Add vop_standard_writecount_nomsyn
#12828 zfs: Fix a deadlock between page busy and the teardown lock
#12828 FreeBSD: Catch up with more VFS changes

Obtained from: OpenZFS
OpenZFS commit: f291fa658efd146540b03ce386133632bde237bf


# 1f88aa09 07-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f3678d70f (master) into main

Notable upstream pull request merges:
#12339 Read past end of argv array in zpool_do_import()
#12365 Fixes in persistent L2ARC
#12383 Fixes for KMSAN reports
#12425 Avoid small buffer copying on write
#12428 Fix unfortunate NULL in spa_update_dspace
#12446 Allow disabling of unmapped I/O on FreeBSD

Obtained from: OpenZFS
OpenZFS commit: f3678d70ff8f98d67caf377ec0326c9a6c7bcf29


# 3f9d360c 22-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@14b43fbd9 (master) into main

Notable upstream pull request merges:
#12271 Tinker with slop space accounting with dedup
#12279 Fix ARC ghost states eviction accounting
#12284 Add Module Parameter Regarding Log Size Limit
#12300 Introduce dsl_dir_diduse_transfer_space()
#12314 Optimize allocation throttling
#12348 Minor ARC optimizations
#12350 Detect HAVE_LARGE_STACKS at compile time
#12356 Use SET_ERROR for more errors in FreeBSD vnops
#12375 FreeBSD: Ignore make_dev_s() errors
#12378 FreeBSD: Switch from MAXPHYS to maxphys on FreeBSD 13+

Obtained from: OpenZFS
OpenZFS commit: 14b43fbd9c13d802409ed886bb6b66fd528fb209


# 7cd22ac4 07-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bdd11cbb9 (master) into main

Notable upstream pull request merges:
#12274 Optimize txg_kick() process
#12281 Move gethrtime() calls out of vdev queue lock
#12287 Remove refcount from spa_config_*(
#12289 Compact dbuf/buf hashes and lock arrays
#12290 Remove avl_size field from struct avl_tree
#12294 Upstream: dmu_zfetch_stream_fini leaks refcount
#12295 Fix abd leak, kmem_free correct size of abd_t
#12328 FreeBSD: Hardcode abd_chunk_size to PAGE_SIZE

Obtained from: OpenZFS
OpenZFS commit: bdd11cbb90a2afa54fd00935ac0d34b4ddf2515c


# 33b8c039 25-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@5e2c8338b (master) into main

Notable upstream pull request merges:
#12183 Optimize small random numbers generation
#12227 Revert Consolidate arc_buf allocation checks
#12266 Fix flag copying in resume case
#12273 zfs_metaslab_mem_limit should be 25 instead of 75
#12276 Update cache file when setting compatibility property
#12280 Help compiller optimize out abd_verify()
#12282 FreeBSD: fix compilation of FreeBSD world after 29274c9f6

Obtained from: OpenZFS
OpenZFS commit: 5e2c8338bf17d31b44eb1dbbb3c9b6a0f64e96ee


# 9db44a8e 13-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9305ff2ed

Notable upstream pull request merges:
#11153 Scalable teardown lock for FreeBSD
#11651 Don't bomb out when using keylocation=file://
#11667 zvol: call zil_replaying() during replay
#11683 abd_get_offset_struct() may allocate new abd
#11693 Intentionally allow ZFS_READONLY in zfs_write
#11716 zpool import cachefile improvements
#11720 FreeBSD: Clean up zfsdev_close to match Linux
#11730 FreeBSD: bring back possibility to rewind the
checkpoint from bootloader

Obtained from: OpenZFS
MFC after: 2 weeks


# caed7b1c 02-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-bedbc13da

Notable upstream commits:
8e43fa12c Fix vdev_rebuild_thread deadlock
03ef8f09e Add missing checks for unsupported features
2e160dee9 Fix assert in FreeBSD-specific dmu_read_pages
bedbc13da Cancel TRIM / initialize on FAULTED non-writeable vdevs

MFC after: 1 week
Obtained from: OpenZFS


# 184c1b94 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-436ab35a5

- speed up writing to ZFS pools without ZIL devices (aa755b3)
- speed up importing ZFS pools (2d8f72d, a0e0199, cf0977a)
...

MFC after: 2 weeks
Reviewed by: mjg (partial)
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D28677


# 7877fdeb 07-Jan-2021 Matt Macy <mmacy@FreeBSD.org>

OpenZFS merge main-gf11b09

- add dRAID support
- fix duplicate close handling
- fix memory leak in prefetch
- fix problem with SIMD benchmarking on FreeBSD boot
...

# c40487d4 01-Oct-2020 Matt Macy <mmacy@FreeBSD.org>

OpenZFS: MFV 2.0-rc3-gfc5966

- Annotate FreeBSD sysctls with CTLFLAG_MPSAFE
- Reduce stack usage of Lua
- Don't save user FPU context in kernel threads
- Add support for procfs_list
- Code cleanup in zio_crypt
- Add DB_RF_NOPREFETCH to dbuf_read()s in dnode.c
- Drop references when skipping dmu_send due to EXDEV
- Eliminate gratuitous bzeroing in dbuf_stats_hash_table_data
- Fix legacy compat for platform IOCs


# eda14cbc 24-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

Initial import from vendor-sys branch of openzfs


# 681ce946 16-Dec-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f291fa658 (master) into main

Notable upstream pull request merges:
#11711 Vdev Properties Feature
#12717 VOP_RENAME fixes for FreeBSD
#12746 Enable strict hole reporting by default
#12770 ZFS send/recv with ashift 9->12 leads to data corruption
#12828 FreeBSD: Add vop_standard_writecount_nomsyn
#12828 zfs: Fix a deadlock between page busy and the teardown lock
#12828 FreeBSD: Catch up with more VFS changes

Obtained from: OpenZFS
OpenZFS commit: f291fa658efd146540b03ce386133632bde237bf


# 1f88aa09 07-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f3678d70f (master) into main

Notable upstream pull request merges:
#12339 Read past end of argv array in zpool_do_import()
#12365 Fixes in persistent L2ARC
#12383 Fixes for KMSAN reports
#12425 Avoid small buffer copying on write
#12428 Fix unfortunate NULL in spa_update_dspace
#12446 Allow disabling of unmapped I/O on FreeBSD

Obtained from: OpenZFS
OpenZFS commit: f3678d70ff8f98d67caf377ec0326c9a6c7bcf29


# 3f9d360c 22-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@14b43fbd9 (master) into main

Notable upstream pull request merges:
#12271 Tinker with slop space accounting with dedup
#12279 Fix ARC ghost states eviction accounting
#12284 Add Module Parameter Regarding Log Size Limit
#12300 Introduce dsl_dir_diduse_transfer_space()
#12314 Optimize allocation throttling
#12348 Minor ARC optimizations
#12350 Detect HAVE_LARGE_STACKS at compile time
#12356 Use SET_ERROR for more errors in FreeBSD vnops
#12375 FreeBSD: Ignore make_dev_s() errors
#12378 FreeBSD: Switch from MAXPHYS to maxphys on FreeBSD 13+

Obtained from: OpenZFS
OpenZFS commit: 14b43fbd9c13d802409ed886bb6b66fd528fb209


# 7cd22ac4 07-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bdd11cbb9 (master) into main

Notable upstream pull request merges:
#12274 Optimize txg_kick() process
#12281 Move gethrtime() calls out of vdev queue lock
#12287 Remove refcount from spa_config_*(
#12289 Compact dbuf/buf hashes and lock arrays
#12290 Remove avl_size field from struct avl_tree
#12294 Upstream: dmu_zfetch_stream_fini leaks refcount
#12295 Fix abd leak, kmem_free correct size of abd_t
#12328 FreeBSD: Hardcode abd_chunk_size to PAGE_SIZE

Obtained from: OpenZFS
OpenZFS commit: bdd11cbb90a2afa54fd00935ac0d34b4ddf2515c


# 33b8c039 25-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@5e2c8338b (master) into main

Notable upstream pull request merges:
#12183 Optimize small random numbers generation
#12227 Revert Consolidate arc_buf allocation checks
#12266 Fix flag copying in resume case
#12273 zfs_metaslab_mem_limit should be 25 instead of 75
#12276 Update cache file when setting compatibility property
#12280 Help compiller optimize out abd_verify()
#12282 FreeBSD: fix compilation of FreeBSD world after 29274c9f6

Obtained from: OpenZFS
OpenZFS commit: 5e2c8338bf17d31b44eb1dbbb3c9b6a0f64e96ee


# 9db44a8e 13-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9305ff2ed

Notable upstream pull request merges:
#11153 Scalable teardown lock for FreeBSD
#11651 Don't bomb out when using keylocation=file://
#11667 zvol: call zil_replaying() during replay
#11683 abd_get_offset_struct() may allocate new abd
#11693 Intentionally allow ZFS_READONLY in zfs_write
#11716 zpool import cachefile improvements
#11720 FreeBSD: Clean up zfsdev_close to match Linux
#11730 FreeBSD: bring back possibility to rewind the
checkpoint from bootloader

Obtained from: OpenZFS
MFC after: 2 weeks


# caed7b1c 02-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-bedbc13da

Notable upstream commits:
8e43fa12c Fix vdev_rebuild_thread deadlock
03ef8f09e Add missing checks for unsupported features
2e160dee9 Fix assert in FreeBSD-specific dmu_read_pages
bedbc13da Cancel TRIM / initialize on FAULTED non-writeable vdevs

MFC after: 1 week
Obtained from: OpenZFS


# 184c1b94 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-436ab35a5

- speed up writing to ZFS pools without ZIL devices (aa755b3)
- speed up importing ZFS pools (2d8f72d, a0e0199, cf0977a)
...

MFC after: 2 weeks
Reviewed by: mjg (partial)
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D28677


# 7877fdeb 07-Jan-2021 Matt Macy <mmacy@FreeBSD.org>

OpenZFS merge main-gf11b09

- add dRAID support
- fix duplicate close handling
- fix memory leak in prefetch
- fix problem with SIMD benchmarking on FreeBSD boot
...

# c40487d4 01-Oct-2020 Matt Macy <mmacy@FreeBSD.org>

OpenZFS: MFV 2.0-rc3-gfc5966

- Annotate FreeBSD sysctls with CTLFLAG_MPSAFE
- Reduce stack usage of Lua
- Don't save user FPU context in kernel threads
- Add support for procfs_list
- Code cleanup in zio_crypt
- Add DB_RF_NOPREFETCH to dbuf_read()s in dnode.c
- Drop references when skipping dmu_send due to EXDEV
- Eliminate gratuitous bzeroing in dbuf_stats_hash_table_data
- Fix legacy compat for platform IOCs


# eda14cbc 24-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

Initial import from vendor-sys branch of openzfs


# 1f88aa09 07-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@f3678d70f (master) into main

Notable upstream pull request merges:
#12339 Read past end of argv array in zpool_do_import()
#12365 Fixes in persistent L2ARC
#12383 Fixes for KMSAN reports
#12425 Avoid small buffer copying on write
#12428 Fix unfortunate NULL in spa_update_dspace
#12446 Allow disabling of unmapped I/O on FreeBSD

Obtained from: OpenZFS
OpenZFS commit: f3678d70ff8f98d67caf377ec0326c9a6c7bcf29


# 3f9d360c 22-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@14b43fbd9 (master) into main

Notable upstream pull request merges:
#12271 Tinker with slop space accounting with dedup
#12279 Fix ARC ghost states eviction accounting
#12284 Add Module Parameter Regarding Log Size Limit
#12300 Introduce dsl_dir_diduse_transfer_space()
#12314 Optimize allocation throttling
#12348 Minor ARC optimizations
#12350 Detect HAVE_LARGE_STACKS at compile time
#12356 Use SET_ERROR for more errors in FreeBSD vnops
#12375 FreeBSD: Ignore make_dev_s() errors
#12378 FreeBSD: Switch from MAXPHYS to maxphys on FreeBSD 13+

Obtained from: OpenZFS
OpenZFS commit: 14b43fbd9c13d802409ed886bb6b66fd528fb209


# 7cd22ac4 07-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bdd11cbb9 (master) into main

Notable upstream pull request merges:
#12274 Optimize txg_kick() process
#12281 Move gethrtime() calls out of vdev queue lock
#12287 Remove refcount from spa_config_*(
#12289 Compact dbuf/buf hashes and lock arrays
#12290 Remove avl_size field from struct avl_tree
#12294 Upstream: dmu_zfetch_stream_fini leaks refcount
#12295 Fix abd leak, kmem_free correct size of abd_t
#12328 FreeBSD: Hardcode abd_chunk_size to PAGE_SIZE

Obtained from: OpenZFS
OpenZFS commit: bdd11cbb90a2afa54fd00935ac0d34b4ddf2515c


# 33b8c039 25-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@5e2c8338b (master) into main

Notable upstream pull request merges:
#12183 Optimize small random numbers generation
#12227 Revert Consolidate arc_buf allocation checks
#12266 Fix flag copying in resume case
#12273 zfs_metaslab_mem_limit should be 25 instead of 75
#12276 Update cache file when setting compatibility property
#12280 Help compiller optimize out abd_verify()
#12282 FreeBSD: fix compilation of FreeBSD world after 29274c9f6

Obtained from: OpenZFS
OpenZFS commit: 5e2c8338bf17d31b44eb1dbbb3c9b6a0f64e96ee


# 9db44a8e 13-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9305ff2ed

Notable upstream pull request merges:
#11153 Scalable teardown lock for FreeBSD
#11651 Don't bomb out when using keylocation=file://
#11667 zvol: call zil_replaying() during replay
#11683 abd_get_offset_struct() may allocate new abd
#11693 Intentionally allow ZFS_READONLY in zfs_write
#11716 zpool import cachefile improvements
#11720 FreeBSD: Clean up zfsdev_close to match Linux
#11730 FreeBSD: bring back possibility to rewind the
checkpoint from bootloader

Obtained from: OpenZFS
MFC after: 2 weeks


# caed7b1c 02-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-bedbc13da

Notable upstream commits:
8e43fa12c Fix vdev_rebuild_thread deadlock
03ef8f09e Add missing checks for unsupported features
2e160dee9 Fix assert in FreeBSD-specific dmu_read_pages
bedbc13da Cancel TRIM / initialize on FAULTED non-writeable vdevs

MFC after: 1 week
Obtained from: OpenZFS


# 184c1b94 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-436ab35a5

- speed up writing to ZFS pools without ZIL devices (aa755b3)
- speed up importing ZFS pools (2d8f72d, a0e0199, cf0977a)
...

MFC after: 2 weeks
Reviewed by: mjg (partial)
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D28677


# 7877fdeb 07-Jan-2021 Matt Macy <mmacy@FreeBSD.org>

OpenZFS merge main-gf11b09

- add dRAID support
- fix duplicate close handling
- fix memory leak in prefetch
- fix problem with SIMD benchmarking on FreeBSD boot
...

# c40487d4 01-Oct-2020 Matt Macy <mmacy@FreeBSD.org>

OpenZFS: MFV 2.0-rc3-gfc5966

- Annotate FreeBSD sysctls with CTLFLAG_MPSAFE
- Reduce stack usage of Lua
- Don't save user FPU context in kernel threads
- Add support for procfs_list
- Code cleanup in zio_crypt
- Add DB_RF_NOPREFETCH to dbuf_read()s in dnode.c
- Drop references when skipping dmu_send due to EXDEV
- Eliminate gratuitous bzeroing in dbuf_stats_hash_table_data
- Fix legacy compat for platform IOCs


# eda14cbc 24-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

Initial import from vendor-sys branch of openzfs


# 3f9d360c 22-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@14b43fbd9 (master) into main

Notable upstream pull request merges:
#12271 Tinker with slop space accounting with dedup
#12279 Fix ARC ghost states eviction accounting
#12284 Add Module Parameter Regarding Log Size Limit
#12300 Introduce dsl_dir_diduse_transfer_space()
#12314 Optimize allocation throttling
#12348 Minor ARC optimizations
#12350 Detect HAVE_LARGE_STACKS at compile time
#12356 Use SET_ERROR for more errors in FreeBSD vnops
#12375 FreeBSD: Ignore make_dev_s() errors
#12378 FreeBSD: Switch from MAXPHYS to maxphys on FreeBSD 13+

Obtained from: OpenZFS
OpenZFS commit: 14b43fbd9c13d802409ed886bb6b66fd528fb209


# 7cd22ac4 07-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bdd11cbb9 (master) into main

Notable upstream pull request merges:
#12274 Optimize txg_kick() process
#12281 Move gethrtime() calls out of vdev queue lock
#12287 Remove refcount from spa_config_*(
#12289 Compact dbuf/buf hashes and lock arrays
#12290 Remove avl_size field from struct avl_tree
#12294 Upstream: dmu_zfetch_stream_fini leaks refcount
#12295 Fix abd leak, kmem_free correct size of abd_t
#12328 FreeBSD: Hardcode abd_chunk_size to PAGE_SIZE

Obtained from: OpenZFS
OpenZFS commit: bdd11cbb90a2afa54fd00935ac0d34b4ddf2515c


# 33b8c039 25-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@5e2c8338b (master) into main

Notable upstream pull request merges:
#12183 Optimize small random numbers generation
#12227 Revert Consolidate arc_buf allocation checks
#12266 Fix flag copying in resume case
#12273 zfs_metaslab_mem_limit should be 25 instead of 75
#12276 Update cache file when setting compatibility property
#12280 Help compiller optimize out abd_verify()
#12282 FreeBSD: fix compilation of FreeBSD world after 29274c9f6

Obtained from: OpenZFS
OpenZFS commit: 5e2c8338bf17d31b44eb1dbbb3c9b6a0f64e96ee


# 9db44a8e 13-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9305ff2ed

Notable upstream pull request merges:
#11153 Scalable teardown lock for FreeBSD
#11651 Don't bomb out when using keylocation=file://
#11667 zvol: call zil_replaying() during replay
#11683 abd_get_offset_struct() may allocate new abd
#11693 Intentionally allow ZFS_READONLY in zfs_write
#11716 zpool import cachefile improvements
#11720 FreeBSD: Clean up zfsdev_close to match Linux
#11730 FreeBSD: bring back possibility to rewind the
checkpoint from bootloader

Obtained from: OpenZFS
MFC after: 2 weeks


# caed7b1c 02-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-bedbc13da

Notable upstream commits:
8e43fa12c Fix vdev_rebuild_thread deadlock
03ef8f09e Add missing checks for unsupported features
2e160dee9 Fix assert in FreeBSD-specific dmu_read_pages
bedbc13da Cancel TRIM / initialize on FAULTED non-writeable vdevs

MFC after: 1 week
Obtained from: OpenZFS


# 184c1b94 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-436ab35a5

- speed up writing to ZFS pools without ZIL devices (aa755b3)
- speed up importing ZFS pools (2d8f72d, a0e0199, cf0977a)
...

MFC after: 2 weeks
Reviewed by: mjg (partial)
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D28677


# 7877fdeb 07-Jan-2021 Matt Macy <mmacy@FreeBSD.org>

OpenZFS merge main-gf11b09

- add dRAID support
- fix duplicate close handling
- fix memory leak in prefetch
- fix problem with SIMD benchmarking on FreeBSD boot
...

# c40487d4 01-Oct-2020 Matt Macy <mmacy@FreeBSD.org>

OpenZFS: MFV 2.0-rc3-gfc5966

- Annotate FreeBSD sysctls with CTLFLAG_MPSAFE
- Reduce stack usage of Lua
- Don't save user FPU context in kernel threads
- Add support for procfs_list
- Code cleanup in zio_crypt
- Add DB_RF_NOPREFETCH to dbuf_read()s in dnode.c
- Drop references when skipping dmu_send due to EXDEV
- Eliminate gratuitous bzeroing in dbuf_stats_hash_table_data
- Fix legacy compat for platform IOCs


# eda14cbc 24-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

Initial import from vendor-sys branch of openzfs


# 7cd22ac4 07-Jul-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@bdd11cbb9 (master) into main

Notable upstream pull request merges:
#12274 Optimize txg_kick() process
#12281 Move gethrtime() calls out of vdev queue lock
#12287 Remove refcount from spa_config_*(
#12289 Compact dbuf/buf hashes and lock arrays
#12290 Remove avl_size field from struct avl_tree
#12294 Upstream: dmu_zfetch_stream_fini leaks refcount
#12295 Fix abd leak, kmem_free correct size of abd_t
#12328 FreeBSD: Hardcode abd_chunk_size to PAGE_SIZE

Obtained from: OpenZFS
OpenZFS commit: bdd11cbb90a2afa54fd00935ac0d34b4ddf2515c


# 33b8c039 25-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@5e2c8338b (master) into main

Notable upstream pull request merges:
#12183 Optimize small random numbers generation
#12227 Revert Consolidate arc_buf allocation checks
#12266 Fix flag copying in resume case
#12273 zfs_metaslab_mem_limit should be 25 instead of 75
#12276 Update cache file when setting compatibility property
#12280 Help compiller optimize out abd_verify()
#12282 FreeBSD: fix compilation of FreeBSD world after 29274c9f6

Obtained from: OpenZFS
OpenZFS commit: 5e2c8338bf17d31b44eb1dbbb3c9b6a0f64e96ee


# 9db44a8e 13-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9305ff2ed

Notable upstream pull request merges:
#11153 Scalable teardown lock for FreeBSD
#11651 Don't bomb out when using keylocation=file://
#11667 zvol: call zil_replaying() during replay
#11683 abd_get_offset_struct() may allocate new abd
#11693 Intentionally allow ZFS_READONLY in zfs_write
#11716 zpool import cachefile improvements
#11720 FreeBSD: Clean up zfsdev_close to match Linux
#11730 FreeBSD: bring back possibility to rewind the
checkpoint from bootloader

Obtained from: OpenZFS
MFC after: 2 weeks


# caed7b1c 02-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-bedbc13da

Notable upstream commits:
8e43fa12c Fix vdev_rebuild_thread deadlock
03ef8f09e Add missing checks for unsupported features
2e160dee9 Fix assert in FreeBSD-specific dmu_read_pages
bedbc13da Cancel TRIM / initialize on FAULTED non-writeable vdevs

MFC after: 1 week
Obtained from: OpenZFS


# 184c1b94 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-436ab35a5

- speed up writing to ZFS pools without ZIL devices (aa755b3)
- speed up importing ZFS pools (2d8f72d, a0e0199, cf0977a)
...

MFC after: 2 weeks
Reviewed by: mjg (partial)
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D28677


# 7877fdeb 07-Jan-2021 Matt Macy <mmacy@FreeBSD.org>

OpenZFS merge main-gf11b09

- add dRAID support
- fix duplicate close handling
- fix memory leak in prefetch
- fix problem with SIMD benchmarking on FreeBSD boot
...

# c40487d4 01-Oct-2020 Matt Macy <mmacy@FreeBSD.org>

OpenZFS: MFV 2.0-rc3-gfc5966

- Annotate FreeBSD sysctls with CTLFLAG_MPSAFE
- Reduce stack usage of Lua
- Don't save user FPU context in kernel threads
- Add support for procfs_list
- Code cleanup in zio_crypt
- Add DB_RF_NOPREFETCH to dbuf_read()s in dnode.c
- Drop references when skipping dmu_send due to EXDEV
- Eliminate gratuitous bzeroing in dbuf_stats_hash_table_data
- Fix legacy compat for platform IOCs


# eda14cbc 24-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

Initial import from vendor-sys branch of openzfs


# 33b8c039 25-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@5e2c8338b (master) into main

Notable upstream pull request merges:
#12183 Optimize small random numbers generation
#12227 Revert Consolidate arc_buf allocation checks
#12266 Fix flag copying in resume case
#12273 zfs_metaslab_mem_limit should be 25 instead of 75
#12276 Update cache file when setting compatibility property
#12280 Help compiller optimize out abd_verify()
#12282 FreeBSD: fix compilation of FreeBSD world after 29274c9f6

Obtained from: OpenZFS
OpenZFS commit: 5e2c8338bf17d31b44eb1dbbb3c9b6a0f64e96ee


# 9db44a8e 13-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9305ff2ed

Notable upstream pull request merges:
#11153 Scalable teardown lock for FreeBSD
#11651 Don't bomb out when using keylocation=file://
#11667 zvol: call zil_replaying() during replay
#11683 abd_get_offset_struct() may allocate new abd
#11693 Intentionally allow ZFS_READONLY in zfs_write
#11716 zpool import cachefile improvements
#11720 FreeBSD: Clean up zfsdev_close to match Linux
#11730 FreeBSD: bring back possibility to rewind the
checkpoint from bootloader

Obtained from: OpenZFS
MFC after: 2 weeks


# caed7b1c 02-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-bedbc13da

Notable upstream commits:
8e43fa12c Fix vdev_rebuild_thread deadlock
03ef8f09e Add missing checks for unsupported features
2e160dee9 Fix assert in FreeBSD-specific dmu_read_pages
bedbc13da Cancel TRIM / initialize on FAULTED non-writeable vdevs

MFC after: 1 week
Obtained from: OpenZFS


# 184c1b94 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-436ab35a5

- speed up writing to ZFS pools without ZIL devices (aa755b3)
- speed up importing ZFS pools (2d8f72d, a0e0199, cf0977a)
...

MFC after: 2 weeks
Reviewed by: mjg (partial)
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D28677


# 7877fdeb 07-Jan-2021 Matt Macy <mmacy@FreeBSD.org>

OpenZFS merge main-gf11b09

- add dRAID support
- fix duplicate close handling
- fix memory leak in prefetch
- fix problem with SIMD benchmarking on FreeBSD boot
...

# c40487d4 01-Oct-2020 Matt Macy <mmacy@FreeBSD.org>

OpenZFS: MFV 2.0-rc3-gfc5966

- Annotate FreeBSD sysctls with CTLFLAG_MPSAFE
- Reduce stack usage of Lua
- Don't save user FPU context in kernel threads
- Add support for procfs_list
- Code cleanup in zio_crypt
- Add DB_RF_NOPREFETCH to dbuf_read()s in dnode.c
- Drop references when skipping dmu_send due to EXDEV
- Eliminate gratuitous bzeroing in dbuf_stats_hash_table_data
- Fix legacy compat for platform IOCs


# eda14cbc 24-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

Initial import from vendor-sys branch of openzfs


# 7877fdeb 07-Jan-2021 Matt Macy <mmacy@FreeBSD.org>

OpenZFS merge main-gf11b09

- add dRAID support
- fix duplicate close handling
- fix memory leak in prefetch
- fix problem with SIMD benchmarking on FreeBSD boot
...