History log of /freebsd-current/sys/contrib/openzfs/module/zfs/arc.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 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


# 1719886f 16-Apr-2024 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@90ba19eb7

Notable upstream pull request merges:
#15784 90ba19eb7b Do no use .cfi_negate_ra_state within the assembly
on Arm64
#15942 b6bbaa8372 Give a better message from 'zpool get' with invalid
pool name
#15943 ca678bc0bc Makefile.bsd: sort and cleanup source file list
#15953 fa480fe5ba zinject: show more device fault fields
#15983 30c4eba4ea Fix panics when truncating/deleting files
#15992 99741bde59 zvol: use multiple taskq
#16015 a100a195fa Add support for zfs mount -R <filesystem>
#16022 5e5fd0a178 Speculative prefetch for reordered requests
#16040 997f85b4d3 L2ARC: Relax locking during write
#16042 b12738182c Improve dbuf_read() error reporting
#16051 a9a4290173 xdr: header cleanup
#16052 eeca9a91d6 Fix read errors race after block cloning
#16057 aa5445c28b Remove db_state DB_NOFILL checks from syncing context
#16061 76d1dde94c zinject: inject device errors into ioctls
#16072 9e63631dea Small fix to prefetch ranges aggregation
#16077 44f337be30 Illumos#16463 zfs_ioc_recv leaks nvlist
#16085 4725e543be zinject: "no-op" error injection
#16086 c6da985e28 Add the BTI elf note to the AArch64 SHA2 assembly

Obtained from: OpenZFS
OpenZFS commit: 90ba19eb7b81f0225e63bedfb902000d23383921


# 783d3ff6 30-Mar-2024 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@39be46f43

Notable upstream pull request merges:
#15509 b1e46f869 Add ashift validation when adding devices to a pool
#15927 45e23abed Update resume token at object receive
#15941 bf8f72359 BRT: Skip duplicate BRT prefetches
#15950 8cd8ccca5 BRT: Skip getting length in brt_entry_lookup()
#15951 80cc51629 ZAP: Massively switch to _by_dnode() interfaces
#15954 2c01cae8b BRT: Change brt_pending_tree sorting order
#15955 4616b96a6 BRT: Relax brt_pending_apply() locking
#15959 5c4a4f82c zio: update ZIO type x stage documentation
#15962 493fcce9b Provide macros for setting and getting blkptr birth times
#15963 90ff73235 freebsd: fix missing headers in distribution tarball
#15967 f68bde723 BRT: Make BRT block sizes configurable
#15976 c28f94f32 ZAP: Some cleanups/micro-optimizations
#15995 cfb96c772 vdev_disk: clean up spa/bdev mode conversion
#16006 c0aab8b8f zvols: prevent overflow of minor device numbers
#16007 a89d209bb BRT: Fix holes cloning
#16008 c9d8f6c59 Fix option string, adding -e and fixing order

Obtained from: OpenZFS
OpenZFS commit: 39be46f43f96fb7420386d03751b01f5cb376d6b


# 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


# 47bb16f8 17-Nov-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@03e9caaec

Notable upstream pull request merges:
#15516 da51bd17e Fix snap_obj_array memory leak in check_filesystem()
#15519 35da34516 L2ARC: Restrict write size to 1/4 of the device
#15529 03e9caaec Add a tunable to disable BRT support

Obtained from: OpenZFS
OpenZFS commit: 03e9caaec006134b3db9d02ac40fe9369ee78b03


# e716630d 09-Nov-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@887a3c533

Notable upstream pull request merges:
#15022 5caeef02f RAID-Z expansion feature
#15457 887a3c533 Increase L2ARC write rate and headroom
#15504 1c1be60fa Unbreak FreeBSD world build after 3bd4df384

Obtained from: OpenZFS
OpenZFS commit: 887a3c533b94a4b70075e310f15c45b9dee19410


# f8b1db88 01-Nov-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@41e55b476

Notable upstream pull request merges:
#15366 c3773de1 ZIL: Cleanup sync and commit handling
#15409 dbe839a9 zvol: Cleanup set property
#15409 60387fac zvol: Implement zvol threading as a Property
#15409 9ccdb8be zvol: fix delayed update to block device ro entry
#15448 05a7348a RAIDZ: Use cache blocking during parity math
#15452 514d661c Tune zio buffer caches and their alignments
#15456 799e09f7 Unify arc_prune_async() code
#15465 763ca47f Fix block cloning between unencrypted and encrypted
datasets

To make the module version better comparable, the module version number
now includes the commit count since last tag.

Obtained from: OpenZFS
OpenZFS commit: 41e55b476bcfc90f1ad81c02c5375367fdace9e9


# 6c1e79df 30-Oct-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@043c6ee3b

Notable upstream pull request merges:
#15360 97a0b5be Add mutex_enter_interruptible() for interruptible sleeping
IOCTLs
#15381 252f46be ZIL: Detect single-threaded workloads
#15398 3afdc97d ZIO: Remove READY pipeline stage from root ZIOs
#15428 e007908a ABD: Be more assertive in iterators
#15436 07345ac2 Add prefetch property
#15438 e9725abd Revert "Do not persist user/group/project quota zap objects
when unneeded"
#15451 043c6ee3 Read prefetched buffers from L2ARC

Obtained from: OpenZFS
OpenZFS commit: 043c6ee3b6bfb55f8d36e1f048ff13128c279fb8


# 22b267e8 22-Oct-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@797f55ef1

Notable upstream pull request merges:
#14378 c0e58995e Large sync writes perform worse with slog
#14721 797f55ef1 Do not persist user/group/project quota zap objects
when unneeded
#15356 380c25f64 FreeBSD: Improve taskq wrapper
#15390 4fbc52495 Remove lock from dsl_pool_need_dirty_delay()
#15397 57b409856 Trust ARC_BUF_SHARED() more
#15402 b29e98fa8 Properly pad struct tx_cpu to cache line
#15405 ea30b5a9e Set spa_ccw_fail_time=0 when expanding a vdev
#15416 b9384b949 FreeBSD: taskq: Remove unused declaration

Obtained from: OpenZFS
OpenZFS commit: 797f55ef12d752d2a7fb04fae5d24e019adf2a1d


# b2526e8b 08-Oct-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@66b81b349

Notable upstream pull request merges:
#15290 54b1b1d89 import: require force when cachefile hostid doesn't
match on-disk
#15319 342357cd9 Reduce number of metaslab preload taskq threads
#15340 2a6c62109 ARC: Remove b_cv from struct l1arc_buf_hdr
#15347 75a2eb7fa ARC: Drop different size headers for crypto
#15350 96b9cf42e ARC: Remove b_bufcnt/b_ebufcnt from ARC headers
#15353 66b81b349 ZIL: Reduce maximum size of WR_COPIED to 7.5K
#15362 5b8688e62 zfsconcepts: add description of block cloning

Obtained from: OpenZFS
OpenZFS commit: 66b81b349749bc1ba11fa277bee860be03315429


# 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


# b7198dcf 16-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@10e36e176

Notable upstream pull request merges:
#14948 Remove ARC/ZIO physdone callbacks
#14963 Store the L2ARC device ashift in the vdev label
#14970 Switch refcount tracking from lists to AVL-trees
#14981 Shorten arcstat_quiescence sleep time

Obtained from: OpenZFS
OpenZFS commit: 10e36e17612ba9c634b140ae76847bb62b5be68f


# 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


# e639e0d2 12-May-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@e61076683

Notable upstream pull request merges:
#14744 Optimize check_filesystem() and process_error_log()
#14773 Allow zhack label repair to restore detached devices
#14794 zpool import -m also removing spare and cache when log device
is missing
#14805 Simplify and optimize random_int_between()
#14813 Enable the head_errlog feature to remove errors
#14816 Fix two abd_gang_add_gang() issues
#14817 Verify block pointers before writing them out
#14819 Add dmu_tx_hold_append() interface
#14823 Remove single parent assertion from zio_nowait()
#14824 Plug memory leak in zfsdev_state
#14825 Block cloning dbuf fixes
#14828 Remove duplicate code in l2arc_evict()
#14837 Fixes in head_errlog feature with encryption
#14839 Prevent panic during concurrent snapshot rollback and zvol read
#14853 zil: Don't expect zio_shrink() to succeed

Obtained from: OpenZFS
OpenZFS commit: e6107668385044718b0a73330ed6423650806473


# 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


# 15f0b8c3 25-Jan-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@9cd71c860 (master)

Notable upstream pull request merges:
#13805 Configure zed's diagnosis engine with vdev properties
#14110 zfs list: Allow more fields in ZFS_ITER_SIMPLE mode
#14121 Batch enqueue/dequeue for bqueue
#14123 arc_read()/arc_access() refactoring and cleanup
#14159 Bypass metaslab throttle for removal allocations
#14243 Implement uncached prefetch
#14251 Cache dbuf_hash() calculation
#14253 Allow reciever to override encryption property in case of replication
#14254 Restrict visibility of per-dataset kstats inside FreeBSD jails
#14255 Zero end of embedded block buffer in dump_write_embedded()
#14263 Cleanups identified by CodeQL and Coverity
#14264 Miscellaneous fixes
#14272 Change ZEVENT_POOL_GUID to ZEVENT_POOL to display pool names
#14287 FreeBSD: Remove stray debug printf
#14288 Colorize zfs diff output
#14289 deadlock between spa_errlog_lock and dp_config_rwlock
#14291 FreeBSD: Fix potential boot panic with bad label
#14292 Add tunable to allow changing micro ZAP's max size
#14293 Turn default_bs and default_ibs into ZFS_MODULE_PARAMs
#14295 zed: add hotplug support for spare vdevs
#14304 Activate filesystem features only in syncing context
#14311 zpool: do guid-based comparison in is_vdev_cb()
#14317 Pack zrlock_t by 8 bytes
#14320 Update arc_summary and arcstat outputs
#14328 FreeBSD: catch up to 1400077
#14376 Use setproctitle to report progress of zfs send
#14340 Remove some dead ARC code
#14358 Wait for txg sync if the last DRR_FREEOBJECTS might result in a hole
#14360 libzpool: fix ddi_strtoull to update nptr
#14364 Fix unprotected zfs_znode_dmu_fini
#14379 zfs_receive_one: Check for the more likely error first
#14380 Cleanup of dead code suggested by Clang Static Analyzer
#14397 Avoid passing an uninitialized index to dsl_prop_known_index
#14404 Fix reading uninitialized variable in receive_read
#14407 free_blocks(): Fix reports from 2016 PVS Studio FreeBSD report
#14418 Introduce minimal ZIL block commit delay
#14422 x86 assembly: fix .size placement and replace .align with .balign

Obtained from: OpenZFS
OpenZFS commit: 9cd71c8604d52def22ffaddc35755712f0fb9349


# 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


# c7046f76 21-Sep-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c629f0bf6

Notable upstream pull request merges:
#13725 Fix BLAKE3 tuneable and module loading on Linux and FreeBSD
#13756 FreeBSD: Organize sysctls
#13773 FreeBSD: add kqfilter support for zvol cdev
#13781 Importing from cachefile can trip assertion
#13794 Apply arc_shrink_shift to ARC above arc_c_min
#13798 Improve too large physical ashift handling
#13799 Revert "Avoid panic with recordsize > 128k, raw sending and
no large_blocks"
#13802 Add zfs.sync.snapshot_rename
#13831 zfs_enter rework
#13855 zfs recv hangs if max recordsize is less than received
recordsize

Obtained from: OpenZFS
OpenZFS commit: c629f0bf62e351355716f9870d6c2e377584b016


# 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


# 716fd348 18-May-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c0cf6ed67

Notable upstream pull request merges:
#10662 zvol_wait: Ignore locked zvols
#12789 Improve log spacemap load time
#12812 Improved zpool status output, list all affected datasets
#13277 FreeBSD: Use NDFREE_PNBUF if available
#13302 Make zfs_max_recordsize default to 16M
#13311 Fix error handling in FreeBSD's get/putpages VOPs
#13345 FreeBSD: Fix translation from ABD to physical pages
#13373 zfs: holds: dequadratify
#13375 Corrected edge case in uncompressed ARC->L2ARC handling
#13388 Improve mg_aliquot math
#13405 Reduce dbuf_find() lock contention
#13406 FreeBSD: use zero_region instead of allocating a dedicated page

Obtained from: OpenZFS
OpenZFS commit: c0cf6ed6792e545fd614c2a88cb53756db7e03f8


# 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


# c03c5b1c 08-Mar-2022 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#9078: log xattr=sa create/remove/update to ZIL
#11919: Cross-platform xattr user namespace compatibility
#13014: Report dnodes with faulty bonuslen
#13016: FreeBSD: Fix zvol_cdev_open locking
#13019: spl: Don't check FreeBSD rwlocks for double initialization
#13027: Fix clearing set-uid and set-gid bits on a file when
replying a write
#13031: Add enumerated vdev names to 'zpool iostat -v' and
'zpool list -v'
#13074: Enable encrypted raw sending to pools with greater ashift
#13076: Receive checks should allow unencrypted child datasets
#13098: Avoid dirtying the final TXGs when exporting a pool
#13172: Fix ENOSPC when unlinking multiple files from full pool

Obtained from: OpenZFS
OpenZFS commit: a86e089415679cf1b98eb424a159bb36aa2c19e3


# 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


# dae17134 17-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@269b5dadc (master) into main

Notable upstream pull request merges:
#12285 Introduce a tunable to exclude special class buffers from L2ARC
#12689 Check l2cache vdevs pending list inside the vdev_inuse()
#12735 Enable edonr in FreeBSD
#12743 FreeBSD: fix world build after de198f2
#12745 Restore dirty dnode detection logic

Obtained from: OpenZFS
OpenZFS commit: 269b5dadcfd1d5732cf763dddcd46009a332eae4


# 6ba2210e 21-Oct-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12392 Avoid panic in case of pool errors and missing L2ARC
#12448 skip snapshot in zfs_iter_mounted()
#12516 Fix NFS and large reads on older kernels
#12533 Fail invalid incremental recursive send gracefully
#12569 FreeBSD: Really zero the zero page
#12575 Reject zfs send -RI with nonexistent fromsnap
#12602 Correct refcount_add in dmu_zfetch
#12650 zpool should call zfs_nicestrtonum() with non-NULL handle

Obtained from: OpenZFS
OpenZFS commit: ec64fdb93d144ab1884097cfd36e18b62a2db848


# 53b70c86 15-Sep-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4a1195ca5 (master) into main

Notable upstream pull request merges:
#11312 Temporarily use root credentials to mount snapshots in .zfs
#12246 arc: Drop an incorrect assert
#12443 Fixed data integrity issue when underlying disk returns error
to zfs
#12522 Compressed receive with different ashift can result in incorrect
PSIZE on disk
#12535 Verify embedded blkptr's in arc_read()
#12541 Allow sending corrupt snapshots even if metadata is corrupted

Obtained from: OpenZFS
OpenZFS commit: 4a1195ca5041cbff2a6b025a31937fef84876c52


# 2faf504d 17-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@8ae86e2ed (master) into main

Notable upstream pull request merges:
#12422 Fix/improve dbuf hits accounting
#12406 Increase default volblocksize from 8KB to 16KB
#12398 Remove b_pabd/b_rabd allocation from arc_hdr_alloc()
#12397 Run arc_evict thread at higher priority
#12297 Avoid vq_lock drop in vdev_queue_aggregate()
#12161 Restore FreeBSD sysctl processing for arc.min and arc.max

Obtained from: OpenZFS
OpenZFS commit: 8ae86e2edc736483c1530fd689525aa2460eaec8


# 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


# 2617128a 30-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4694131a0 (master) into main

Notable upstream pull request merges:
#12253 module/zfs: simplify ddt_stat_add() loop
#12288 Avoid 64bit division in multilist index functions

Obtained from: OpenZFS
OpenZFS commit: 4694131a0a05b6db2727c9801f9729b9378d3064


# 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


# 0d8fe237 20-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12054 Avoid deadlock when removing L2ARC devices under I/O
#12172 Use wmsum for arc, abd, dbuf and zfetch statistics
#12221 vdev_draid_min_asize() ignores reserved space

Obtained from: OpenZFS
OpenZFS commit: c4c162c1e8ff9ce8833014711875d18df520096c


# 3ff01b23 12-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12149: Multiple man-pages: Move to appropriate section
#12158: Re-embed multilist_t storage
#12191: Convert non-libzpool libraries to -fvisibility=hidden
#12196: Unify manpage makefiles, move pages to better sexions, ...
#12210: libzutil: import filtering optimisation
#12212: Remove pool io kstats

Obtained from: OpenZFS
OpenZFS commit: afa7b3484556d3ae610a34582ce5ebd2c3e27bba


# 16038816 08-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@75b4cbf62 (master) into main

Notable upstream pull request merges:
#11710 Allow zfs to send replication streams with missing snapshots
#11751 Avoid taking global lock to destroy zfsdev state
#11786 Ratelimit deadman zevents as with delay zevents
#11803 ZFS traverse_visitbp optimization to limit prefetch
#11813 Allow pool names that look like Solaris disk names
#11822 Atomically check and set dropped zevent count
#11822 Don't scale zfs_zevent_len_max by CPU count
#11833 Refactor zfsdev state init/destroy to share common code
#11837 zfs get -p only outputs 3 columns if "clones" property is empty
#11843 libzutil: zfs_isnumber(): return false if input empty
#11849 Use dsl_scan_setup_check() to setup a scrub
#11861 Improvements to the 'compatibility' property
#11862 cmd/zfs receive: allow dry-run (-n) to check property args
#11864 receive: don't fail inheriting (-x) properties on wrong dataset type
#11877 Combine zio caches if possible
#11881 FreeBSD: use vnlru_free_vfsops if available
#11883 FreeBSD: add support for lockless symlink lookup
#11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr
#11896 Fix crash in zio_done error reporting
#11905 zfs-send(8): Restore sorting of flags
#11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir
#11930 vdev_mirror: don't scrub/resilver devices that can't be read
#11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines
#11955 zfs get: don't lookup mount options when using "-s local"
#11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl
#11959 vdev_id: variable not getting expanded under map_slot()
#11966 Scale worker threads and taskqs with number of CPUs
#11994 Clean up use of zfs_log_create in zfs_dir
#11997 FreeBSD: Don't force xattr mount option
#11997 FreeBSD: Implement xattr=sa
#11997 FreeBSD: Use SET_ERROR to trace xattr name errors
#11998 Simplify/fix dnode_move() for dn_zfetch
#12003 FreeBSD: Initialize/destroy zp->z_lock
#12010 Fix dRAID self-healing short columns
#12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots"
#12040 Reinstate the old zpool read label logic as a fallback
#12046 Improve scrub maxinflight_bytes math
#12049 FreeBSD: avoid memory allocation in arc_prune_async
#12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI
#12061 Fix dRAID sequential resilver silent damage handling
#12072 Let zfs diff be more permissive
#12077 FreeBSD: Retry OCF ENOMEM errors.
#12088 Propagate vdev state due to invalid label corruption
#12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat
#12097 FreeBSD: Update dataset_kstats for zvols in dev mode
#12104 FreeBSD boot code reminder after zpool upgrade
#12114 Introduce write-mostly sums

Obtained from: OpenZFS
OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3


# 6db169e9 13-Apr-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@3522f57b6 (master)

Notable upstream pull request merges:
#11742 When specifying raidz vdev name, parity count should match
#11744 Use a helper function to clarify gang block size
#11771 Support running FreeBSD buildworld on Arm-based macOS hosts

This is the last update that will be MFCed into stable/13.

From now on, the tracking of OpenZFS branches will be different:
- main continues tracking openzfs/zfs/master
- stable/13 is going to track openzfs/zfs/zfs-2.1-release

Obtained from: OpenZFS
MFC after: 1 week


# ba27dd8b 21-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9312e0fd1

Notable upstream changes:
778869fa1 Fix reporting of mount progress
e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD
03e02e5b5 Fix checksum errors not being counted on repeated repair
64e0fe14f Restore FreeBSD resource usage accounting
11f2e9a49 Fix panic if scrubbing after removing a slog device

MFC after: 2 weeks


# 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


# 5dce0384 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: Avoid updating the L2ARC device header unnecessarily

From openzfs-master 0ae184a6b commit message:
If we do not write any buffers to the cache device and the evict hand
has not advanced do not update the cache device header.

Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58
Patch Author: George Amanakis <gamanakis@gmail.com>

MFC after: 3 days
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D28682

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

OpenZFS: Fix issues caused by reversed commits + rebase

# 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
...

# 5596f836 14-Nov-2020 Mateusz Guzik <mjg@FreeBSD.org>

zfs: disable periodic arc updates

They are only there to provide less innacurate statistics for debuggers.
However, this is quite heavy-weight and instead it would be better to
teach debuggers how to obtain the necessary information.

# 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


# 2c48331d 18-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

MFV 2.0-rc2

- Fixes divide by zero for unusual hz
- remove cryptodev dependency


# eac7052f 04-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-gfd20a8

- fixes jail delegation
- fixes raw kstat unsupported complaints
- exposes dbgmsg, dbuf, and checksum benchmark stats
- restore rename -u support


# ac0bf12e 28-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-ga00c61


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

Initial import from vendor-sys branch of openzfs


# 1719886f 16-Apr-2024 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@90ba19eb7

Notable upstream pull request merges:
#15784 90ba19eb7b Do no use .cfi_negate_ra_state within the assembly
on Arm64
#15942 b6bbaa8372 Give a better message from 'zpool get' with invalid
pool name
#15943 ca678bc0bc Makefile.bsd: sort and cleanup source file list
#15953 fa480fe5ba zinject: show more device fault fields
#15983 30c4eba4ea Fix panics when truncating/deleting files
#15992 99741bde59 zvol: use multiple taskq
#16015 a100a195fa Add support for zfs mount -R <filesystem>
#16022 5e5fd0a178 Speculative prefetch for reordered requests
#16040 997f85b4d3 L2ARC: Relax locking during write
#16042 b12738182c Improve dbuf_read() error reporting
#16051 a9a4290173 xdr: header cleanup
#16052 eeca9a91d6 Fix read errors race after block cloning
#16057 aa5445c28b Remove db_state DB_NOFILL checks from syncing context
#16061 76d1dde94c zinject: inject device errors into ioctls
#16072 9e63631dea Small fix to prefetch ranges aggregation
#16077 44f337be30 Illumos#16463 zfs_ioc_recv leaks nvlist
#16085 4725e543be zinject: "no-op" error injection
#16086 c6da985e28 Add the BTI elf note to the AArch64 SHA2 assembly

Obtained from: OpenZFS
OpenZFS commit: 90ba19eb7b81f0225e63bedfb902000d23383921


# 783d3ff6 30-Mar-2024 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@39be46f43

Notable upstream pull request merges:
#15509 b1e46f869 Add ashift validation when adding devices to a pool
#15927 45e23abed Update resume token at object receive
#15941 bf8f72359 BRT: Skip duplicate BRT prefetches
#15950 8cd8ccca5 BRT: Skip getting length in brt_entry_lookup()
#15951 80cc51629 ZAP: Massively switch to _by_dnode() interfaces
#15954 2c01cae8b BRT: Change brt_pending_tree sorting order
#15955 4616b96a6 BRT: Relax brt_pending_apply() locking
#15959 5c4a4f82c zio: update ZIO type x stage documentation
#15962 493fcce9b Provide macros for setting and getting blkptr birth times
#15963 90ff73235 freebsd: fix missing headers in distribution tarball
#15967 f68bde723 BRT: Make BRT block sizes configurable
#15976 c28f94f32 ZAP: Some cleanups/micro-optimizations
#15995 cfb96c772 vdev_disk: clean up spa/bdev mode conversion
#16006 c0aab8b8f zvols: prevent overflow of minor device numbers
#16007 a89d209bb BRT: Fix holes cloning
#16008 c9d8f6c59 Fix option string, adding -e and fixing order

Obtained from: OpenZFS
OpenZFS commit: 39be46f43f96fb7420386d03751b01f5cb376d6b


# 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


# 47bb16f8 17-Nov-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@03e9caaec

Notable upstream pull request merges:
#15516 da51bd17e Fix snap_obj_array memory leak in check_filesystem()
#15519 35da34516 L2ARC: Restrict write size to 1/4 of the device
#15529 03e9caaec Add a tunable to disable BRT support

Obtained from: OpenZFS
OpenZFS commit: 03e9caaec006134b3db9d02ac40fe9369ee78b03


# e716630d 09-Nov-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@887a3c533

Notable upstream pull request merges:
#15022 5caeef02f RAID-Z expansion feature
#15457 887a3c533 Increase L2ARC write rate and headroom
#15504 1c1be60fa Unbreak FreeBSD world build after 3bd4df384

Obtained from: OpenZFS
OpenZFS commit: 887a3c533b94a4b70075e310f15c45b9dee19410


# f8b1db88 01-Nov-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@41e55b476

Notable upstream pull request merges:
#15366 c3773de1 ZIL: Cleanup sync and commit handling
#15409 dbe839a9 zvol: Cleanup set property
#15409 60387fac zvol: Implement zvol threading as a Property
#15409 9ccdb8be zvol: fix delayed update to block device ro entry
#15448 05a7348a RAIDZ: Use cache blocking during parity math
#15452 514d661c Tune zio buffer caches and their alignments
#15456 799e09f7 Unify arc_prune_async() code
#15465 763ca47f Fix block cloning between unencrypted and encrypted
datasets

To make the module version better comparable, the module version number
now includes the commit count since last tag.

Obtained from: OpenZFS
OpenZFS commit: 41e55b476bcfc90f1ad81c02c5375367fdace9e9


# 6c1e79df 30-Oct-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@043c6ee3b

Notable upstream pull request merges:
#15360 97a0b5be Add mutex_enter_interruptible() for interruptible sleeping
IOCTLs
#15381 252f46be ZIL: Detect single-threaded workloads
#15398 3afdc97d ZIO: Remove READY pipeline stage from root ZIOs
#15428 e007908a ABD: Be more assertive in iterators
#15436 07345ac2 Add prefetch property
#15438 e9725abd Revert "Do not persist user/group/project quota zap objects
when unneeded"
#15451 043c6ee3 Read prefetched buffers from L2ARC

Obtained from: OpenZFS
OpenZFS commit: 043c6ee3b6bfb55f8d36e1f048ff13128c279fb8


# 22b267e8 22-Oct-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@797f55ef1

Notable upstream pull request merges:
#14378 c0e58995e Large sync writes perform worse with slog
#14721 797f55ef1 Do not persist user/group/project quota zap objects
when unneeded
#15356 380c25f64 FreeBSD: Improve taskq wrapper
#15390 4fbc52495 Remove lock from dsl_pool_need_dirty_delay()
#15397 57b409856 Trust ARC_BUF_SHARED() more
#15402 b29e98fa8 Properly pad struct tx_cpu to cache line
#15405 ea30b5a9e Set spa_ccw_fail_time=0 when expanding a vdev
#15416 b9384b949 FreeBSD: taskq: Remove unused declaration

Obtained from: OpenZFS
OpenZFS commit: 797f55ef12d752d2a7fb04fae5d24e019adf2a1d


# b2526e8b 08-Oct-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@66b81b349

Notable upstream pull request merges:
#15290 54b1b1d89 import: require force when cachefile hostid doesn't
match on-disk
#15319 342357cd9 Reduce number of metaslab preload taskq threads
#15340 2a6c62109 ARC: Remove b_cv from struct l1arc_buf_hdr
#15347 75a2eb7fa ARC: Drop different size headers for crypto
#15350 96b9cf42e ARC: Remove b_bufcnt/b_ebufcnt from ARC headers
#15353 66b81b349 ZIL: Reduce maximum size of WR_COPIED to 7.5K
#15362 5b8688e62 zfsconcepts: add description of block cloning

Obtained from: OpenZFS
OpenZFS commit: 66b81b349749bc1ba11fa277bee860be03315429


# 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


# b7198dcf 16-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@10e36e176

Notable upstream pull request merges:
#14948 Remove ARC/ZIO physdone callbacks
#14963 Store the L2ARC device ashift in the vdev label
#14970 Switch refcount tracking from lists to AVL-trees
#14981 Shorten arcstat_quiescence sleep time

Obtained from: OpenZFS
OpenZFS commit: 10e36e17612ba9c634b140ae76847bb62b5be68f


# 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


# e639e0d2 12-May-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@e61076683

Notable upstream pull request merges:
#14744 Optimize check_filesystem() and process_error_log()
#14773 Allow zhack label repair to restore detached devices
#14794 zpool import -m also removing spare and cache when log device
is missing
#14805 Simplify and optimize random_int_between()
#14813 Enable the head_errlog feature to remove errors
#14816 Fix two abd_gang_add_gang() issues
#14817 Verify block pointers before writing them out
#14819 Add dmu_tx_hold_append() interface
#14823 Remove single parent assertion from zio_nowait()
#14824 Plug memory leak in zfsdev_state
#14825 Block cloning dbuf fixes
#14828 Remove duplicate code in l2arc_evict()
#14837 Fixes in head_errlog feature with encryption
#14839 Prevent panic during concurrent snapshot rollback and zvol read
#14853 zil: Don't expect zio_shrink() to succeed

Obtained from: OpenZFS
OpenZFS commit: e6107668385044718b0a73330ed6423650806473


# 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


# 15f0b8c3 25-Jan-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@9cd71c860 (master)

Notable upstream pull request merges:
#13805 Configure zed's diagnosis engine with vdev properties
#14110 zfs list: Allow more fields in ZFS_ITER_SIMPLE mode
#14121 Batch enqueue/dequeue for bqueue
#14123 arc_read()/arc_access() refactoring and cleanup
#14159 Bypass metaslab throttle for removal allocations
#14243 Implement uncached prefetch
#14251 Cache dbuf_hash() calculation
#14253 Allow reciever to override encryption property in case of replication
#14254 Restrict visibility of per-dataset kstats inside FreeBSD jails
#14255 Zero end of embedded block buffer in dump_write_embedded()
#14263 Cleanups identified by CodeQL and Coverity
#14264 Miscellaneous fixes
#14272 Change ZEVENT_POOL_GUID to ZEVENT_POOL to display pool names
#14287 FreeBSD: Remove stray debug printf
#14288 Colorize zfs diff output
#14289 deadlock between spa_errlog_lock and dp_config_rwlock
#14291 FreeBSD: Fix potential boot panic with bad label
#14292 Add tunable to allow changing micro ZAP's max size
#14293 Turn default_bs and default_ibs into ZFS_MODULE_PARAMs
#14295 zed: add hotplug support for spare vdevs
#14304 Activate filesystem features only in syncing context
#14311 zpool: do guid-based comparison in is_vdev_cb()
#14317 Pack zrlock_t by 8 bytes
#14320 Update arc_summary and arcstat outputs
#14328 FreeBSD: catch up to 1400077
#14376 Use setproctitle to report progress of zfs send
#14340 Remove some dead ARC code
#14358 Wait for txg sync if the last DRR_FREEOBJECTS might result in a hole
#14360 libzpool: fix ddi_strtoull to update nptr
#14364 Fix unprotected zfs_znode_dmu_fini
#14379 zfs_receive_one: Check for the more likely error first
#14380 Cleanup of dead code suggested by Clang Static Analyzer
#14397 Avoid passing an uninitialized index to dsl_prop_known_index
#14404 Fix reading uninitialized variable in receive_read
#14407 free_blocks(): Fix reports from 2016 PVS Studio FreeBSD report
#14418 Introduce minimal ZIL block commit delay
#14422 x86 assembly: fix .size placement and replace .align with .balign

Obtained from: OpenZFS
OpenZFS commit: 9cd71c8604d52def22ffaddc35755712f0fb9349


# 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


# c7046f76 21-Sep-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c629f0bf6

Notable upstream pull request merges:
#13725 Fix BLAKE3 tuneable and module loading on Linux and FreeBSD
#13756 FreeBSD: Organize sysctls
#13773 FreeBSD: add kqfilter support for zvol cdev
#13781 Importing from cachefile can trip assertion
#13794 Apply arc_shrink_shift to ARC above arc_c_min
#13798 Improve too large physical ashift handling
#13799 Revert "Avoid panic with recordsize > 128k, raw sending and
no large_blocks"
#13802 Add zfs.sync.snapshot_rename
#13831 zfs_enter rework
#13855 zfs recv hangs if max recordsize is less than received
recordsize

Obtained from: OpenZFS
OpenZFS commit: c629f0bf62e351355716f9870d6c2e377584b016


# 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


# 716fd348 18-May-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c0cf6ed67

Notable upstream pull request merges:
#10662 zvol_wait: Ignore locked zvols
#12789 Improve log spacemap load time
#12812 Improved zpool status output, list all affected datasets
#13277 FreeBSD: Use NDFREE_PNBUF if available
#13302 Make zfs_max_recordsize default to 16M
#13311 Fix error handling in FreeBSD's get/putpages VOPs
#13345 FreeBSD: Fix translation from ABD to physical pages
#13373 zfs: holds: dequadratify
#13375 Corrected edge case in uncompressed ARC->L2ARC handling
#13388 Improve mg_aliquot math
#13405 Reduce dbuf_find() lock contention
#13406 FreeBSD: use zero_region instead of allocating a dedicated page

Obtained from: OpenZFS
OpenZFS commit: c0cf6ed6792e545fd614c2a88cb53756db7e03f8


# 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


# c03c5b1c 08-Mar-2022 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#9078: log xattr=sa create/remove/update to ZIL
#11919: Cross-platform xattr user namespace compatibility
#13014: Report dnodes with faulty bonuslen
#13016: FreeBSD: Fix zvol_cdev_open locking
#13019: spl: Don't check FreeBSD rwlocks for double initialization
#13027: Fix clearing set-uid and set-gid bits on a file when
replying a write
#13031: Add enumerated vdev names to 'zpool iostat -v' and
'zpool list -v'
#13074: Enable encrypted raw sending to pools with greater ashift
#13076: Receive checks should allow unencrypted child datasets
#13098: Avoid dirtying the final TXGs when exporting a pool
#13172: Fix ENOSPC when unlinking multiple files from full pool

Obtained from: OpenZFS
OpenZFS commit: a86e089415679cf1b98eb424a159bb36aa2c19e3


# 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


# dae17134 17-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@269b5dadc (master) into main

Notable upstream pull request merges:
#12285 Introduce a tunable to exclude special class buffers from L2ARC
#12689 Check l2cache vdevs pending list inside the vdev_inuse()
#12735 Enable edonr in FreeBSD
#12743 FreeBSD: fix world build after de198f2
#12745 Restore dirty dnode detection logic

Obtained from: OpenZFS
OpenZFS commit: 269b5dadcfd1d5732cf763dddcd46009a332eae4


# 6ba2210e 21-Oct-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12392 Avoid panic in case of pool errors and missing L2ARC
#12448 skip snapshot in zfs_iter_mounted()
#12516 Fix NFS and large reads on older kernels
#12533 Fail invalid incremental recursive send gracefully
#12569 FreeBSD: Really zero the zero page
#12575 Reject zfs send -RI with nonexistent fromsnap
#12602 Correct refcount_add in dmu_zfetch
#12650 zpool should call zfs_nicestrtonum() with non-NULL handle

Obtained from: OpenZFS
OpenZFS commit: ec64fdb93d144ab1884097cfd36e18b62a2db848


# 53b70c86 15-Sep-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4a1195ca5 (master) into main

Notable upstream pull request merges:
#11312 Temporarily use root credentials to mount snapshots in .zfs
#12246 arc: Drop an incorrect assert
#12443 Fixed data integrity issue when underlying disk returns error
to zfs
#12522 Compressed receive with different ashift can result in incorrect
PSIZE on disk
#12535 Verify embedded blkptr's in arc_read()
#12541 Allow sending corrupt snapshots even if metadata is corrupted

Obtained from: OpenZFS
OpenZFS commit: 4a1195ca5041cbff2a6b025a31937fef84876c52


# 2faf504d 17-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@8ae86e2ed (master) into main

Notable upstream pull request merges:
#12422 Fix/improve dbuf hits accounting
#12406 Increase default volblocksize from 8KB to 16KB
#12398 Remove b_pabd/b_rabd allocation from arc_hdr_alloc()
#12397 Run arc_evict thread at higher priority
#12297 Avoid vq_lock drop in vdev_queue_aggregate()
#12161 Restore FreeBSD sysctl processing for arc.min and arc.max

Obtained from: OpenZFS
OpenZFS commit: 8ae86e2edc736483c1530fd689525aa2460eaec8


# 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


# 2617128a 30-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4694131a0 (master) into main

Notable upstream pull request merges:
#12253 module/zfs: simplify ddt_stat_add() loop
#12288 Avoid 64bit division in multilist index functions

Obtained from: OpenZFS
OpenZFS commit: 4694131a0a05b6db2727c9801f9729b9378d3064


# 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


# 0d8fe237 20-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12054 Avoid deadlock when removing L2ARC devices under I/O
#12172 Use wmsum for arc, abd, dbuf and zfetch statistics
#12221 vdev_draid_min_asize() ignores reserved space

Obtained from: OpenZFS
OpenZFS commit: c4c162c1e8ff9ce8833014711875d18df520096c


# 3ff01b23 12-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12149: Multiple man-pages: Move to appropriate section
#12158: Re-embed multilist_t storage
#12191: Convert non-libzpool libraries to -fvisibility=hidden
#12196: Unify manpage makefiles, move pages to better sexions, ...
#12210: libzutil: import filtering optimisation
#12212: Remove pool io kstats

Obtained from: OpenZFS
OpenZFS commit: afa7b3484556d3ae610a34582ce5ebd2c3e27bba


# 16038816 08-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@75b4cbf62 (master) into main

Notable upstream pull request merges:
#11710 Allow zfs to send replication streams with missing snapshots
#11751 Avoid taking global lock to destroy zfsdev state
#11786 Ratelimit deadman zevents as with delay zevents
#11803 ZFS traverse_visitbp optimization to limit prefetch
#11813 Allow pool names that look like Solaris disk names
#11822 Atomically check and set dropped zevent count
#11822 Don't scale zfs_zevent_len_max by CPU count
#11833 Refactor zfsdev state init/destroy to share common code
#11837 zfs get -p only outputs 3 columns if "clones" property is empty
#11843 libzutil: zfs_isnumber(): return false if input empty
#11849 Use dsl_scan_setup_check() to setup a scrub
#11861 Improvements to the 'compatibility' property
#11862 cmd/zfs receive: allow dry-run (-n) to check property args
#11864 receive: don't fail inheriting (-x) properties on wrong dataset type
#11877 Combine zio caches if possible
#11881 FreeBSD: use vnlru_free_vfsops if available
#11883 FreeBSD: add support for lockless symlink lookup
#11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr
#11896 Fix crash in zio_done error reporting
#11905 zfs-send(8): Restore sorting of flags
#11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir
#11930 vdev_mirror: don't scrub/resilver devices that can't be read
#11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines
#11955 zfs get: don't lookup mount options when using "-s local"
#11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl
#11959 vdev_id: variable not getting expanded under map_slot()
#11966 Scale worker threads and taskqs with number of CPUs
#11994 Clean up use of zfs_log_create in zfs_dir
#11997 FreeBSD: Don't force xattr mount option
#11997 FreeBSD: Implement xattr=sa
#11997 FreeBSD: Use SET_ERROR to trace xattr name errors
#11998 Simplify/fix dnode_move() for dn_zfetch
#12003 FreeBSD: Initialize/destroy zp->z_lock
#12010 Fix dRAID self-healing short columns
#12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots"
#12040 Reinstate the old zpool read label logic as a fallback
#12046 Improve scrub maxinflight_bytes math
#12049 FreeBSD: avoid memory allocation in arc_prune_async
#12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI
#12061 Fix dRAID sequential resilver silent damage handling
#12072 Let zfs diff be more permissive
#12077 FreeBSD: Retry OCF ENOMEM errors.
#12088 Propagate vdev state due to invalid label corruption
#12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat
#12097 FreeBSD: Update dataset_kstats for zvols in dev mode
#12104 FreeBSD boot code reminder after zpool upgrade
#12114 Introduce write-mostly sums

Obtained from: OpenZFS
OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3


# 6db169e9 13-Apr-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@3522f57b6 (master)

Notable upstream pull request merges:
#11742 When specifying raidz vdev name, parity count should match
#11744 Use a helper function to clarify gang block size
#11771 Support running FreeBSD buildworld on Arm-based macOS hosts

This is the last update that will be MFCed into stable/13.

From now on, the tracking of OpenZFS branches will be different:
- main continues tracking openzfs/zfs/master
- stable/13 is going to track openzfs/zfs/zfs-2.1-release

Obtained from: OpenZFS
MFC after: 1 week


# ba27dd8b 21-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9312e0fd1

Notable upstream changes:
778869fa1 Fix reporting of mount progress
e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD
03e02e5b5 Fix checksum errors not being counted on repeated repair
64e0fe14f Restore FreeBSD resource usage accounting
11f2e9a49 Fix panic if scrubbing after removing a slog device

MFC after: 2 weeks


# 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


# 5dce0384 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: Avoid updating the L2ARC device header unnecessarily

From openzfs-master 0ae184a6b commit message:
If we do not write any buffers to the cache device and the evict hand
has not advanced do not update the cache device header.

Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58
Patch Author: George Amanakis <gamanakis@gmail.com>

MFC after: 3 days
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D28682

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

OpenZFS: Fix issues caused by reversed commits + rebase

# 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
...

# 5596f836 14-Nov-2020 Mateusz Guzik <mjg@FreeBSD.org>

zfs: disable periodic arc updates

They are only there to provide less innacurate statistics for debuggers.
However, this is quite heavy-weight and instead it would be better to
teach debuggers how to obtain the necessary information.

# 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


# 2c48331d 18-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

MFV 2.0-rc2

- Fixes divide by zero for unusual hz
- remove cryptodev dependency


# eac7052f 04-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-gfd20a8

- fixes jail delegation
- fixes raw kstat unsupported complaints
- exposes dbgmsg, dbuf, and checksum benchmark stats
- restore rename -u support


# ac0bf12e 28-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-ga00c61


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

Initial import from vendor-sys branch of openzfs


# 783d3ff6 30-Mar-2024 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@39be46f43

Notable upstream pull request merges:
#15509 b1e46f869 Add ashift validation when adding devices to a pool
#15927 45e23abed Update resume token at object receive
#15941 bf8f72359 BRT: Skip duplicate BRT prefetches
#15950 8cd8ccca5 BRT: Skip getting length in brt_entry_lookup()
#15951 80cc51629 ZAP: Massively switch to _by_dnode() interfaces
#15954 2c01cae8b BRT: Change brt_pending_tree sorting order
#15955 4616b96a6 BRT: Relax brt_pending_apply() locking
#15959 5c4a4f82c zio: update ZIO type x stage documentation
#15962 493fcce9b Provide macros for setting and getting blkptr birth times
#15963 90ff73235 freebsd: fix missing headers in distribution tarball
#15967 f68bde723 BRT: Make BRT block sizes configurable
#15976 c28f94f32 ZAP: Some cleanups/micro-optimizations
#15995 cfb96c772 vdev_disk: clean up spa/bdev mode conversion
#16006 c0aab8b8f zvols: prevent overflow of minor device numbers
#16007 a89d209bb BRT: Fix holes cloning
#16008 c9d8f6c59 Fix option string, adding -e and fixing order

Obtained from: OpenZFS
OpenZFS commit: 39be46f43f96fb7420386d03751b01f5cb376d6b


# 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


# 47bb16f8 17-Nov-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@03e9caaec

Notable upstream pull request merges:
#15516 da51bd17e Fix snap_obj_array memory leak in check_filesystem()
#15519 35da34516 L2ARC: Restrict write size to 1/4 of the device
#15529 03e9caaec Add a tunable to disable BRT support

Obtained from: OpenZFS
OpenZFS commit: 03e9caaec006134b3db9d02ac40fe9369ee78b03


# e716630d 09-Nov-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@887a3c533

Notable upstream pull request merges:
#15022 5caeef02f RAID-Z expansion feature
#15457 887a3c533 Increase L2ARC write rate and headroom
#15504 1c1be60fa Unbreak FreeBSD world build after 3bd4df384

Obtained from: OpenZFS
OpenZFS commit: 887a3c533b94a4b70075e310f15c45b9dee19410


# f8b1db88 01-Nov-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@41e55b476

Notable upstream pull request merges:
#15366 c3773de1 ZIL: Cleanup sync and commit handling
#15409 dbe839a9 zvol: Cleanup set property
#15409 60387fac zvol: Implement zvol threading as a Property
#15409 9ccdb8be zvol: fix delayed update to block device ro entry
#15448 05a7348a RAIDZ: Use cache blocking during parity math
#15452 514d661c Tune zio buffer caches and their alignments
#15456 799e09f7 Unify arc_prune_async() code
#15465 763ca47f Fix block cloning between unencrypted and encrypted
datasets

To make the module version better comparable, the module version number
now includes the commit count since last tag.

Obtained from: OpenZFS
OpenZFS commit: 41e55b476bcfc90f1ad81c02c5375367fdace9e9


# 6c1e79df 30-Oct-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@043c6ee3b

Notable upstream pull request merges:
#15360 97a0b5be Add mutex_enter_interruptible() for interruptible sleeping
IOCTLs
#15381 252f46be ZIL: Detect single-threaded workloads
#15398 3afdc97d ZIO: Remove READY pipeline stage from root ZIOs
#15428 e007908a ABD: Be more assertive in iterators
#15436 07345ac2 Add prefetch property
#15438 e9725abd Revert "Do not persist user/group/project quota zap objects
when unneeded"
#15451 043c6ee3 Read prefetched buffers from L2ARC

Obtained from: OpenZFS
OpenZFS commit: 043c6ee3b6bfb55f8d36e1f048ff13128c279fb8


# 22b267e8 22-Oct-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@797f55ef1

Notable upstream pull request merges:
#14378 c0e58995e Large sync writes perform worse with slog
#14721 797f55ef1 Do not persist user/group/project quota zap objects
when unneeded
#15356 380c25f64 FreeBSD: Improve taskq wrapper
#15390 4fbc52495 Remove lock from dsl_pool_need_dirty_delay()
#15397 57b409856 Trust ARC_BUF_SHARED() more
#15402 b29e98fa8 Properly pad struct tx_cpu to cache line
#15405 ea30b5a9e Set spa_ccw_fail_time=0 when expanding a vdev
#15416 b9384b949 FreeBSD: taskq: Remove unused declaration

Obtained from: OpenZFS
OpenZFS commit: 797f55ef12d752d2a7fb04fae5d24e019adf2a1d


# b2526e8b 08-Oct-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@66b81b349

Notable upstream pull request merges:
#15290 54b1b1d89 import: require force when cachefile hostid doesn't
match on-disk
#15319 342357cd9 Reduce number of metaslab preload taskq threads
#15340 2a6c62109 ARC: Remove b_cv from struct l1arc_buf_hdr
#15347 75a2eb7fa ARC: Drop different size headers for crypto
#15350 96b9cf42e ARC: Remove b_bufcnt/b_ebufcnt from ARC headers
#15353 66b81b349 ZIL: Reduce maximum size of WR_COPIED to 7.5K
#15362 5b8688e62 zfsconcepts: add description of block cloning

Obtained from: OpenZFS
OpenZFS commit: 66b81b349749bc1ba11fa277bee860be03315429


# 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


# b7198dcf 16-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@10e36e176

Notable upstream pull request merges:
#14948 Remove ARC/ZIO physdone callbacks
#14963 Store the L2ARC device ashift in the vdev label
#14970 Switch refcount tracking from lists to AVL-trees
#14981 Shorten arcstat_quiescence sleep time

Obtained from: OpenZFS
OpenZFS commit: 10e36e17612ba9c634b140ae76847bb62b5be68f


# 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


# e639e0d2 12-May-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@e61076683

Notable upstream pull request merges:
#14744 Optimize check_filesystem() and process_error_log()
#14773 Allow zhack label repair to restore detached devices
#14794 zpool import -m also removing spare and cache when log device
is missing
#14805 Simplify and optimize random_int_between()
#14813 Enable the head_errlog feature to remove errors
#14816 Fix two abd_gang_add_gang() issues
#14817 Verify block pointers before writing them out
#14819 Add dmu_tx_hold_append() interface
#14823 Remove single parent assertion from zio_nowait()
#14824 Plug memory leak in zfsdev_state
#14825 Block cloning dbuf fixes
#14828 Remove duplicate code in l2arc_evict()
#14837 Fixes in head_errlog feature with encryption
#14839 Prevent panic during concurrent snapshot rollback and zvol read
#14853 zil: Don't expect zio_shrink() to succeed

Obtained from: OpenZFS
OpenZFS commit: e6107668385044718b0a73330ed6423650806473


# 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


# 15f0b8c3 25-Jan-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@9cd71c860 (master)

Notable upstream pull request merges:
#13805 Configure zed's diagnosis engine with vdev properties
#14110 zfs list: Allow more fields in ZFS_ITER_SIMPLE mode
#14121 Batch enqueue/dequeue for bqueue
#14123 arc_read()/arc_access() refactoring and cleanup
#14159 Bypass metaslab throttle for removal allocations
#14243 Implement uncached prefetch
#14251 Cache dbuf_hash() calculation
#14253 Allow reciever to override encryption property in case of replication
#14254 Restrict visibility of per-dataset kstats inside FreeBSD jails
#14255 Zero end of embedded block buffer in dump_write_embedded()
#14263 Cleanups identified by CodeQL and Coverity
#14264 Miscellaneous fixes
#14272 Change ZEVENT_POOL_GUID to ZEVENT_POOL to display pool names
#14287 FreeBSD: Remove stray debug printf
#14288 Colorize zfs diff output
#14289 deadlock between spa_errlog_lock and dp_config_rwlock
#14291 FreeBSD: Fix potential boot panic with bad label
#14292 Add tunable to allow changing micro ZAP's max size
#14293 Turn default_bs and default_ibs into ZFS_MODULE_PARAMs
#14295 zed: add hotplug support for spare vdevs
#14304 Activate filesystem features only in syncing context
#14311 zpool: do guid-based comparison in is_vdev_cb()
#14317 Pack zrlock_t by 8 bytes
#14320 Update arc_summary and arcstat outputs
#14328 FreeBSD: catch up to 1400077
#14376 Use setproctitle to report progress of zfs send
#14340 Remove some dead ARC code
#14358 Wait for txg sync if the last DRR_FREEOBJECTS might result in a hole
#14360 libzpool: fix ddi_strtoull to update nptr
#14364 Fix unprotected zfs_znode_dmu_fini
#14379 zfs_receive_one: Check for the more likely error first
#14380 Cleanup of dead code suggested by Clang Static Analyzer
#14397 Avoid passing an uninitialized index to dsl_prop_known_index
#14404 Fix reading uninitialized variable in receive_read
#14407 free_blocks(): Fix reports from 2016 PVS Studio FreeBSD report
#14418 Introduce minimal ZIL block commit delay
#14422 x86 assembly: fix .size placement and replace .align with .balign

Obtained from: OpenZFS
OpenZFS commit: 9cd71c8604d52def22ffaddc35755712f0fb9349


# 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


# c7046f76 21-Sep-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c629f0bf6

Notable upstream pull request merges:
#13725 Fix BLAKE3 tuneable and module loading on Linux and FreeBSD
#13756 FreeBSD: Organize sysctls
#13773 FreeBSD: add kqfilter support for zvol cdev
#13781 Importing from cachefile can trip assertion
#13794 Apply arc_shrink_shift to ARC above arc_c_min
#13798 Improve too large physical ashift handling
#13799 Revert "Avoid panic with recordsize > 128k, raw sending and
no large_blocks"
#13802 Add zfs.sync.snapshot_rename
#13831 zfs_enter rework
#13855 zfs recv hangs if max recordsize is less than received
recordsize

Obtained from: OpenZFS
OpenZFS commit: c629f0bf62e351355716f9870d6c2e377584b016


# 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


# 716fd348 18-May-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c0cf6ed67

Notable upstream pull request merges:
#10662 zvol_wait: Ignore locked zvols
#12789 Improve log spacemap load time
#12812 Improved zpool status output, list all affected datasets
#13277 FreeBSD: Use NDFREE_PNBUF if available
#13302 Make zfs_max_recordsize default to 16M
#13311 Fix error handling in FreeBSD's get/putpages VOPs
#13345 FreeBSD: Fix translation from ABD to physical pages
#13373 zfs: holds: dequadratify
#13375 Corrected edge case in uncompressed ARC->L2ARC handling
#13388 Improve mg_aliquot math
#13405 Reduce dbuf_find() lock contention
#13406 FreeBSD: use zero_region instead of allocating a dedicated page

Obtained from: OpenZFS
OpenZFS commit: c0cf6ed6792e545fd614c2a88cb53756db7e03f8


# 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


# c03c5b1c 08-Mar-2022 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#9078: log xattr=sa create/remove/update to ZIL
#11919: Cross-platform xattr user namespace compatibility
#13014: Report dnodes with faulty bonuslen
#13016: FreeBSD: Fix zvol_cdev_open locking
#13019: spl: Don't check FreeBSD rwlocks for double initialization
#13027: Fix clearing set-uid and set-gid bits on a file when
replying a write
#13031: Add enumerated vdev names to 'zpool iostat -v' and
'zpool list -v'
#13074: Enable encrypted raw sending to pools with greater ashift
#13076: Receive checks should allow unencrypted child datasets
#13098: Avoid dirtying the final TXGs when exporting a pool
#13172: Fix ENOSPC when unlinking multiple files from full pool

Obtained from: OpenZFS
OpenZFS commit: a86e089415679cf1b98eb424a159bb36aa2c19e3


# 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


# dae17134 17-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@269b5dadc (master) into main

Notable upstream pull request merges:
#12285 Introduce a tunable to exclude special class buffers from L2ARC
#12689 Check l2cache vdevs pending list inside the vdev_inuse()
#12735 Enable edonr in FreeBSD
#12743 FreeBSD: fix world build after de198f2
#12745 Restore dirty dnode detection logic

Obtained from: OpenZFS
OpenZFS commit: 269b5dadcfd1d5732cf763dddcd46009a332eae4


# 6ba2210e 21-Oct-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12392 Avoid panic in case of pool errors and missing L2ARC
#12448 skip snapshot in zfs_iter_mounted()
#12516 Fix NFS and large reads on older kernels
#12533 Fail invalid incremental recursive send gracefully
#12569 FreeBSD: Really zero the zero page
#12575 Reject zfs send -RI with nonexistent fromsnap
#12602 Correct refcount_add in dmu_zfetch
#12650 zpool should call zfs_nicestrtonum() with non-NULL handle

Obtained from: OpenZFS
OpenZFS commit: ec64fdb93d144ab1884097cfd36e18b62a2db848


# 53b70c86 15-Sep-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4a1195ca5 (master) into main

Notable upstream pull request merges:
#11312 Temporarily use root credentials to mount snapshots in .zfs
#12246 arc: Drop an incorrect assert
#12443 Fixed data integrity issue when underlying disk returns error
to zfs
#12522 Compressed receive with different ashift can result in incorrect
PSIZE on disk
#12535 Verify embedded blkptr's in arc_read()
#12541 Allow sending corrupt snapshots even if metadata is corrupted

Obtained from: OpenZFS
OpenZFS commit: 4a1195ca5041cbff2a6b025a31937fef84876c52


# 2faf504d 17-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@8ae86e2ed (master) into main

Notable upstream pull request merges:
#12422 Fix/improve dbuf hits accounting
#12406 Increase default volblocksize from 8KB to 16KB
#12398 Remove b_pabd/b_rabd allocation from arc_hdr_alloc()
#12397 Run arc_evict thread at higher priority
#12297 Avoid vq_lock drop in vdev_queue_aggregate()
#12161 Restore FreeBSD sysctl processing for arc.min and arc.max

Obtained from: OpenZFS
OpenZFS commit: 8ae86e2edc736483c1530fd689525aa2460eaec8


# 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


# 2617128a 30-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4694131a0 (master) into main

Notable upstream pull request merges:
#12253 module/zfs: simplify ddt_stat_add() loop
#12288 Avoid 64bit division in multilist index functions

Obtained from: OpenZFS
OpenZFS commit: 4694131a0a05b6db2727c9801f9729b9378d3064


# 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


# 0d8fe237 20-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12054 Avoid deadlock when removing L2ARC devices under I/O
#12172 Use wmsum for arc, abd, dbuf and zfetch statistics
#12221 vdev_draid_min_asize() ignores reserved space

Obtained from: OpenZFS
OpenZFS commit: c4c162c1e8ff9ce8833014711875d18df520096c


# 3ff01b23 12-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12149: Multiple man-pages: Move to appropriate section
#12158: Re-embed multilist_t storage
#12191: Convert non-libzpool libraries to -fvisibility=hidden
#12196: Unify manpage makefiles, move pages to better sexions, ...
#12210: libzutil: import filtering optimisation
#12212: Remove pool io kstats

Obtained from: OpenZFS
OpenZFS commit: afa7b3484556d3ae610a34582ce5ebd2c3e27bba


# 16038816 08-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@75b4cbf62 (master) into main

Notable upstream pull request merges:
#11710 Allow zfs to send replication streams with missing snapshots
#11751 Avoid taking global lock to destroy zfsdev state
#11786 Ratelimit deadman zevents as with delay zevents
#11803 ZFS traverse_visitbp optimization to limit prefetch
#11813 Allow pool names that look like Solaris disk names
#11822 Atomically check and set dropped zevent count
#11822 Don't scale zfs_zevent_len_max by CPU count
#11833 Refactor zfsdev state init/destroy to share common code
#11837 zfs get -p only outputs 3 columns if "clones" property is empty
#11843 libzutil: zfs_isnumber(): return false if input empty
#11849 Use dsl_scan_setup_check() to setup a scrub
#11861 Improvements to the 'compatibility' property
#11862 cmd/zfs receive: allow dry-run (-n) to check property args
#11864 receive: don't fail inheriting (-x) properties on wrong dataset type
#11877 Combine zio caches if possible
#11881 FreeBSD: use vnlru_free_vfsops if available
#11883 FreeBSD: add support for lockless symlink lookup
#11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr
#11896 Fix crash in zio_done error reporting
#11905 zfs-send(8): Restore sorting of flags
#11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir
#11930 vdev_mirror: don't scrub/resilver devices that can't be read
#11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines
#11955 zfs get: don't lookup mount options when using "-s local"
#11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl
#11959 vdev_id: variable not getting expanded under map_slot()
#11966 Scale worker threads and taskqs with number of CPUs
#11994 Clean up use of zfs_log_create in zfs_dir
#11997 FreeBSD: Don't force xattr mount option
#11997 FreeBSD: Implement xattr=sa
#11997 FreeBSD: Use SET_ERROR to trace xattr name errors
#11998 Simplify/fix dnode_move() for dn_zfetch
#12003 FreeBSD: Initialize/destroy zp->z_lock
#12010 Fix dRAID self-healing short columns
#12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots"
#12040 Reinstate the old zpool read label logic as a fallback
#12046 Improve scrub maxinflight_bytes math
#12049 FreeBSD: avoid memory allocation in arc_prune_async
#12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI
#12061 Fix dRAID sequential resilver silent damage handling
#12072 Let zfs diff be more permissive
#12077 FreeBSD: Retry OCF ENOMEM errors.
#12088 Propagate vdev state due to invalid label corruption
#12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat
#12097 FreeBSD: Update dataset_kstats for zvols in dev mode
#12104 FreeBSD boot code reminder after zpool upgrade
#12114 Introduce write-mostly sums

Obtained from: OpenZFS
OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3


# 6db169e9 13-Apr-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@3522f57b6 (master)

Notable upstream pull request merges:
#11742 When specifying raidz vdev name, parity count should match
#11744 Use a helper function to clarify gang block size
#11771 Support running FreeBSD buildworld on Arm-based macOS hosts

This is the last update that will be MFCed into stable/13.

From now on, the tracking of OpenZFS branches will be different:
- main continues tracking openzfs/zfs/master
- stable/13 is going to track openzfs/zfs/zfs-2.1-release

Obtained from: OpenZFS
MFC after: 1 week


# ba27dd8b 21-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9312e0fd1

Notable upstream changes:
778869fa1 Fix reporting of mount progress
e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD
03e02e5b5 Fix checksum errors not being counted on repeated repair
64e0fe14f Restore FreeBSD resource usage accounting
11f2e9a49 Fix panic if scrubbing after removing a slog device

MFC after: 2 weeks


# 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


# 5dce0384 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: Avoid updating the L2ARC device header unnecessarily

From openzfs-master 0ae184a6b commit message:
If we do not write any buffers to the cache device and the evict hand
has not advanced do not update the cache device header.

Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58
Patch Author: George Amanakis <gamanakis@gmail.com>

MFC after: 3 days
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D28682

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

OpenZFS: Fix issues caused by reversed commits + rebase

# 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
...

# 5596f836 14-Nov-2020 Mateusz Guzik <mjg@FreeBSD.org>

zfs: disable periodic arc updates

They are only there to provide less innacurate statistics for debuggers.
However, this is quite heavy-weight and instead it would be better to
teach debuggers how to obtain the necessary information.

# 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


# 2c48331d 18-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

MFV 2.0-rc2

- Fixes divide by zero for unusual hz
- remove cryptodev dependency


# eac7052f 04-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-gfd20a8

- fixes jail delegation
- fixes raw kstat unsupported complaints
- exposes dbgmsg, dbuf, and checksum benchmark stats
- restore rename -u support


# ac0bf12e 28-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-ga00c61


# 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


# 47bb16f8 17-Nov-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@03e9caaec

Notable upstream pull request merges:
#15516 da51bd17e Fix snap_obj_array memory leak in check_filesystem()
#15519 35da34516 L2ARC: Restrict write size to 1/4 of the device
#15529 03e9caaec Add a tunable to disable BRT support

Obtained from: OpenZFS
OpenZFS commit: 03e9caaec006134b3db9d02ac40fe9369ee78b03


# e716630d 09-Nov-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@887a3c533

Notable upstream pull request merges:
#15022 5caeef02f RAID-Z expansion feature
#15457 887a3c533 Increase L2ARC write rate and headroom
#15504 1c1be60fa Unbreak FreeBSD world build after 3bd4df384

Obtained from: OpenZFS
OpenZFS commit: 887a3c533b94a4b70075e310f15c45b9dee19410


# f8b1db88 01-Nov-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@41e55b476

Notable upstream pull request merges:
#15366 c3773de1 ZIL: Cleanup sync and commit handling
#15409 dbe839a9 zvol: Cleanup set property
#15409 60387fac zvol: Implement zvol threading as a Property
#15409 9ccdb8be zvol: fix delayed update to block device ro entry
#15448 05a7348a RAIDZ: Use cache blocking during parity math
#15452 514d661c Tune zio buffer caches and their alignments
#15456 799e09f7 Unify arc_prune_async() code
#15465 763ca47f Fix block cloning between unencrypted and encrypted
datasets

To make the module version better comparable, the module version number
now includes the commit count since last tag.

Obtained from: OpenZFS
OpenZFS commit: 41e55b476bcfc90f1ad81c02c5375367fdace9e9


# 6c1e79df 30-Oct-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@043c6ee3b

Notable upstream pull request merges:
#15360 97a0b5be Add mutex_enter_interruptible() for interruptible sleeping
IOCTLs
#15381 252f46be ZIL: Detect single-threaded workloads
#15398 3afdc97d ZIO: Remove READY pipeline stage from root ZIOs
#15428 e007908a ABD: Be more assertive in iterators
#15436 07345ac2 Add prefetch property
#15438 e9725abd Revert "Do not persist user/group/project quota zap objects
when unneeded"
#15451 043c6ee3 Read prefetched buffers from L2ARC

Obtained from: OpenZFS
OpenZFS commit: 043c6ee3b6bfb55f8d36e1f048ff13128c279fb8


# 22b267e8 22-Oct-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@797f55ef1

Notable upstream pull request merges:
#14378 c0e58995e Large sync writes perform worse with slog
#14721 797f55ef1 Do not persist user/group/project quota zap objects
when unneeded
#15356 380c25f64 FreeBSD: Improve taskq wrapper
#15390 4fbc52495 Remove lock from dsl_pool_need_dirty_delay()
#15397 57b409856 Trust ARC_BUF_SHARED() more
#15402 b29e98fa8 Properly pad struct tx_cpu to cache line
#15405 ea30b5a9e Set spa_ccw_fail_time=0 when expanding a vdev
#15416 b9384b949 FreeBSD: taskq: Remove unused declaration

Obtained from: OpenZFS
OpenZFS commit: 797f55ef12d752d2a7fb04fae5d24e019adf2a1d


# b2526e8b 08-Oct-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@66b81b349

Notable upstream pull request merges:
#15290 54b1b1d89 import: require force when cachefile hostid doesn't
match on-disk
#15319 342357cd9 Reduce number of metaslab preload taskq threads
#15340 2a6c62109 ARC: Remove b_cv from struct l1arc_buf_hdr
#15347 75a2eb7fa ARC: Drop different size headers for crypto
#15350 96b9cf42e ARC: Remove b_bufcnt/b_ebufcnt from ARC headers
#15353 66b81b349 ZIL: Reduce maximum size of WR_COPIED to 7.5K
#15362 5b8688e62 zfsconcepts: add description of block cloning

Obtained from: OpenZFS
OpenZFS commit: 66b81b349749bc1ba11fa277bee860be03315429


# 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


# b7198dcf 16-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@10e36e176

Notable upstream pull request merges:
#14948 Remove ARC/ZIO physdone callbacks
#14963 Store the L2ARC device ashift in the vdev label
#14970 Switch refcount tracking from lists to AVL-trees
#14981 Shorten arcstat_quiescence sleep time

Obtained from: OpenZFS
OpenZFS commit: 10e36e17612ba9c634b140ae76847bb62b5be68f


# 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


# e639e0d2 12-May-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@e61076683

Notable upstream pull request merges:
#14744 Optimize check_filesystem() and process_error_log()
#14773 Allow zhack label repair to restore detached devices
#14794 zpool import -m also removing spare and cache when log device
is missing
#14805 Simplify and optimize random_int_between()
#14813 Enable the head_errlog feature to remove errors
#14816 Fix two abd_gang_add_gang() issues
#14817 Verify block pointers before writing them out
#14819 Add dmu_tx_hold_append() interface
#14823 Remove single parent assertion from zio_nowait()
#14824 Plug memory leak in zfsdev_state
#14825 Block cloning dbuf fixes
#14828 Remove duplicate code in l2arc_evict()
#14837 Fixes in head_errlog feature with encryption
#14839 Prevent panic during concurrent snapshot rollback and zvol read
#14853 zil: Don't expect zio_shrink() to succeed

Obtained from: OpenZFS
OpenZFS commit: e6107668385044718b0a73330ed6423650806473


# 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


# 15f0b8c3 25-Jan-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@9cd71c860 (master)

Notable upstream pull request merges:
#13805 Configure zed's diagnosis engine with vdev properties
#14110 zfs list: Allow more fields in ZFS_ITER_SIMPLE mode
#14121 Batch enqueue/dequeue for bqueue
#14123 arc_read()/arc_access() refactoring and cleanup
#14159 Bypass metaslab throttle for removal allocations
#14243 Implement uncached prefetch
#14251 Cache dbuf_hash() calculation
#14253 Allow reciever to override encryption property in case of replication
#14254 Restrict visibility of per-dataset kstats inside FreeBSD jails
#14255 Zero end of embedded block buffer in dump_write_embedded()
#14263 Cleanups identified by CodeQL and Coverity
#14264 Miscellaneous fixes
#14272 Change ZEVENT_POOL_GUID to ZEVENT_POOL to display pool names
#14287 FreeBSD: Remove stray debug printf
#14288 Colorize zfs diff output
#14289 deadlock between spa_errlog_lock and dp_config_rwlock
#14291 FreeBSD: Fix potential boot panic with bad label
#14292 Add tunable to allow changing micro ZAP's max size
#14293 Turn default_bs and default_ibs into ZFS_MODULE_PARAMs
#14295 zed: add hotplug support for spare vdevs
#14304 Activate filesystem features only in syncing context
#14311 zpool: do guid-based comparison in is_vdev_cb()
#14317 Pack zrlock_t by 8 bytes
#14320 Update arc_summary and arcstat outputs
#14328 FreeBSD: catch up to 1400077
#14376 Use setproctitle to report progress of zfs send
#14340 Remove some dead ARC code
#14358 Wait for txg sync if the last DRR_FREEOBJECTS might result in a hole
#14360 libzpool: fix ddi_strtoull to update nptr
#14364 Fix unprotected zfs_znode_dmu_fini
#14379 zfs_receive_one: Check for the more likely error first
#14380 Cleanup of dead code suggested by Clang Static Analyzer
#14397 Avoid passing an uninitialized index to dsl_prop_known_index
#14404 Fix reading uninitialized variable in receive_read
#14407 free_blocks(): Fix reports from 2016 PVS Studio FreeBSD report
#14418 Introduce minimal ZIL block commit delay
#14422 x86 assembly: fix .size placement and replace .align with .balign

Obtained from: OpenZFS
OpenZFS commit: 9cd71c8604d52def22ffaddc35755712f0fb9349


# 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


# c7046f76 21-Sep-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c629f0bf6

Notable upstream pull request merges:
#13725 Fix BLAKE3 tuneable and module loading on Linux and FreeBSD
#13756 FreeBSD: Organize sysctls
#13773 FreeBSD: add kqfilter support for zvol cdev
#13781 Importing from cachefile can trip assertion
#13794 Apply arc_shrink_shift to ARC above arc_c_min
#13798 Improve too large physical ashift handling
#13799 Revert "Avoid panic with recordsize > 128k, raw sending and
no large_blocks"
#13802 Add zfs.sync.snapshot_rename
#13831 zfs_enter rework
#13855 zfs recv hangs if max recordsize is less than received
recordsize

Obtained from: OpenZFS
OpenZFS commit: c629f0bf62e351355716f9870d6c2e377584b016


# 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


# 716fd348 18-May-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c0cf6ed67

Notable upstream pull request merges:
#10662 zvol_wait: Ignore locked zvols
#12789 Improve log spacemap load time
#12812 Improved zpool status output, list all affected datasets
#13277 FreeBSD: Use NDFREE_PNBUF if available
#13302 Make zfs_max_recordsize default to 16M
#13311 Fix error handling in FreeBSD's get/putpages VOPs
#13345 FreeBSD: Fix translation from ABD to physical pages
#13373 zfs: holds: dequadratify
#13375 Corrected edge case in uncompressed ARC->L2ARC handling
#13388 Improve mg_aliquot math
#13405 Reduce dbuf_find() lock contention
#13406 FreeBSD: use zero_region instead of allocating a dedicated page

Obtained from: OpenZFS
OpenZFS commit: c0cf6ed6792e545fd614c2a88cb53756db7e03f8


# 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


# c03c5b1c 08-Mar-2022 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#9078: log xattr=sa create/remove/update to ZIL
#11919: Cross-platform xattr user namespace compatibility
#13014: Report dnodes with faulty bonuslen
#13016: FreeBSD: Fix zvol_cdev_open locking
#13019: spl: Don't check FreeBSD rwlocks for double initialization
#13027: Fix clearing set-uid and set-gid bits on a file when
replying a write
#13031: Add enumerated vdev names to 'zpool iostat -v' and
'zpool list -v'
#13074: Enable encrypted raw sending to pools with greater ashift
#13076: Receive checks should allow unencrypted child datasets
#13098: Avoid dirtying the final TXGs when exporting a pool
#13172: Fix ENOSPC when unlinking multiple files from full pool

Obtained from: OpenZFS
OpenZFS commit: a86e089415679cf1b98eb424a159bb36aa2c19e3


# 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


# dae17134 17-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@269b5dadc (master) into main

Notable upstream pull request merges:
#12285 Introduce a tunable to exclude special class buffers from L2ARC
#12689 Check l2cache vdevs pending list inside the vdev_inuse()
#12735 Enable edonr in FreeBSD
#12743 FreeBSD: fix world build after de198f2
#12745 Restore dirty dnode detection logic

Obtained from: OpenZFS
OpenZFS commit: 269b5dadcfd1d5732cf763dddcd46009a332eae4


# 6ba2210e 21-Oct-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12392 Avoid panic in case of pool errors and missing L2ARC
#12448 skip snapshot in zfs_iter_mounted()
#12516 Fix NFS and large reads on older kernels
#12533 Fail invalid incremental recursive send gracefully
#12569 FreeBSD: Really zero the zero page
#12575 Reject zfs send -RI with nonexistent fromsnap
#12602 Correct refcount_add in dmu_zfetch
#12650 zpool should call zfs_nicestrtonum() with non-NULL handle

Obtained from: OpenZFS
OpenZFS commit: ec64fdb93d144ab1884097cfd36e18b62a2db848


# 53b70c86 15-Sep-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4a1195ca5 (master) into main

Notable upstream pull request merges:
#11312 Temporarily use root credentials to mount snapshots in .zfs
#12246 arc: Drop an incorrect assert
#12443 Fixed data integrity issue when underlying disk returns error
to zfs
#12522 Compressed receive with different ashift can result in incorrect
PSIZE on disk
#12535 Verify embedded blkptr's in arc_read()
#12541 Allow sending corrupt snapshots even if metadata is corrupted

Obtained from: OpenZFS
OpenZFS commit: 4a1195ca5041cbff2a6b025a31937fef84876c52


# 2faf504d 17-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@8ae86e2ed (master) into main

Notable upstream pull request merges:
#12422 Fix/improve dbuf hits accounting
#12406 Increase default volblocksize from 8KB to 16KB
#12398 Remove b_pabd/b_rabd allocation from arc_hdr_alloc()
#12397 Run arc_evict thread at higher priority
#12297 Avoid vq_lock drop in vdev_queue_aggregate()
#12161 Restore FreeBSD sysctl processing for arc.min and arc.max

Obtained from: OpenZFS
OpenZFS commit: 8ae86e2edc736483c1530fd689525aa2460eaec8


# 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


# 2617128a 30-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4694131a0 (master) into main

Notable upstream pull request merges:
#12253 module/zfs: simplify ddt_stat_add() loop
#12288 Avoid 64bit division in multilist index functions

Obtained from: OpenZFS
OpenZFS commit: 4694131a0a05b6db2727c9801f9729b9378d3064


# 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


# 0d8fe237 20-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12054 Avoid deadlock when removing L2ARC devices under I/O
#12172 Use wmsum for arc, abd, dbuf and zfetch statistics
#12221 vdev_draid_min_asize() ignores reserved space

Obtained from: OpenZFS
OpenZFS commit: c4c162c1e8ff9ce8833014711875d18df520096c


# 3ff01b23 12-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12149: Multiple man-pages: Move to appropriate section
#12158: Re-embed multilist_t storage
#12191: Convert non-libzpool libraries to -fvisibility=hidden
#12196: Unify manpage makefiles, move pages to better sexions, ...
#12210: libzutil: import filtering optimisation
#12212: Remove pool io kstats

Obtained from: OpenZFS
OpenZFS commit: afa7b3484556d3ae610a34582ce5ebd2c3e27bba


# 16038816 08-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@75b4cbf62 (master) into main

Notable upstream pull request merges:
#11710 Allow zfs to send replication streams with missing snapshots
#11751 Avoid taking global lock to destroy zfsdev state
#11786 Ratelimit deadman zevents as with delay zevents
#11803 ZFS traverse_visitbp optimization to limit prefetch
#11813 Allow pool names that look like Solaris disk names
#11822 Atomically check and set dropped zevent count
#11822 Don't scale zfs_zevent_len_max by CPU count
#11833 Refactor zfsdev state init/destroy to share common code
#11837 zfs get -p only outputs 3 columns if "clones" property is empty
#11843 libzutil: zfs_isnumber(): return false if input empty
#11849 Use dsl_scan_setup_check() to setup a scrub
#11861 Improvements to the 'compatibility' property
#11862 cmd/zfs receive: allow dry-run (-n) to check property args
#11864 receive: don't fail inheriting (-x) properties on wrong dataset type
#11877 Combine zio caches if possible
#11881 FreeBSD: use vnlru_free_vfsops if available
#11883 FreeBSD: add support for lockless symlink lookup
#11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr
#11896 Fix crash in zio_done error reporting
#11905 zfs-send(8): Restore sorting of flags
#11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir
#11930 vdev_mirror: don't scrub/resilver devices that can't be read
#11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines
#11955 zfs get: don't lookup mount options when using "-s local"
#11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl
#11959 vdev_id: variable not getting expanded under map_slot()
#11966 Scale worker threads and taskqs with number of CPUs
#11994 Clean up use of zfs_log_create in zfs_dir
#11997 FreeBSD: Don't force xattr mount option
#11997 FreeBSD: Implement xattr=sa
#11997 FreeBSD: Use SET_ERROR to trace xattr name errors
#11998 Simplify/fix dnode_move() for dn_zfetch
#12003 FreeBSD: Initialize/destroy zp->z_lock
#12010 Fix dRAID self-healing short columns
#12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots"
#12040 Reinstate the old zpool read label logic as a fallback
#12046 Improve scrub maxinflight_bytes math
#12049 FreeBSD: avoid memory allocation in arc_prune_async
#12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI
#12061 Fix dRAID sequential resilver silent damage handling
#12072 Let zfs diff be more permissive
#12077 FreeBSD: Retry OCF ENOMEM errors.
#12088 Propagate vdev state due to invalid label corruption
#12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat
#12097 FreeBSD: Update dataset_kstats for zvols in dev mode
#12104 FreeBSD boot code reminder after zpool upgrade
#12114 Introduce write-mostly sums

Obtained from: OpenZFS
OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3


# 6db169e9 13-Apr-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@3522f57b6 (master)

Notable upstream pull request merges:
#11742 When specifying raidz vdev name, parity count should match
#11744 Use a helper function to clarify gang block size
#11771 Support running FreeBSD buildworld on Arm-based macOS hosts

This is the last update that will be MFCed into stable/13.

From now on, the tracking of OpenZFS branches will be different:
- main continues tracking openzfs/zfs/master
- stable/13 is going to track openzfs/zfs/zfs-2.1-release

Obtained from: OpenZFS
MFC after: 1 week


# ba27dd8b 21-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9312e0fd1

Notable upstream changes:
778869fa1 Fix reporting of mount progress
e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD
03e02e5b5 Fix checksum errors not being counted on repeated repair
64e0fe14f Restore FreeBSD resource usage accounting
11f2e9a49 Fix panic if scrubbing after removing a slog device

MFC after: 2 weeks


# 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


# 5dce0384 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: Avoid updating the L2ARC device header unnecessarily

From openzfs-master 0ae184a6b commit message:
If we do not write any buffers to the cache device and the evict hand
has not advanced do not update the cache device header.

Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58
Patch Author: George Amanakis <gamanakis@gmail.com>

MFC after: 3 days
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D28682

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

OpenZFS: Fix issues caused by reversed commits + rebase

# 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
...

# 5596f836 14-Nov-2020 Mateusz Guzik <mjg@FreeBSD.org>

zfs: disable periodic arc updates

They are only there to provide less innacurate statistics for debuggers.
However, this is quite heavy-weight and instead it would be better to
teach debuggers how to obtain the necessary information.

# 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


# 2c48331d 18-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

MFV 2.0-rc2

- Fixes divide by zero for unusual hz
- remove cryptodev dependency


# eac7052f 04-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-gfd20a8

- fixes jail delegation
- fixes raw kstat unsupported complaints
- exposes dbgmsg, dbuf, and checksum benchmark stats
- restore rename -u support


# ac0bf12e 28-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-ga00c61


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

Initial import from vendor-sys branch of openzfs


# 47bb16f8 17-Nov-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@03e9caaec

Notable upstream pull request merges:
#15516 da51bd17e Fix snap_obj_array memory leak in check_filesystem()
#15519 35da34516 L2ARC: Restrict write size to 1/4 of the device
#15529 03e9caaec Add a tunable to disable BRT support

Obtained from: OpenZFS
OpenZFS commit: 03e9caaec006134b3db9d02ac40fe9369ee78b03


# e716630d 09-Nov-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@887a3c533

Notable upstream pull request merges:
#15022 5caeef02f RAID-Z expansion feature
#15457 887a3c533 Increase L2ARC write rate and headroom
#15504 1c1be60fa Unbreak FreeBSD world build after 3bd4df384

Obtained from: OpenZFS
OpenZFS commit: 887a3c533b94a4b70075e310f15c45b9dee19410


# f8b1db88 01-Nov-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@41e55b476

Notable upstream pull request merges:
#15366 c3773de1 ZIL: Cleanup sync and commit handling
#15409 dbe839a9 zvol: Cleanup set property
#15409 60387fac zvol: Implement zvol threading as a Property
#15409 9ccdb8be zvol: fix delayed update to block device ro entry
#15448 05a7348a RAIDZ: Use cache blocking during parity math
#15452 514d661c Tune zio buffer caches and their alignments
#15456 799e09f7 Unify arc_prune_async() code
#15465 763ca47f Fix block cloning between unencrypted and encrypted
datasets

To make the module version better comparable, the module version number
now includes the commit count since last tag.

Obtained from: OpenZFS
OpenZFS commit: 41e55b476bcfc90f1ad81c02c5375367fdace9e9


# 6c1e79df 30-Oct-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@043c6ee3b

Notable upstream pull request merges:
#15360 97a0b5be Add mutex_enter_interruptible() for interruptible sleeping
IOCTLs
#15381 252f46be ZIL: Detect single-threaded workloads
#15398 3afdc97d ZIO: Remove READY pipeline stage from root ZIOs
#15428 e007908a ABD: Be more assertive in iterators
#15436 07345ac2 Add prefetch property
#15438 e9725abd Revert "Do not persist user/group/project quota zap objects
when unneeded"
#15451 043c6ee3 Read prefetched buffers from L2ARC

Obtained from: OpenZFS
OpenZFS commit: 043c6ee3b6bfb55f8d36e1f048ff13128c279fb8


# 22b267e8 22-Oct-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@797f55ef1

Notable upstream pull request merges:
#14378 c0e58995e Large sync writes perform worse with slog
#14721 797f55ef1 Do not persist user/group/project quota zap objects
when unneeded
#15356 380c25f64 FreeBSD: Improve taskq wrapper
#15390 4fbc52495 Remove lock from dsl_pool_need_dirty_delay()
#15397 57b409856 Trust ARC_BUF_SHARED() more
#15402 b29e98fa8 Properly pad struct tx_cpu to cache line
#15405 ea30b5a9e Set spa_ccw_fail_time=0 when expanding a vdev
#15416 b9384b949 FreeBSD: taskq: Remove unused declaration

Obtained from: OpenZFS
OpenZFS commit: 797f55ef12d752d2a7fb04fae5d24e019adf2a1d


# b2526e8b 08-Oct-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@66b81b349

Notable upstream pull request merges:
#15290 54b1b1d89 import: require force when cachefile hostid doesn't
match on-disk
#15319 342357cd9 Reduce number of metaslab preload taskq threads
#15340 2a6c62109 ARC: Remove b_cv from struct l1arc_buf_hdr
#15347 75a2eb7fa ARC: Drop different size headers for crypto
#15350 96b9cf42e ARC: Remove b_bufcnt/b_ebufcnt from ARC headers
#15353 66b81b349 ZIL: Reduce maximum size of WR_COPIED to 7.5K
#15362 5b8688e62 zfsconcepts: add description of block cloning

Obtained from: OpenZFS
OpenZFS commit: 66b81b349749bc1ba11fa277bee860be03315429


# 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


# b7198dcf 16-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@10e36e176

Notable upstream pull request merges:
#14948 Remove ARC/ZIO physdone callbacks
#14963 Store the L2ARC device ashift in the vdev label
#14970 Switch refcount tracking from lists to AVL-trees
#14981 Shorten arcstat_quiescence sleep time

Obtained from: OpenZFS
OpenZFS commit: 10e36e17612ba9c634b140ae76847bb62b5be68f


# 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


# e639e0d2 12-May-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@e61076683

Notable upstream pull request merges:
#14744 Optimize check_filesystem() and process_error_log()
#14773 Allow zhack label repair to restore detached devices
#14794 zpool import -m also removing spare and cache when log device
is missing
#14805 Simplify and optimize random_int_between()
#14813 Enable the head_errlog feature to remove errors
#14816 Fix two abd_gang_add_gang() issues
#14817 Verify block pointers before writing them out
#14819 Add dmu_tx_hold_append() interface
#14823 Remove single parent assertion from zio_nowait()
#14824 Plug memory leak in zfsdev_state
#14825 Block cloning dbuf fixes
#14828 Remove duplicate code in l2arc_evict()
#14837 Fixes in head_errlog feature with encryption
#14839 Prevent panic during concurrent snapshot rollback and zvol read
#14853 zil: Don't expect zio_shrink() to succeed

Obtained from: OpenZFS
OpenZFS commit: e6107668385044718b0a73330ed6423650806473


# 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


# 15f0b8c3 25-Jan-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@9cd71c860 (master)

Notable upstream pull request merges:
#13805 Configure zed's diagnosis engine with vdev properties
#14110 zfs list: Allow more fields in ZFS_ITER_SIMPLE mode
#14121 Batch enqueue/dequeue for bqueue
#14123 arc_read()/arc_access() refactoring and cleanup
#14159 Bypass metaslab throttle for removal allocations
#14243 Implement uncached prefetch
#14251 Cache dbuf_hash() calculation
#14253 Allow reciever to override encryption property in case of replication
#14254 Restrict visibility of per-dataset kstats inside FreeBSD jails
#14255 Zero end of embedded block buffer in dump_write_embedded()
#14263 Cleanups identified by CodeQL and Coverity
#14264 Miscellaneous fixes
#14272 Change ZEVENT_POOL_GUID to ZEVENT_POOL to display pool names
#14287 FreeBSD: Remove stray debug printf
#14288 Colorize zfs diff output
#14289 deadlock between spa_errlog_lock and dp_config_rwlock
#14291 FreeBSD: Fix potential boot panic with bad label
#14292 Add tunable to allow changing micro ZAP's max size
#14293 Turn default_bs and default_ibs into ZFS_MODULE_PARAMs
#14295 zed: add hotplug support for spare vdevs
#14304 Activate filesystem features only in syncing context
#14311 zpool: do guid-based comparison in is_vdev_cb()
#14317 Pack zrlock_t by 8 bytes
#14320 Update arc_summary and arcstat outputs
#14328 FreeBSD: catch up to 1400077
#14376 Use setproctitle to report progress of zfs send
#14340 Remove some dead ARC code
#14358 Wait for txg sync if the last DRR_FREEOBJECTS might result in a hole
#14360 libzpool: fix ddi_strtoull to update nptr
#14364 Fix unprotected zfs_znode_dmu_fini
#14379 zfs_receive_one: Check for the more likely error first
#14380 Cleanup of dead code suggested by Clang Static Analyzer
#14397 Avoid passing an uninitialized index to dsl_prop_known_index
#14404 Fix reading uninitialized variable in receive_read
#14407 free_blocks(): Fix reports from 2016 PVS Studio FreeBSD report
#14418 Introduce minimal ZIL block commit delay
#14422 x86 assembly: fix .size placement and replace .align with .balign

Obtained from: OpenZFS
OpenZFS commit: 9cd71c8604d52def22ffaddc35755712f0fb9349


# 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


# c7046f76 21-Sep-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c629f0bf6

Notable upstream pull request merges:
#13725 Fix BLAKE3 tuneable and module loading on Linux and FreeBSD
#13756 FreeBSD: Organize sysctls
#13773 FreeBSD: add kqfilter support for zvol cdev
#13781 Importing from cachefile can trip assertion
#13794 Apply arc_shrink_shift to ARC above arc_c_min
#13798 Improve too large physical ashift handling
#13799 Revert "Avoid panic with recordsize > 128k, raw sending and
no large_blocks"
#13802 Add zfs.sync.snapshot_rename
#13831 zfs_enter rework
#13855 zfs recv hangs if max recordsize is less than received
recordsize

Obtained from: OpenZFS
OpenZFS commit: c629f0bf62e351355716f9870d6c2e377584b016


# 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


# 716fd348 18-May-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c0cf6ed67

Notable upstream pull request merges:
#10662 zvol_wait: Ignore locked zvols
#12789 Improve log spacemap load time
#12812 Improved zpool status output, list all affected datasets
#13277 FreeBSD: Use NDFREE_PNBUF if available
#13302 Make zfs_max_recordsize default to 16M
#13311 Fix error handling in FreeBSD's get/putpages VOPs
#13345 FreeBSD: Fix translation from ABD to physical pages
#13373 zfs: holds: dequadratify
#13375 Corrected edge case in uncompressed ARC->L2ARC handling
#13388 Improve mg_aliquot math
#13405 Reduce dbuf_find() lock contention
#13406 FreeBSD: use zero_region instead of allocating a dedicated page

Obtained from: OpenZFS
OpenZFS commit: c0cf6ed6792e545fd614c2a88cb53756db7e03f8


# 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


# c03c5b1c 08-Mar-2022 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#9078: log xattr=sa create/remove/update to ZIL
#11919: Cross-platform xattr user namespace compatibility
#13014: Report dnodes with faulty bonuslen
#13016: FreeBSD: Fix zvol_cdev_open locking
#13019: spl: Don't check FreeBSD rwlocks for double initialization
#13027: Fix clearing set-uid and set-gid bits on a file when
replying a write
#13031: Add enumerated vdev names to 'zpool iostat -v' and
'zpool list -v'
#13074: Enable encrypted raw sending to pools with greater ashift
#13076: Receive checks should allow unencrypted child datasets
#13098: Avoid dirtying the final TXGs when exporting a pool
#13172: Fix ENOSPC when unlinking multiple files from full pool

Obtained from: OpenZFS
OpenZFS commit: a86e089415679cf1b98eb424a159bb36aa2c19e3


# 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


# dae17134 17-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@269b5dadc (master) into main

Notable upstream pull request merges:
#12285 Introduce a tunable to exclude special class buffers from L2ARC
#12689 Check l2cache vdevs pending list inside the vdev_inuse()
#12735 Enable edonr in FreeBSD
#12743 FreeBSD: fix world build after de198f2
#12745 Restore dirty dnode detection logic

Obtained from: OpenZFS
OpenZFS commit: 269b5dadcfd1d5732cf763dddcd46009a332eae4


# 6ba2210e 21-Oct-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12392 Avoid panic in case of pool errors and missing L2ARC
#12448 skip snapshot in zfs_iter_mounted()
#12516 Fix NFS and large reads on older kernels
#12533 Fail invalid incremental recursive send gracefully
#12569 FreeBSD: Really zero the zero page
#12575 Reject zfs send -RI with nonexistent fromsnap
#12602 Correct refcount_add in dmu_zfetch
#12650 zpool should call zfs_nicestrtonum() with non-NULL handle

Obtained from: OpenZFS
OpenZFS commit: ec64fdb93d144ab1884097cfd36e18b62a2db848


# 53b70c86 15-Sep-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4a1195ca5 (master) into main

Notable upstream pull request merges:
#11312 Temporarily use root credentials to mount snapshots in .zfs
#12246 arc: Drop an incorrect assert
#12443 Fixed data integrity issue when underlying disk returns error
to zfs
#12522 Compressed receive with different ashift can result in incorrect
PSIZE on disk
#12535 Verify embedded blkptr's in arc_read()
#12541 Allow sending corrupt snapshots even if metadata is corrupted

Obtained from: OpenZFS
OpenZFS commit: 4a1195ca5041cbff2a6b025a31937fef84876c52


# 2faf504d 17-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@8ae86e2ed (master) into main

Notable upstream pull request merges:
#12422 Fix/improve dbuf hits accounting
#12406 Increase default volblocksize from 8KB to 16KB
#12398 Remove b_pabd/b_rabd allocation from arc_hdr_alloc()
#12397 Run arc_evict thread at higher priority
#12297 Avoid vq_lock drop in vdev_queue_aggregate()
#12161 Restore FreeBSD sysctl processing for arc.min and arc.max

Obtained from: OpenZFS
OpenZFS commit: 8ae86e2edc736483c1530fd689525aa2460eaec8


# 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


# 2617128a 30-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4694131a0 (master) into main

Notable upstream pull request merges:
#12253 module/zfs: simplify ddt_stat_add() loop
#12288 Avoid 64bit division in multilist index functions

Obtained from: OpenZFS
OpenZFS commit: 4694131a0a05b6db2727c9801f9729b9378d3064


# 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


# 0d8fe237 20-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12054 Avoid deadlock when removing L2ARC devices under I/O
#12172 Use wmsum for arc, abd, dbuf and zfetch statistics
#12221 vdev_draid_min_asize() ignores reserved space

Obtained from: OpenZFS
OpenZFS commit: c4c162c1e8ff9ce8833014711875d18df520096c


# 3ff01b23 12-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12149: Multiple man-pages: Move to appropriate section
#12158: Re-embed multilist_t storage
#12191: Convert non-libzpool libraries to -fvisibility=hidden
#12196: Unify manpage makefiles, move pages to better sexions, ...
#12210: libzutil: import filtering optimisation
#12212: Remove pool io kstats

Obtained from: OpenZFS
OpenZFS commit: afa7b3484556d3ae610a34582ce5ebd2c3e27bba


# 16038816 08-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@75b4cbf62 (master) into main

Notable upstream pull request merges:
#11710 Allow zfs to send replication streams with missing snapshots
#11751 Avoid taking global lock to destroy zfsdev state
#11786 Ratelimit deadman zevents as with delay zevents
#11803 ZFS traverse_visitbp optimization to limit prefetch
#11813 Allow pool names that look like Solaris disk names
#11822 Atomically check and set dropped zevent count
#11822 Don't scale zfs_zevent_len_max by CPU count
#11833 Refactor zfsdev state init/destroy to share common code
#11837 zfs get -p only outputs 3 columns if "clones" property is empty
#11843 libzutil: zfs_isnumber(): return false if input empty
#11849 Use dsl_scan_setup_check() to setup a scrub
#11861 Improvements to the 'compatibility' property
#11862 cmd/zfs receive: allow dry-run (-n) to check property args
#11864 receive: don't fail inheriting (-x) properties on wrong dataset type
#11877 Combine zio caches if possible
#11881 FreeBSD: use vnlru_free_vfsops if available
#11883 FreeBSD: add support for lockless symlink lookup
#11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr
#11896 Fix crash in zio_done error reporting
#11905 zfs-send(8): Restore sorting of flags
#11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir
#11930 vdev_mirror: don't scrub/resilver devices that can't be read
#11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines
#11955 zfs get: don't lookup mount options when using "-s local"
#11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl
#11959 vdev_id: variable not getting expanded under map_slot()
#11966 Scale worker threads and taskqs with number of CPUs
#11994 Clean up use of zfs_log_create in zfs_dir
#11997 FreeBSD: Don't force xattr mount option
#11997 FreeBSD: Implement xattr=sa
#11997 FreeBSD: Use SET_ERROR to trace xattr name errors
#11998 Simplify/fix dnode_move() for dn_zfetch
#12003 FreeBSD: Initialize/destroy zp->z_lock
#12010 Fix dRAID self-healing short columns
#12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots"
#12040 Reinstate the old zpool read label logic as a fallback
#12046 Improve scrub maxinflight_bytes math
#12049 FreeBSD: avoid memory allocation in arc_prune_async
#12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI
#12061 Fix dRAID sequential resilver silent damage handling
#12072 Let zfs diff be more permissive
#12077 FreeBSD: Retry OCF ENOMEM errors.
#12088 Propagate vdev state due to invalid label corruption
#12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat
#12097 FreeBSD: Update dataset_kstats for zvols in dev mode
#12104 FreeBSD boot code reminder after zpool upgrade
#12114 Introduce write-mostly sums

Obtained from: OpenZFS
OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3


# 6db169e9 13-Apr-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@3522f57b6 (master)

Notable upstream pull request merges:
#11742 When specifying raidz vdev name, parity count should match
#11744 Use a helper function to clarify gang block size
#11771 Support running FreeBSD buildworld on Arm-based macOS hosts

This is the last update that will be MFCed into stable/13.

From now on, the tracking of OpenZFS branches will be different:
- main continues tracking openzfs/zfs/master
- stable/13 is going to track openzfs/zfs/zfs-2.1-release

Obtained from: OpenZFS
MFC after: 1 week


# ba27dd8b 21-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9312e0fd1

Notable upstream changes:
778869fa1 Fix reporting of mount progress
e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD
03e02e5b5 Fix checksum errors not being counted on repeated repair
64e0fe14f Restore FreeBSD resource usage accounting
11f2e9a49 Fix panic if scrubbing after removing a slog device

MFC after: 2 weeks


# 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


# 5dce0384 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: Avoid updating the L2ARC device header unnecessarily

From openzfs-master 0ae184a6b commit message:
If we do not write any buffers to the cache device and the evict hand
has not advanced do not update the cache device header.

Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58
Patch Author: George Amanakis <gamanakis@gmail.com>

MFC after: 3 days
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D28682

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

OpenZFS: Fix issues caused by reversed commits + rebase

# 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
...

# 5596f836 14-Nov-2020 Mateusz Guzik <mjg@FreeBSD.org>

zfs: disable periodic arc updates

They are only there to provide less innacurate statistics for debuggers.
However, this is quite heavy-weight and instead it would be better to
teach debuggers how to obtain the necessary information.

# 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


# 2c48331d 18-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

MFV 2.0-rc2

- Fixes divide by zero for unusual hz
- remove cryptodev dependency


# eac7052f 04-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-gfd20a8

- fixes jail delegation
- fixes raw kstat unsupported complaints
- exposes dbgmsg, dbuf, and checksum benchmark stats
- restore rename -u support


# ac0bf12e 28-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-ga00c61


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

Initial import from vendor-sys branch of openzfs


# e716630d 09-Nov-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@887a3c533

Notable upstream pull request merges:
#15022 5caeef02f RAID-Z expansion feature
#15457 887a3c533 Increase L2ARC write rate and headroom
#15504 1c1be60fa Unbreak FreeBSD world build after 3bd4df384

Obtained from: OpenZFS
OpenZFS commit: 887a3c533b94a4b70075e310f15c45b9dee19410


# f8b1db88 01-Nov-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@41e55b476

Notable upstream pull request merges:
#15366 c3773de1 ZIL: Cleanup sync and commit handling
#15409 dbe839a9 zvol: Cleanup set property
#15409 60387fac zvol: Implement zvol threading as a Property
#15409 9ccdb8be zvol: fix delayed update to block device ro entry
#15448 05a7348a RAIDZ: Use cache blocking during parity math
#15452 514d661c Tune zio buffer caches and their alignments
#15456 799e09f7 Unify arc_prune_async() code
#15465 763ca47f Fix block cloning between unencrypted and encrypted
datasets

To make the module version better comparable, the module version number
now includes the commit count since last tag.

Obtained from: OpenZFS
OpenZFS commit: 41e55b476bcfc90f1ad81c02c5375367fdace9e9


# 6c1e79df 30-Oct-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@043c6ee3b

Notable upstream pull request merges:
#15360 97a0b5be Add mutex_enter_interruptible() for interruptible sleeping
IOCTLs
#15381 252f46be ZIL: Detect single-threaded workloads
#15398 3afdc97d ZIO: Remove READY pipeline stage from root ZIOs
#15428 e007908a ABD: Be more assertive in iterators
#15436 07345ac2 Add prefetch property
#15438 e9725abd Revert "Do not persist user/group/project quota zap objects
when unneeded"
#15451 043c6ee3 Read prefetched buffers from L2ARC

Obtained from: OpenZFS
OpenZFS commit: 043c6ee3b6bfb55f8d36e1f048ff13128c279fb8


# 22b267e8 22-Oct-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@797f55ef1

Notable upstream pull request merges:
#14378 c0e58995e Large sync writes perform worse with slog
#14721 797f55ef1 Do not persist user/group/project quota zap objects
when unneeded
#15356 380c25f64 FreeBSD: Improve taskq wrapper
#15390 4fbc52495 Remove lock from dsl_pool_need_dirty_delay()
#15397 57b409856 Trust ARC_BUF_SHARED() more
#15402 b29e98fa8 Properly pad struct tx_cpu to cache line
#15405 ea30b5a9e Set spa_ccw_fail_time=0 when expanding a vdev
#15416 b9384b949 FreeBSD: taskq: Remove unused declaration

Obtained from: OpenZFS
OpenZFS commit: 797f55ef12d752d2a7fb04fae5d24e019adf2a1d


# b2526e8b 08-Oct-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@66b81b349

Notable upstream pull request merges:
#15290 54b1b1d89 import: require force when cachefile hostid doesn't
match on-disk
#15319 342357cd9 Reduce number of metaslab preload taskq threads
#15340 2a6c62109 ARC: Remove b_cv from struct l1arc_buf_hdr
#15347 75a2eb7fa ARC: Drop different size headers for crypto
#15350 96b9cf42e ARC: Remove b_bufcnt/b_ebufcnt from ARC headers
#15353 66b81b349 ZIL: Reduce maximum size of WR_COPIED to 7.5K
#15362 5b8688e62 zfsconcepts: add description of block cloning

Obtained from: OpenZFS
OpenZFS commit: 66b81b349749bc1ba11fa277bee860be03315429


# 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


# b7198dcf 16-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@10e36e176

Notable upstream pull request merges:
#14948 Remove ARC/ZIO physdone callbacks
#14963 Store the L2ARC device ashift in the vdev label
#14970 Switch refcount tracking from lists to AVL-trees
#14981 Shorten arcstat_quiescence sleep time

Obtained from: OpenZFS
OpenZFS commit: 10e36e17612ba9c634b140ae76847bb62b5be68f


# 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


# e639e0d2 12-May-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@e61076683

Notable upstream pull request merges:
#14744 Optimize check_filesystem() and process_error_log()
#14773 Allow zhack label repair to restore detached devices
#14794 zpool import -m also removing spare and cache when log device
is missing
#14805 Simplify and optimize random_int_between()
#14813 Enable the head_errlog feature to remove errors
#14816 Fix two abd_gang_add_gang() issues
#14817 Verify block pointers before writing them out
#14819 Add dmu_tx_hold_append() interface
#14823 Remove single parent assertion from zio_nowait()
#14824 Plug memory leak in zfsdev_state
#14825 Block cloning dbuf fixes
#14828 Remove duplicate code in l2arc_evict()
#14837 Fixes in head_errlog feature with encryption
#14839 Prevent panic during concurrent snapshot rollback and zvol read
#14853 zil: Don't expect zio_shrink() to succeed

Obtained from: OpenZFS
OpenZFS commit: e6107668385044718b0a73330ed6423650806473


# 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


# 15f0b8c3 25-Jan-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@9cd71c860 (master)

Notable upstream pull request merges:
#13805 Configure zed's diagnosis engine with vdev properties
#14110 zfs list: Allow more fields in ZFS_ITER_SIMPLE mode
#14121 Batch enqueue/dequeue for bqueue
#14123 arc_read()/arc_access() refactoring and cleanup
#14159 Bypass metaslab throttle for removal allocations
#14243 Implement uncached prefetch
#14251 Cache dbuf_hash() calculation
#14253 Allow reciever to override encryption property in case of replication
#14254 Restrict visibility of per-dataset kstats inside FreeBSD jails
#14255 Zero end of embedded block buffer in dump_write_embedded()
#14263 Cleanups identified by CodeQL and Coverity
#14264 Miscellaneous fixes
#14272 Change ZEVENT_POOL_GUID to ZEVENT_POOL to display pool names
#14287 FreeBSD: Remove stray debug printf
#14288 Colorize zfs diff output
#14289 deadlock between spa_errlog_lock and dp_config_rwlock
#14291 FreeBSD: Fix potential boot panic with bad label
#14292 Add tunable to allow changing micro ZAP's max size
#14293 Turn default_bs and default_ibs into ZFS_MODULE_PARAMs
#14295 zed: add hotplug support for spare vdevs
#14304 Activate filesystem features only in syncing context
#14311 zpool: do guid-based comparison in is_vdev_cb()
#14317 Pack zrlock_t by 8 bytes
#14320 Update arc_summary and arcstat outputs
#14328 FreeBSD: catch up to 1400077
#14376 Use setproctitle to report progress of zfs send
#14340 Remove some dead ARC code
#14358 Wait for txg sync if the last DRR_FREEOBJECTS might result in a hole
#14360 libzpool: fix ddi_strtoull to update nptr
#14364 Fix unprotected zfs_znode_dmu_fini
#14379 zfs_receive_one: Check for the more likely error first
#14380 Cleanup of dead code suggested by Clang Static Analyzer
#14397 Avoid passing an uninitialized index to dsl_prop_known_index
#14404 Fix reading uninitialized variable in receive_read
#14407 free_blocks(): Fix reports from 2016 PVS Studio FreeBSD report
#14418 Introduce minimal ZIL block commit delay
#14422 x86 assembly: fix .size placement and replace .align with .balign

Obtained from: OpenZFS
OpenZFS commit: 9cd71c8604d52def22ffaddc35755712f0fb9349


# 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


# c7046f76 21-Sep-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c629f0bf6

Notable upstream pull request merges:
#13725 Fix BLAKE3 tuneable and module loading on Linux and FreeBSD
#13756 FreeBSD: Organize sysctls
#13773 FreeBSD: add kqfilter support for zvol cdev
#13781 Importing from cachefile can trip assertion
#13794 Apply arc_shrink_shift to ARC above arc_c_min
#13798 Improve too large physical ashift handling
#13799 Revert "Avoid panic with recordsize > 128k, raw sending and
no large_blocks"
#13802 Add zfs.sync.snapshot_rename
#13831 zfs_enter rework
#13855 zfs recv hangs if max recordsize is less than received
recordsize

Obtained from: OpenZFS
OpenZFS commit: c629f0bf62e351355716f9870d6c2e377584b016


# 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


# 716fd348 18-May-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c0cf6ed67

Notable upstream pull request merges:
#10662 zvol_wait: Ignore locked zvols
#12789 Improve log spacemap load time
#12812 Improved zpool status output, list all affected datasets
#13277 FreeBSD: Use NDFREE_PNBUF if available
#13302 Make zfs_max_recordsize default to 16M
#13311 Fix error handling in FreeBSD's get/putpages VOPs
#13345 FreeBSD: Fix translation from ABD to physical pages
#13373 zfs: holds: dequadratify
#13375 Corrected edge case in uncompressed ARC->L2ARC handling
#13388 Improve mg_aliquot math
#13405 Reduce dbuf_find() lock contention
#13406 FreeBSD: use zero_region instead of allocating a dedicated page

Obtained from: OpenZFS
OpenZFS commit: c0cf6ed6792e545fd614c2a88cb53756db7e03f8


# 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


# c03c5b1c 08-Mar-2022 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#9078: log xattr=sa create/remove/update to ZIL
#11919: Cross-platform xattr user namespace compatibility
#13014: Report dnodes with faulty bonuslen
#13016: FreeBSD: Fix zvol_cdev_open locking
#13019: spl: Don't check FreeBSD rwlocks for double initialization
#13027: Fix clearing set-uid and set-gid bits on a file when
replying a write
#13031: Add enumerated vdev names to 'zpool iostat -v' and
'zpool list -v'
#13074: Enable encrypted raw sending to pools with greater ashift
#13076: Receive checks should allow unencrypted child datasets
#13098: Avoid dirtying the final TXGs when exporting a pool
#13172: Fix ENOSPC when unlinking multiple files from full pool

Obtained from: OpenZFS
OpenZFS commit: a86e089415679cf1b98eb424a159bb36aa2c19e3


# 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


# dae17134 17-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@269b5dadc (master) into main

Notable upstream pull request merges:
#12285 Introduce a tunable to exclude special class buffers from L2ARC
#12689 Check l2cache vdevs pending list inside the vdev_inuse()
#12735 Enable edonr in FreeBSD
#12743 FreeBSD: fix world build after de198f2
#12745 Restore dirty dnode detection logic

Obtained from: OpenZFS
OpenZFS commit: 269b5dadcfd1d5732cf763dddcd46009a332eae4


# 6ba2210e 21-Oct-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12392 Avoid panic in case of pool errors and missing L2ARC
#12448 skip snapshot in zfs_iter_mounted()
#12516 Fix NFS and large reads on older kernels
#12533 Fail invalid incremental recursive send gracefully
#12569 FreeBSD: Really zero the zero page
#12575 Reject zfs send -RI with nonexistent fromsnap
#12602 Correct refcount_add in dmu_zfetch
#12650 zpool should call zfs_nicestrtonum() with non-NULL handle

Obtained from: OpenZFS
OpenZFS commit: ec64fdb93d144ab1884097cfd36e18b62a2db848


# 53b70c86 15-Sep-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4a1195ca5 (master) into main

Notable upstream pull request merges:
#11312 Temporarily use root credentials to mount snapshots in .zfs
#12246 arc: Drop an incorrect assert
#12443 Fixed data integrity issue when underlying disk returns error
to zfs
#12522 Compressed receive with different ashift can result in incorrect
PSIZE on disk
#12535 Verify embedded blkptr's in arc_read()
#12541 Allow sending corrupt snapshots even if metadata is corrupted

Obtained from: OpenZFS
OpenZFS commit: 4a1195ca5041cbff2a6b025a31937fef84876c52


# 2faf504d 17-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@8ae86e2ed (master) into main

Notable upstream pull request merges:
#12422 Fix/improve dbuf hits accounting
#12406 Increase default volblocksize from 8KB to 16KB
#12398 Remove b_pabd/b_rabd allocation from arc_hdr_alloc()
#12397 Run arc_evict thread at higher priority
#12297 Avoid vq_lock drop in vdev_queue_aggregate()
#12161 Restore FreeBSD sysctl processing for arc.min and arc.max

Obtained from: OpenZFS
OpenZFS commit: 8ae86e2edc736483c1530fd689525aa2460eaec8


# 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


# 2617128a 30-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4694131a0 (master) into main

Notable upstream pull request merges:
#12253 module/zfs: simplify ddt_stat_add() loop
#12288 Avoid 64bit division in multilist index functions

Obtained from: OpenZFS
OpenZFS commit: 4694131a0a05b6db2727c9801f9729b9378d3064


# 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


# 0d8fe237 20-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12054 Avoid deadlock when removing L2ARC devices under I/O
#12172 Use wmsum for arc, abd, dbuf and zfetch statistics
#12221 vdev_draid_min_asize() ignores reserved space

Obtained from: OpenZFS
OpenZFS commit: c4c162c1e8ff9ce8833014711875d18df520096c


# 3ff01b23 12-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12149: Multiple man-pages: Move to appropriate section
#12158: Re-embed multilist_t storage
#12191: Convert non-libzpool libraries to -fvisibility=hidden
#12196: Unify manpage makefiles, move pages to better sexions, ...
#12210: libzutil: import filtering optimisation
#12212: Remove pool io kstats

Obtained from: OpenZFS
OpenZFS commit: afa7b3484556d3ae610a34582ce5ebd2c3e27bba


# 16038816 08-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@75b4cbf62 (master) into main

Notable upstream pull request merges:
#11710 Allow zfs to send replication streams with missing snapshots
#11751 Avoid taking global lock to destroy zfsdev state
#11786 Ratelimit deadman zevents as with delay zevents
#11803 ZFS traverse_visitbp optimization to limit prefetch
#11813 Allow pool names that look like Solaris disk names
#11822 Atomically check and set dropped zevent count
#11822 Don't scale zfs_zevent_len_max by CPU count
#11833 Refactor zfsdev state init/destroy to share common code
#11837 zfs get -p only outputs 3 columns if "clones" property is empty
#11843 libzutil: zfs_isnumber(): return false if input empty
#11849 Use dsl_scan_setup_check() to setup a scrub
#11861 Improvements to the 'compatibility' property
#11862 cmd/zfs receive: allow dry-run (-n) to check property args
#11864 receive: don't fail inheriting (-x) properties on wrong dataset type
#11877 Combine zio caches if possible
#11881 FreeBSD: use vnlru_free_vfsops if available
#11883 FreeBSD: add support for lockless symlink lookup
#11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr
#11896 Fix crash in zio_done error reporting
#11905 zfs-send(8): Restore sorting of flags
#11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir
#11930 vdev_mirror: don't scrub/resilver devices that can't be read
#11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines
#11955 zfs get: don't lookup mount options when using "-s local"
#11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl
#11959 vdev_id: variable not getting expanded under map_slot()
#11966 Scale worker threads and taskqs with number of CPUs
#11994 Clean up use of zfs_log_create in zfs_dir
#11997 FreeBSD: Don't force xattr mount option
#11997 FreeBSD: Implement xattr=sa
#11997 FreeBSD: Use SET_ERROR to trace xattr name errors
#11998 Simplify/fix dnode_move() for dn_zfetch
#12003 FreeBSD: Initialize/destroy zp->z_lock
#12010 Fix dRAID self-healing short columns
#12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots"
#12040 Reinstate the old zpool read label logic as a fallback
#12046 Improve scrub maxinflight_bytes math
#12049 FreeBSD: avoid memory allocation in arc_prune_async
#12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI
#12061 Fix dRAID sequential resilver silent damage handling
#12072 Let zfs diff be more permissive
#12077 FreeBSD: Retry OCF ENOMEM errors.
#12088 Propagate vdev state due to invalid label corruption
#12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat
#12097 FreeBSD: Update dataset_kstats for zvols in dev mode
#12104 FreeBSD boot code reminder after zpool upgrade
#12114 Introduce write-mostly sums

Obtained from: OpenZFS
OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3


# 6db169e9 13-Apr-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@3522f57b6 (master)

Notable upstream pull request merges:
#11742 When specifying raidz vdev name, parity count should match
#11744 Use a helper function to clarify gang block size
#11771 Support running FreeBSD buildworld on Arm-based macOS hosts

This is the last update that will be MFCed into stable/13.

From now on, the tracking of OpenZFS branches will be different:
- main continues tracking openzfs/zfs/master
- stable/13 is going to track openzfs/zfs/zfs-2.1-release

Obtained from: OpenZFS
MFC after: 1 week


# ba27dd8b 21-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9312e0fd1

Notable upstream changes:
778869fa1 Fix reporting of mount progress
e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD
03e02e5b5 Fix checksum errors not being counted on repeated repair
64e0fe14f Restore FreeBSD resource usage accounting
11f2e9a49 Fix panic if scrubbing after removing a slog device

MFC after: 2 weeks


# 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


# 5dce0384 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: Avoid updating the L2ARC device header unnecessarily

From openzfs-master 0ae184a6b commit message:
If we do not write any buffers to the cache device and the evict hand
has not advanced do not update the cache device header.

Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58
Patch Author: George Amanakis <gamanakis@gmail.com>

MFC after: 3 days
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D28682

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

OpenZFS: Fix issues caused by reversed commits + rebase

# 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
...

# 5596f836 14-Nov-2020 Mateusz Guzik <mjg@FreeBSD.org>

zfs: disable periodic arc updates

They are only there to provide less innacurate statistics for debuggers.
However, this is quite heavy-weight and instead it would be better to
teach debuggers how to obtain the necessary information.

# 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


# 2c48331d 18-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

MFV 2.0-rc2

- Fixes divide by zero for unusual hz
- remove cryptodev dependency


# eac7052f 04-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-gfd20a8

- fixes jail delegation
- fixes raw kstat unsupported complaints
- exposes dbgmsg, dbuf, and checksum benchmark stats
- restore rename -u support


# ac0bf12e 28-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-ga00c61


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

Initial import from vendor-sys branch of openzfs


# f8b1db88 01-Nov-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@41e55b476

Notable upstream pull request merges:
#15366 c3773de1 ZIL: Cleanup sync and commit handling
#15409 dbe839a9 zvol: Cleanup set property
#15409 60387fac zvol: Implement zvol threading as a Property
#15409 9ccdb8be zvol: fix delayed update to block device ro entry
#15448 05a7348a RAIDZ: Use cache blocking during parity math
#15452 514d661c Tune zio buffer caches and their alignments
#15456 799e09f7 Unify arc_prune_async() code
#15465 763ca47f Fix block cloning between unencrypted and encrypted
datasets

To make the module version better comparable, the module version number
now includes the commit count since last tag.

Obtained from: OpenZFS
OpenZFS commit: 41e55b476bcfc90f1ad81c02c5375367fdace9e9


# 6c1e79df 30-Oct-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@043c6ee3b

Notable upstream pull request merges:
#15360 97a0b5be Add mutex_enter_interruptible() for interruptible sleeping
IOCTLs
#15381 252f46be ZIL: Detect single-threaded workloads
#15398 3afdc97d ZIO: Remove READY pipeline stage from root ZIOs
#15428 e007908a ABD: Be more assertive in iterators
#15436 07345ac2 Add prefetch property
#15438 e9725abd Revert "Do not persist user/group/project quota zap objects
when unneeded"
#15451 043c6ee3 Read prefetched buffers from L2ARC

Obtained from: OpenZFS
OpenZFS commit: 043c6ee3b6bfb55f8d36e1f048ff13128c279fb8


# 22b267e8 22-Oct-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@797f55ef1

Notable upstream pull request merges:
#14378 c0e58995e Large sync writes perform worse with slog
#14721 797f55ef1 Do not persist user/group/project quota zap objects
when unneeded
#15356 380c25f64 FreeBSD: Improve taskq wrapper
#15390 4fbc52495 Remove lock from dsl_pool_need_dirty_delay()
#15397 57b409856 Trust ARC_BUF_SHARED() more
#15402 b29e98fa8 Properly pad struct tx_cpu to cache line
#15405 ea30b5a9e Set spa_ccw_fail_time=0 when expanding a vdev
#15416 b9384b949 FreeBSD: taskq: Remove unused declaration

Obtained from: OpenZFS
OpenZFS commit: 797f55ef12d752d2a7fb04fae5d24e019adf2a1d


# b2526e8b 08-Oct-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@66b81b349

Notable upstream pull request merges:
#15290 54b1b1d89 import: require force when cachefile hostid doesn't
match on-disk
#15319 342357cd9 Reduce number of metaslab preload taskq threads
#15340 2a6c62109 ARC: Remove b_cv from struct l1arc_buf_hdr
#15347 75a2eb7fa ARC: Drop different size headers for crypto
#15350 96b9cf42e ARC: Remove b_bufcnt/b_ebufcnt from ARC headers
#15353 66b81b349 ZIL: Reduce maximum size of WR_COPIED to 7.5K
#15362 5b8688e62 zfsconcepts: add description of block cloning

Obtained from: OpenZFS
OpenZFS commit: 66b81b349749bc1ba11fa277bee860be03315429


# 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


# b7198dcf 16-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@10e36e176

Notable upstream pull request merges:
#14948 Remove ARC/ZIO physdone callbacks
#14963 Store the L2ARC device ashift in the vdev label
#14970 Switch refcount tracking from lists to AVL-trees
#14981 Shorten arcstat_quiescence sleep time

Obtained from: OpenZFS
OpenZFS commit: 10e36e17612ba9c634b140ae76847bb62b5be68f


# 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


# e639e0d2 12-May-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@e61076683

Notable upstream pull request merges:
#14744 Optimize check_filesystem() and process_error_log()
#14773 Allow zhack label repair to restore detached devices
#14794 zpool import -m also removing spare and cache when log device
is missing
#14805 Simplify and optimize random_int_between()
#14813 Enable the head_errlog feature to remove errors
#14816 Fix two abd_gang_add_gang() issues
#14817 Verify block pointers before writing them out
#14819 Add dmu_tx_hold_append() interface
#14823 Remove single parent assertion from zio_nowait()
#14824 Plug memory leak in zfsdev_state
#14825 Block cloning dbuf fixes
#14828 Remove duplicate code in l2arc_evict()
#14837 Fixes in head_errlog feature with encryption
#14839 Prevent panic during concurrent snapshot rollback and zvol read
#14853 zil: Don't expect zio_shrink() to succeed

Obtained from: OpenZFS
OpenZFS commit: e6107668385044718b0a73330ed6423650806473


# 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


# 15f0b8c3 25-Jan-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@9cd71c860 (master)

Notable upstream pull request merges:
#13805 Configure zed's diagnosis engine with vdev properties
#14110 zfs list: Allow more fields in ZFS_ITER_SIMPLE mode
#14121 Batch enqueue/dequeue for bqueue
#14123 arc_read()/arc_access() refactoring and cleanup
#14159 Bypass metaslab throttle for removal allocations
#14243 Implement uncached prefetch
#14251 Cache dbuf_hash() calculation
#14253 Allow reciever to override encryption property in case of replication
#14254 Restrict visibility of per-dataset kstats inside FreeBSD jails
#14255 Zero end of embedded block buffer in dump_write_embedded()
#14263 Cleanups identified by CodeQL and Coverity
#14264 Miscellaneous fixes
#14272 Change ZEVENT_POOL_GUID to ZEVENT_POOL to display pool names
#14287 FreeBSD: Remove stray debug printf
#14288 Colorize zfs diff output
#14289 deadlock between spa_errlog_lock and dp_config_rwlock
#14291 FreeBSD: Fix potential boot panic with bad label
#14292 Add tunable to allow changing micro ZAP's max size
#14293 Turn default_bs and default_ibs into ZFS_MODULE_PARAMs
#14295 zed: add hotplug support for spare vdevs
#14304 Activate filesystem features only in syncing context
#14311 zpool: do guid-based comparison in is_vdev_cb()
#14317 Pack zrlock_t by 8 bytes
#14320 Update arc_summary and arcstat outputs
#14328 FreeBSD: catch up to 1400077
#14376 Use setproctitle to report progress of zfs send
#14340 Remove some dead ARC code
#14358 Wait for txg sync if the last DRR_FREEOBJECTS might result in a hole
#14360 libzpool: fix ddi_strtoull to update nptr
#14364 Fix unprotected zfs_znode_dmu_fini
#14379 zfs_receive_one: Check for the more likely error first
#14380 Cleanup of dead code suggested by Clang Static Analyzer
#14397 Avoid passing an uninitialized index to dsl_prop_known_index
#14404 Fix reading uninitialized variable in receive_read
#14407 free_blocks(): Fix reports from 2016 PVS Studio FreeBSD report
#14418 Introduce minimal ZIL block commit delay
#14422 x86 assembly: fix .size placement and replace .align with .balign

Obtained from: OpenZFS
OpenZFS commit: 9cd71c8604d52def22ffaddc35755712f0fb9349


# 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


# c7046f76 21-Sep-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c629f0bf6

Notable upstream pull request merges:
#13725 Fix BLAKE3 tuneable and module loading on Linux and FreeBSD
#13756 FreeBSD: Organize sysctls
#13773 FreeBSD: add kqfilter support for zvol cdev
#13781 Importing from cachefile can trip assertion
#13794 Apply arc_shrink_shift to ARC above arc_c_min
#13798 Improve too large physical ashift handling
#13799 Revert "Avoid panic with recordsize > 128k, raw sending and
no large_blocks"
#13802 Add zfs.sync.snapshot_rename
#13831 zfs_enter rework
#13855 zfs recv hangs if max recordsize is less than received
recordsize

Obtained from: OpenZFS
OpenZFS commit: c629f0bf62e351355716f9870d6c2e377584b016


# 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


# 716fd348 18-May-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c0cf6ed67

Notable upstream pull request merges:
#10662 zvol_wait: Ignore locked zvols
#12789 Improve log spacemap load time
#12812 Improved zpool status output, list all affected datasets
#13277 FreeBSD: Use NDFREE_PNBUF if available
#13302 Make zfs_max_recordsize default to 16M
#13311 Fix error handling in FreeBSD's get/putpages VOPs
#13345 FreeBSD: Fix translation from ABD to physical pages
#13373 zfs: holds: dequadratify
#13375 Corrected edge case in uncompressed ARC->L2ARC handling
#13388 Improve mg_aliquot math
#13405 Reduce dbuf_find() lock contention
#13406 FreeBSD: use zero_region instead of allocating a dedicated page

Obtained from: OpenZFS
OpenZFS commit: c0cf6ed6792e545fd614c2a88cb53756db7e03f8


# 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


# c03c5b1c 08-Mar-2022 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#9078: log xattr=sa create/remove/update to ZIL
#11919: Cross-platform xattr user namespace compatibility
#13014: Report dnodes with faulty bonuslen
#13016: FreeBSD: Fix zvol_cdev_open locking
#13019: spl: Don't check FreeBSD rwlocks for double initialization
#13027: Fix clearing set-uid and set-gid bits on a file when
replying a write
#13031: Add enumerated vdev names to 'zpool iostat -v' and
'zpool list -v'
#13074: Enable encrypted raw sending to pools with greater ashift
#13076: Receive checks should allow unencrypted child datasets
#13098: Avoid dirtying the final TXGs when exporting a pool
#13172: Fix ENOSPC when unlinking multiple files from full pool

Obtained from: OpenZFS
OpenZFS commit: a86e089415679cf1b98eb424a159bb36aa2c19e3


# 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


# dae17134 17-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@269b5dadc (master) into main

Notable upstream pull request merges:
#12285 Introduce a tunable to exclude special class buffers from L2ARC
#12689 Check l2cache vdevs pending list inside the vdev_inuse()
#12735 Enable edonr in FreeBSD
#12743 FreeBSD: fix world build after de198f2
#12745 Restore dirty dnode detection logic

Obtained from: OpenZFS
OpenZFS commit: 269b5dadcfd1d5732cf763dddcd46009a332eae4


# 6ba2210e 21-Oct-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12392 Avoid panic in case of pool errors and missing L2ARC
#12448 skip snapshot in zfs_iter_mounted()
#12516 Fix NFS and large reads on older kernels
#12533 Fail invalid incremental recursive send gracefully
#12569 FreeBSD: Really zero the zero page
#12575 Reject zfs send -RI with nonexistent fromsnap
#12602 Correct refcount_add in dmu_zfetch
#12650 zpool should call zfs_nicestrtonum() with non-NULL handle

Obtained from: OpenZFS
OpenZFS commit: ec64fdb93d144ab1884097cfd36e18b62a2db848


# 53b70c86 15-Sep-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4a1195ca5 (master) into main

Notable upstream pull request merges:
#11312 Temporarily use root credentials to mount snapshots in .zfs
#12246 arc: Drop an incorrect assert
#12443 Fixed data integrity issue when underlying disk returns error
to zfs
#12522 Compressed receive with different ashift can result in incorrect
PSIZE on disk
#12535 Verify embedded blkptr's in arc_read()
#12541 Allow sending corrupt snapshots even if metadata is corrupted

Obtained from: OpenZFS
OpenZFS commit: 4a1195ca5041cbff2a6b025a31937fef84876c52


# 2faf504d 17-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@8ae86e2ed (master) into main

Notable upstream pull request merges:
#12422 Fix/improve dbuf hits accounting
#12406 Increase default volblocksize from 8KB to 16KB
#12398 Remove b_pabd/b_rabd allocation from arc_hdr_alloc()
#12397 Run arc_evict thread at higher priority
#12297 Avoid vq_lock drop in vdev_queue_aggregate()
#12161 Restore FreeBSD sysctl processing for arc.min and arc.max

Obtained from: OpenZFS
OpenZFS commit: 8ae86e2edc736483c1530fd689525aa2460eaec8


# 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


# 2617128a 30-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4694131a0 (master) into main

Notable upstream pull request merges:
#12253 module/zfs: simplify ddt_stat_add() loop
#12288 Avoid 64bit division in multilist index functions

Obtained from: OpenZFS
OpenZFS commit: 4694131a0a05b6db2727c9801f9729b9378d3064


# 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


# 0d8fe237 20-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12054 Avoid deadlock when removing L2ARC devices under I/O
#12172 Use wmsum for arc, abd, dbuf and zfetch statistics
#12221 vdev_draid_min_asize() ignores reserved space

Obtained from: OpenZFS
OpenZFS commit: c4c162c1e8ff9ce8833014711875d18df520096c


# 3ff01b23 12-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12149: Multiple man-pages: Move to appropriate section
#12158: Re-embed multilist_t storage
#12191: Convert non-libzpool libraries to -fvisibility=hidden
#12196: Unify manpage makefiles, move pages to better sexions, ...
#12210: libzutil: import filtering optimisation
#12212: Remove pool io kstats

Obtained from: OpenZFS
OpenZFS commit: afa7b3484556d3ae610a34582ce5ebd2c3e27bba


# 16038816 08-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@75b4cbf62 (master) into main

Notable upstream pull request merges:
#11710 Allow zfs to send replication streams with missing snapshots
#11751 Avoid taking global lock to destroy zfsdev state
#11786 Ratelimit deadman zevents as with delay zevents
#11803 ZFS traverse_visitbp optimization to limit prefetch
#11813 Allow pool names that look like Solaris disk names
#11822 Atomically check and set dropped zevent count
#11822 Don't scale zfs_zevent_len_max by CPU count
#11833 Refactor zfsdev state init/destroy to share common code
#11837 zfs get -p only outputs 3 columns if "clones" property is empty
#11843 libzutil: zfs_isnumber(): return false if input empty
#11849 Use dsl_scan_setup_check() to setup a scrub
#11861 Improvements to the 'compatibility' property
#11862 cmd/zfs receive: allow dry-run (-n) to check property args
#11864 receive: don't fail inheriting (-x) properties on wrong dataset type
#11877 Combine zio caches if possible
#11881 FreeBSD: use vnlru_free_vfsops if available
#11883 FreeBSD: add support for lockless symlink lookup
#11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr
#11896 Fix crash in zio_done error reporting
#11905 zfs-send(8): Restore sorting of flags
#11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir
#11930 vdev_mirror: don't scrub/resilver devices that can't be read
#11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines
#11955 zfs get: don't lookup mount options when using "-s local"
#11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl
#11959 vdev_id: variable not getting expanded under map_slot()
#11966 Scale worker threads and taskqs with number of CPUs
#11994 Clean up use of zfs_log_create in zfs_dir
#11997 FreeBSD: Don't force xattr mount option
#11997 FreeBSD: Implement xattr=sa
#11997 FreeBSD: Use SET_ERROR to trace xattr name errors
#11998 Simplify/fix dnode_move() for dn_zfetch
#12003 FreeBSD: Initialize/destroy zp->z_lock
#12010 Fix dRAID self-healing short columns
#12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots"
#12040 Reinstate the old zpool read label logic as a fallback
#12046 Improve scrub maxinflight_bytes math
#12049 FreeBSD: avoid memory allocation in arc_prune_async
#12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI
#12061 Fix dRAID sequential resilver silent damage handling
#12072 Let zfs diff be more permissive
#12077 FreeBSD: Retry OCF ENOMEM errors.
#12088 Propagate vdev state due to invalid label corruption
#12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat
#12097 FreeBSD: Update dataset_kstats for zvols in dev mode
#12104 FreeBSD boot code reminder after zpool upgrade
#12114 Introduce write-mostly sums

Obtained from: OpenZFS
OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3


# 6db169e9 13-Apr-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@3522f57b6 (master)

Notable upstream pull request merges:
#11742 When specifying raidz vdev name, parity count should match
#11744 Use a helper function to clarify gang block size
#11771 Support running FreeBSD buildworld on Arm-based macOS hosts

This is the last update that will be MFCed into stable/13.

From now on, the tracking of OpenZFS branches will be different:
- main continues tracking openzfs/zfs/master
- stable/13 is going to track openzfs/zfs/zfs-2.1-release

Obtained from: OpenZFS
MFC after: 1 week


# ba27dd8b 21-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9312e0fd1

Notable upstream changes:
778869fa1 Fix reporting of mount progress
e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD
03e02e5b5 Fix checksum errors not being counted on repeated repair
64e0fe14f Restore FreeBSD resource usage accounting
11f2e9a49 Fix panic if scrubbing after removing a slog device

MFC after: 2 weeks


# 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


# 5dce0384 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: Avoid updating the L2ARC device header unnecessarily

From openzfs-master 0ae184a6b commit message:
If we do not write any buffers to the cache device and the evict hand
has not advanced do not update the cache device header.

Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58
Patch Author: George Amanakis <gamanakis@gmail.com>

MFC after: 3 days
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D28682

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

OpenZFS: Fix issues caused by reversed commits + rebase

# 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
...

# 5596f836 14-Nov-2020 Mateusz Guzik <mjg@FreeBSD.org>

zfs: disable periodic arc updates

They are only there to provide less innacurate statistics for debuggers.
However, this is quite heavy-weight and instead it would be better to
teach debuggers how to obtain the necessary information.

# 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


# 2c48331d 18-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

MFV 2.0-rc2

- Fixes divide by zero for unusual hz
- remove cryptodev dependency


# eac7052f 04-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-gfd20a8

- fixes jail delegation
- fixes raw kstat unsupported complaints
- exposes dbgmsg, dbuf, and checksum benchmark stats
- restore rename -u support


# ac0bf12e 28-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-ga00c61


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

Initial import from vendor-sys branch of openzfs


# 22b267e8 22-Oct-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@797f55ef1

Notable upstream pull request merges:
#14378 c0e58995e Large sync writes perform worse with slog
#14721 797f55ef1 Do not persist user/group/project quota zap objects
when unneeded
#15356 380c25f64 FreeBSD: Improve taskq wrapper
#15390 4fbc52495 Remove lock from dsl_pool_need_dirty_delay()
#15397 57b409856 Trust ARC_BUF_SHARED() more
#15402 b29e98fa8 Properly pad struct tx_cpu to cache line
#15405 ea30b5a9e Set spa_ccw_fail_time=0 when expanding a vdev
#15416 b9384b949 FreeBSD: taskq: Remove unused declaration

Obtained from: OpenZFS
OpenZFS commit: 797f55ef12d752d2a7fb04fae5d24e019adf2a1d


# b2526e8b 08-Oct-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@66b81b349

Notable upstream pull request merges:
#15290 54b1b1d89 import: require force when cachefile hostid doesn't
match on-disk
#15319 342357cd9 Reduce number of metaslab preload taskq threads
#15340 2a6c62109 ARC: Remove b_cv from struct l1arc_buf_hdr
#15347 75a2eb7fa ARC: Drop different size headers for crypto
#15350 96b9cf42e ARC: Remove b_bufcnt/b_ebufcnt from ARC headers
#15353 66b81b349 ZIL: Reduce maximum size of WR_COPIED to 7.5K
#15362 5b8688e62 zfsconcepts: add description of block cloning

Obtained from: OpenZFS
OpenZFS commit: 66b81b349749bc1ba11fa277bee860be03315429


# 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


# b7198dcf 16-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@10e36e176

Notable upstream pull request merges:
#14948 Remove ARC/ZIO physdone callbacks
#14963 Store the L2ARC device ashift in the vdev label
#14970 Switch refcount tracking from lists to AVL-trees
#14981 Shorten arcstat_quiescence sleep time

Obtained from: OpenZFS
OpenZFS commit: 10e36e17612ba9c634b140ae76847bb62b5be68f


# 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


# e639e0d2 12-May-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@e61076683

Notable upstream pull request merges:
#14744 Optimize check_filesystem() and process_error_log()
#14773 Allow zhack label repair to restore detached devices
#14794 zpool import -m also removing spare and cache when log device
is missing
#14805 Simplify and optimize random_int_between()
#14813 Enable the head_errlog feature to remove errors
#14816 Fix two abd_gang_add_gang() issues
#14817 Verify block pointers before writing them out
#14819 Add dmu_tx_hold_append() interface
#14823 Remove single parent assertion from zio_nowait()
#14824 Plug memory leak in zfsdev_state
#14825 Block cloning dbuf fixes
#14828 Remove duplicate code in l2arc_evict()
#14837 Fixes in head_errlog feature with encryption
#14839 Prevent panic during concurrent snapshot rollback and zvol read
#14853 zil: Don't expect zio_shrink() to succeed

Obtained from: OpenZFS
OpenZFS commit: e6107668385044718b0a73330ed6423650806473


# 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


# 15f0b8c3 25-Jan-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@9cd71c860 (master)

Notable upstream pull request merges:
#13805 Configure zed's diagnosis engine with vdev properties
#14110 zfs list: Allow more fields in ZFS_ITER_SIMPLE mode
#14121 Batch enqueue/dequeue for bqueue
#14123 arc_read()/arc_access() refactoring and cleanup
#14159 Bypass metaslab throttle for removal allocations
#14243 Implement uncached prefetch
#14251 Cache dbuf_hash() calculation
#14253 Allow reciever to override encryption property in case of replication
#14254 Restrict visibility of per-dataset kstats inside FreeBSD jails
#14255 Zero end of embedded block buffer in dump_write_embedded()
#14263 Cleanups identified by CodeQL and Coverity
#14264 Miscellaneous fixes
#14272 Change ZEVENT_POOL_GUID to ZEVENT_POOL to display pool names
#14287 FreeBSD: Remove stray debug printf
#14288 Colorize zfs diff output
#14289 deadlock between spa_errlog_lock and dp_config_rwlock
#14291 FreeBSD: Fix potential boot panic with bad label
#14292 Add tunable to allow changing micro ZAP's max size
#14293 Turn default_bs and default_ibs into ZFS_MODULE_PARAMs
#14295 zed: add hotplug support for spare vdevs
#14304 Activate filesystem features only in syncing context
#14311 zpool: do guid-based comparison in is_vdev_cb()
#14317 Pack zrlock_t by 8 bytes
#14320 Update arc_summary and arcstat outputs
#14328 FreeBSD: catch up to 1400077
#14376 Use setproctitle to report progress of zfs send
#14340 Remove some dead ARC code
#14358 Wait for txg sync if the last DRR_FREEOBJECTS might result in a hole
#14360 libzpool: fix ddi_strtoull to update nptr
#14364 Fix unprotected zfs_znode_dmu_fini
#14379 zfs_receive_one: Check for the more likely error first
#14380 Cleanup of dead code suggested by Clang Static Analyzer
#14397 Avoid passing an uninitialized index to dsl_prop_known_index
#14404 Fix reading uninitialized variable in receive_read
#14407 free_blocks(): Fix reports from 2016 PVS Studio FreeBSD report
#14418 Introduce minimal ZIL block commit delay
#14422 x86 assembly: fix .size placement and replace .align with .balign

Obtained from: OpenZFS
OpenZFS commit: 9cd71c8604d52def22ffaddc35755712f0fb9349


# 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


# c7046f76 21-Sep-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c629f0bf6

Notable upstream pull request merges:
#13725 Fix BLAKE3 tuneable and module loading on Linux and FreeBSD
#13756 FreeBSD: Organize sysctls
#13773 FreeBSD: add kqfilter support for zvol cdev
#13781 Importing from cachefile can trip assertion
#13794 Apply arc_shrink_shift to ARC above arc_c_min
#13798 Improve too large physical ashift handling
#13799 Revert "Avoid panic with recordsize > 128k, raw sending and
no large_blocks"
#13802 Add zfs.sync.snapshot_rename
#13831 zfs_enter rework
#13855 zfs recv hangs if max recordsize is less than received
recordsize

Obtained from: OpenZFS
OpenZFS commit: c629f0bf62e351355716f9870d6c2e377584b016


# 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


# 716fd348 18-May-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c0cf6ed67

Notable upstream pull request merges:
#10662 zvol_wait: Ignore locked zvols
#12789 Improve log spacemap load time
#12812 Improved zpool status output, list all affected datasets
#13277 FreeBSD: Use NDFREE_PNBUF if available
#13302 Make zfs_max_recordsize default to 16M
#13311 Fix error handling in FreeBSD's get/putpages VOPs
#13345 FreeBSD: Fix translation from ABD to physical pages
#13373 zfs: holds: dequadratify
#13375 Corrected edge case in uncompressed ARC->L2ARC handling
#13388 Improve mg_aliquot math
#13405 Reduce dbuf_find() lock contention
#13406 FreeBSD: use zero_region instead of allocating a dedicated page

Obtained from: OpenZFS
OpenZFS commit: c0cf6ed6792e545fd614c2a88cb53756db7e03f8


# 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


# c03c5b1c 08-Mar-2022 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#9078: log xattr=sa create/remove/update to ZIL
#11919: Cross-platform xattr user namespace compatibility
#13014: Report dnodes with faulty bonuslen
#13016: FreeBSD: Fix zvol_cdev_open locking
#13019: spl: Don't check FreeBSD rwlocks for double initialization
#13027: Fix clearing set-uid and set-gid bits on a file when
replying a write
#13031: Add enumerated vdev names to 'zpool iostat -v' and
'zpool list -v'
#13074: Enable encrypted raw sending to pools with greater ashift
#13076: Receive checks should allow unencrypted child datasets
#13098: Avoid dirtying the final TXGs when exporting a pool
#13172: Fix ENOSPC when unlinking multiple files from full pool

Obtained from: OpenZFS
OpenZFS commit: a86e089415679cf1b98eb424a159bb36aa2c19e3


# 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


# dae17134 17-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@269b5dadc (master) into main

Notable upstream pull request merges:
#12285 Introduce a tunable to exclude special class buffers from L2ARC
#12689 Check l2cache vdevs pending list inside the vdev_inuse()
#12735 Enable edonr in FreeBSD
#12743 FreeBSD: fix world build after de198f2
#12745 Restore dirty dnode detection logic

Obtained from: OpenZFS
OpenZFS commit: 269b5dadcfd1d5732cf763dddcd46009a332eae4


# 6ba2210e 21-Oct-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12392 Avoid panic in case of pool errors and missing L2ARC
#12448 skip snapshot in zfs_iter_mounted()
#12516 Fix NFS and large reads on older kernels
#12533 Fail invalid incremental recursive send gracefully
#12569 FreeBSD: Really zero the zero page
#12575 Reject zfs send -RI with nonexistent fromsnap
#12602 Correct refcount_add in dmu_zfetch
#12650 zpool should call zfs_nicestrtonum() with non-NULL handle

Obtained from: OpenZFS
OpenZFS commit: ec64fdb93d144ab1884097cfd36e18b62a2db848


# 53b70c86 15-Sep-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4a1195ca5 (master) into main

Notable upstream pull request merges:
#11312 Temporarily use root credentials to mount snapshots in .zfs
#12246 arc: Drop an incorrect assert
#12443 Fixed data integrity issue when underlying disk returns error
to zfs
#12522 Compressed receive with different ashift can result in incorrect
PSIZE on disk
#12535 Verify embedded blkptr's in arc_read()
#12541 Allow sending corrupt snapshots even if metadata is corrupted

Obtained from: OpenZFS
OpenZFS commit: 4a1195ca5041cbff2a6b025a31937fef84876c52


# 2faf504d 17-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@8ae86e2ed (master) into main

Notable upstream pull request merges:
#12422 Fix/improve dbuf hits accounting
#12406 Increase default volblocksize from 8KB to 16KB
#12398 Remove b_pabd/b_rabd allocation from arc_hdr_alloc()
#12397 Run arc_evict thread at higher priority
#12297 Avoid vq_lock drop in vdev_queue_aggregate()
#12161 Restore FreeBSD sysctl processing for arc.min and arc.max

Obtained from: OpenZFS
OpenZFS commit: 8ae86e2edc736483c1530fd689525aa2460eaec8


# 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


# 2617128a 30-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4694131a0 (master) into main

Notable upstream pull request merges:
#12253 module/zfs: simplify ddt_stat_add() loop
#12288 Avoid 64bit division in multilist index functions

Obtained from: OpenZFS
OpenZFS commit: 4694131a0a05b6db2727c9801f9729b9378d3064


# 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


# 0d8fe237 20-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12054 Avoid deadlock when removing L2ARC devices under I/O
#12172 Use wmsum for arc, abd, dbuf and zfetch statistics
#12221 vdev_draid_min_asize() ignores reserved space

Obtained from: OpenZFS
OpenZFS commit: c4c162c1e8ff9ce8833014711875d18df520096c


# 3ff01b23 12-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12149: Multiple man-pages: Move to appropriate section
#12158: Re-embed multilist_t storage
#12191: Convert non-libzpool libraries to -fvisibility=hidden
#12196: Unify manpage makefiles, move pages to better sexions, ...
#12210: libzutil: import filtering optimisation
#12212: Remove pool io kstats

Obtained from: OpenZFS
OpenZFS commit: afa7b3484556d3ae610a34582ce5ebd2c3e27bba


# 16038816 08-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@75b4cbf62 (master) into main

Notable upstream pull request merges:
#11710 Allow zfs to send replication streams with missing snapshots
#11751 Avoid taking global lock to destroy zfsdev state
#11786 Ratelimit deadman zevents as with delay zevents
#11803 ZFS traverse_visitbp optimization to limit prefetch
#11813 Allow pool names that look like Solaris disk names
#11822 Atomically check and set dropped zevent count
#11822 Don't scale zfs_zevent_len_max by CPU count
#11833 Refactor zfsdev state init/destroy to share common code
#11837 zfs get -p only outputs 3 columns if "clones" property is empty
#11843 libzutil: zfs_isnumber(): return false if input empty
#11849 Use dsl_scan_setup_check() to setup a scrub
#11861 Improvements to the 'compatibility' property
#11862 cmd/zfs receive: allow dry-run (-n) to check property args
#11864 receive: don't fail inheriting (-x) properties on wrong dataset type
#11877 Combine zio caches if possible
#11881 FreeBSD: use vnlru_free_vfsops if available
#11883 FreeBSD: add support for lockless symlink lookup
#11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr
#11896 Fix crash in zio_done error reporting
#11905 zfs-send(8): Restore sorting of flags
#11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir
#11930 vdev_mirror: don't scrub/resilver devices that can't be read
#11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines
#11955 zfs get: don't lookup mount options when using "-s local"
#11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl
#11959 vdev_id: variable not getting expanded under map_slot()
#11966 Scale worker threads and taskqs with number of CPUs
#11994 Clean up use of zfs_log_create in zfs_dir
#11997 FreeBSD: Don't force xattr mount option
#11997 FreeBSD: Implement xattr=sa
#11997 FreeBSD: Use SET_ERROR to trace xattr name errors
#11998 Simplify/fix dnode_move() for dn_zfetch
#12003 FreeBSD: Initialize/destroy zp->z_lock
#12010 Fix dRAID self-healing short columns
#12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots"
#12040 Reinstate the old zpool read label logic as a fallback
#12046 Improve scrub maxinflight_bytes math
#12049 FreeBSD: avoid memory allocation in arc_prune_async
#12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI
#12061 Fix dRAID sequential resilver silent damage handling
#12072 Let zfs diff be more permissive
#12077 FreeBSD: Retry OCF ENOMEM errors.
#12088 Propagate vdev state due to invalid label corruption
#12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat
#12097 FreeBSD: Update dataset_kstats for zvols in dev mode
#12104 FreeBSD boot code reminder after zpool upgrade
#12114 Introduce write-mostly sums

Obtained from: OpenZFS
OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3


# 6db169e9 13-Apr-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@3522f57b6 (master)

Notable upstream pull request merges:
#11742 When specifying raidz vdev name, parity count should match
#11744 Use a helper function to clarify gang block size
#11771 Support running FreeBSD buildworld on Arm-based macOS hosts

This is the last update that will be MFCed into stable/13.

From now on, the tracking of OpenZFS branches will be different:
- main continues tracking openzfs/zfs/master
- stable/13 is going to track openzfs/zfs/zfs-2.1-release

Obtained from: OpenZFS
MFC after: 1 week


# ba27dd8b 21-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9312e0fd1

Notable upstream changes:
778869fa1 Fix reporting of mount progress
e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD
03e02e5b5 Fix checksum errors not being counted on repeated repair
64e0fe14f Restore FreeBSD resource usage accounting
11f2e9a49 Fix panic if scrubbing after removing a slog device

MFC after: 2 weeks


# 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


# 5dce0384 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: Avoid updating the L2ARC device header unnecessarily

From openzfs-master 0ae184a6b commit message:
If we do not write any buffers to the cache device and the evict hand
has not advanced do not update the cache device header.

Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58
Patch Author: George Amanakis <gamanakis@gmail.com>

MFC after: 3 days
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D28682

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

OpenZFS: Fix issues caused by reversed commits + rebase

# 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
...

# 5596f836 14-Nov-2020 Mateusz Guzik <mjg@FreeBSD.org>

zfs: disable periodic arc updates

They are only there to provide less innacurate statistics for debuggers.
However, this is quite heavy-weight and instead it would be better to
teach debuggers how to obtain the necessary information.

# 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


# 2c48331d 18-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

MFV 2.0-rc2

- Fixes divide by zero for unusual hz
- remove cryptodev dependency


# eac7052f 04-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-gfd20a8

- fixes jail delegation
- fixes raw kstat unsupported complaints
- exposes dbgmsg, dbuf, and checksum benchmark stats
- restore rename -u support


# ac0bf12e 28-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-ga00c61


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

Initial import from vendor-sys branch of openzfs


# b2526e8b 08-Oct-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@66b81b349

Notable upstream pull request merges:
#15290 54b1b1d89 import: require force when cachefile hostid doesn't
match on-disk
#15319 342357cd9 Reduce number of metaslab preload taskq threads
#15340 2a6c62109 ARC: Remove b_cv from struct l1arc_buf_hdr
#15347 75a2eb7fa ARC: Drop different size headers for crypto
#15350 96b9cf42e ARC: Remove b_bufcnt/b_ebufcnt from ARC headers
#15353 66b81b349 ZIL: Reduce maximum size of WR_COPIED to 7.5K
#15362 5b8688e62 zfsconcepts: add description of block cloning

Obtained from: OpenZFS
OpenZFS commit: 66b81b349749bc1ba11fa277bee860be03315429


# 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


# b7198dcf 16-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@10e36e176

Notable upstream pull request merges:
#14948 Remove ARC/ZIO physdone callbacks
#14963 Store the L2ARC device ashift in the vdev label
#14970 Switch refcount tracking from lists to AVL-trees
#14981 Shorten arcstat_quiescence sleep time

Obtained from: OpenZFS
OpenZFS commit: 10e36e17612ba9c634b140ae76847bb62b5be68f


# 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


# e639e0d2 12-May-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@e61076683

Notable upstream pull request merges:
#14744 Optimize check_filesystem() and process_error_log()
#14773 Allow zhack label repair to restore detached devices
#14794 zpool import -m also removing spare and cache when log device
is missing
#14805 Simplify and optimize random_int_between()
#14813 Enable the head_errlog feature to remove errors
#14816 Fix two abd_gang_add_gang() issues
#14817 Verify block pointers before writing them out
#14819 Add dmu_tx_hold_append() interface
#14823 Remove single parent assertion from zio_nowait()
#14824 Plug memory leak in zfsdev_state
#14825 Block cloning dbuf fixes
#14828 Remove duplicate code in l2arc_evict()
#14837 Fixes in head_errlog feature with encryption
#14839 Prevent panic during concurrent snapshot rollback and zvol read
#14853 zil: Don't expect zio_shrink() to succeed

Obtained from: OpenZFS
OpenZFS commit: e6107668385044718b0a73330ed6423650806473


# 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


# 15f0b8c3 25-Jan-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@9cd71c860 (master)

Notable upstream pull request merges:
#13805 Configure zed's diagnosis engine with vdev properties
#14110 zfs list: Allow more fields in ZFS_ITER_SIMPLE mode
#14121 Batch enqueue/dequeue for bqueue
#14123 arc_read()/arc_access() refactoring and cleanup
#14159 Bypass metaslab throttle for removal allocations
#14243 Implement uncached prefetch
#14251 Cache dbuf_hash() calculation
#14253 Allow reciever to override encryption property in case of replication
#14254 Restrict visibility of per-dataset kstats inside FreeBSD jails
#14255 Zero end of embedded block buffer in dump_write_embedded()
#14263 Cleanups identified by CodeQL and Coverity
#14264 Miscellaneous fixes
#14272 Change ZEVENT_POOL_GUID to ZEVENT_POOL to display pool names
#14287 FreeBSD: Remove stray debug printf
#14288 Colorize zfs diff output
#14289 deadlock between spa_errlog_lock and dp_config_rwlock
#14291 FreeBSD: Fix potential boot panic with bad label
#14292 Add tunable to allow changing micro ZAP's max size
#14293 Turn default_bs and default_ibs into ZFS_MODULE_PARAMs
#14295 zed: add hotplug support for spare vdevs
#14304 Activate filesystem features only in syncing context
#14311 zpool: do guid-based comparison in is_vdev_cb()
#14317 Pack zrlock_t by 8 bytes
#14320 Update arc_summary and arcstat outputs
#14328 FreeBSD: catch up to 1400077
#14376 Use setproctitle to report progress of zfs send
#14340 Remove some dead ARC code
#14358 Wait for txg sync if the last DRR_FREEOBJECTS might result in a hole
#14360 libzpool: fix ddi_strtoull to update nptr
#14364 Fix unprotected zfs_znode_dmu_fini
#14379 zfs_receive_one: Check for the more likely error first
#14380 Cleanup of dead code suggested by Clang Static Analyzer
#14397 Avoid passing an uninitialized index to dsl_prop_known_index
#14404 Fix reading uninitialized variable in receive_read
#14407 free_blocks(): Fix reports from 2016 PVS Studio FreeBSD report
#14418 Introduce minimal ZIL block commit delay
#14422 x86 assembly: fix .size placement and replace .align with .balign

Obtained from: OpenZFS
OpenZFS commit: 9cd71c8604d52def22ffaddc35755712f0fb9349


# 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


# c7046f76 21-Sep-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c629f0bf6

Notable upstream pull request merges:
#13725 Fix BLAKE3 tuneable and module loading on Linux and FreeBSD
#13756 FreeBSD: Organize sysctls
#13773 FreeBSD: add kqfilter support for zvol cdev
#13781 Importing from cachefile can trip assertion
#13794 Apply arc_shrink_shift to ARC above arc_c_min
#13798 Improve too large physical ashift handling
#13799 Revert "Avoid panic with recordsize > 128k, raw sending and
no large_blocks"
#13802 Add zfs.sync.snapshot_rename
#13831 zfs_enter rework
#13855 zfs recv hangs if max recordsize is less than received
recordsize

Obtained from: OpenZFS
OpenZFS commit: c629f0bf62e351355716f9870d6c2e377584b016


# 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


# 716fd348 18-May-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c0cf6ed67

Notable upstream pull request merges:
#10662 zvol_wait: Ignore locked zvols
#12789 Improve log spacemap load time
#12812 Improved zpool status output, list all affected datasets
#13277 FreeBSD: Use NDFREE_PNBUF if available
#13302 Make zfs_max_recordsize default to 16M
#13311 Fix error handling in FreeBSD's get/putpages VOPs
#13345 FreeBSD: Fix translation from ABD to physical pages
#13373 zfs: holds: dequadratify
#13375 Corrected edge case in uncompressed ARC->L2ARC handling
#13388 Improve mg_aliquot math
#13405 Reduce dbuf_find() lock contention
#13406 FreeBSD: use zero_region instead of allocating a dedicated page

Obtained from: OpenZFS
OpenZFS commit: c0cf6ed6792e545fd614c2a88cb53756db7e03f8


# 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


# c03c5b1c 08-Mar-2022 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#9078: log xattr=sa create/remove/update to ZIL
#11919: Cross-platform xattr user namespace compatibility
#13014: Report dnodes with faulty bonuslen
#13016: FreeBSD: Fix zvol_cdev_open locking
#13019: spl: Don't check FreeBSD rwlocks for double initialization
#13027: Fix clearing set-uid and set-gid bits on a file when
replying a write
#13031: Add enumerated vdev names to 'zpool iostat -v' and
'zpool list -v'
#13074: Enable encrypted raw sending to pools with greater ashift
#13076: Receive checks should allow unencrypted child datasets
#13098: Avoid dirtying the final TXGs when exporting a pool
#13172: Fix ENOSPC when unlinking multiple files from full pool

Obtained from: OpenZFS
OpenZFS commit: a86e089415679cf1b98eb424a159bb36aa2c19e3


# 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


# dae17134 17-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@269b5dadc (master) into main

Notable upstream pull request merges:
#12285 Introduce a tunable to exclude special class buffers from L2ARC
#12689 Check l2cache vdevs pending list inside the vdev_inuse()
#12735 Enable edonr in FreeBSD
#12743 FreeBSD: fix world build after de198f2
#12745 Restore dirty dnode detection logic

Obtained from: OpenZFS
OpenZFS commit: 269b5dadcfd1d5732cf763dddcd46009a332eae4


# 6ba2210e 21-Oct-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12392 Avoid panic in case of pool errors and missing L2ARC
#12448 skip snapshot in zfs_iter_mounted()
#12516 Fix NFS and large reads on older kernels
#12533 Fail invalid incremental recursive send gracefully
#12569 FreeBSD: Really zero the zero page
#12575 Reject zfs send -RI with nonexistent fromsnap
#12602 Correct refcount_add in dmu_zfetch
#12650 zpool should call zfs_nicestrtonum() with non-NULL handle

Obtained from: OpenZFS
OpenZFS commit: ec64fdb93d144ab1884097cfd36e18b62a2db848


# 53b70c86 15-Sep-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4a1195ca5 (master) into main

Notable upstream pull request merges:
#11312 Temporarily use root credentials to mount snapshots in .zfs
#12246 arc: Drop an incorrect assert
#12443 Fixed data integrity issue when underlying disk returns error
to zfs
#12522 Compressed receive with different ashift can result in incorrect
PSIZE on disk
#12535 Verify embedded blkptr's in arc_read()
#12541 Allow sending corrupt snapshots even if metadata is corrupted

Obtained from: OpenZFS
OpenZFS commit: 4a1195ca5041cbff2a6b025a31937fef84876c52


# 2faf504d 17-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@8ae86e2ed (master) into main

Notable upstream pull request merges:
#12422 Fix/improve dbuf hits accounting
#12406 Increase default volblocksize from 8KB to 16KB
#12398 Remove b_pabd/b_rabd allocation from arc_hdr_alloc()
#12397 Run arc_evict thread at higher priority
#12297 Avoid vq_lock drop in vdev_queue_aggregate()
#12161 Restore FreeBSD sysctl processing for arc.min and arc.max

Obtained from: OpenZFS
OpenZFS commit: 8ae86e2edc736483c1530fd689525aa2460eaec8


# 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


# 2617128a 30-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4694131a0 (master) into main

Notable upstream pull request merges:
#12253 module/zfs: simplify ddt_stat_add() loop
#12288 Avoid 64bit division in multilist index functions

Obtained from: OpenZFS
OpenZFS commit: 4694131a0a05b6db2727c9801f9729b9378d3064


# 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


# 0d8fe237 20-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12054 Avoid deadlock when removing L2ARC devices under I/O
#12172 Use wmsum for arc, abd, dbuf and zfetch statistics
#12221 vdev_draid_min_asize() ignores reserved space

Obtained from: OpenZFS
OpenZFS commit: c4c162c1e8ff9ce8833014711875d18df520096c


# 3ff01b23 12-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12149: Multiple man-pages: Move to appropriate section
#12158: Re-embed multilist_t storage
#12191: Convert non-libzpool libraries to -fvisibility=hidden
#12196: Unify manpage makefiles, move pages to better sexions, ...
#12210: libzutil: import filtering optimisation
#12212: Remove pool io kstats

Obtained from: OpenZFS
OpenZFS commit: afa7b3484556d3ae610a34582ce5ebd2c3e27bba


# 16038816 08-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@75b4cbf62 (master) into main

Notable upstream pull request merges:
#11710 Allow zfs to send replication streams with missing snapshots
#11751 Avoid taking global lock to destroy zfsdev state
#11786 Ratelimit deadman zevents as with delay zevents
#11803 ZFS traverse_visitbp optimization to limit prefetch
#11813 Allow pool names that look like Solaris disk names
#11822 Atomically check and set dropped zevent count
#11822 Don't scale zfs_zevent_len_max by CPU count
#11833 Refactor zfsdev state init/destroy to share common code
#11837 zfs get -p only outputs 3 columns if "clones" property is empty
#11843 libzutil: zfs_isnumber(): return false if input empty
#11849 Use dsl_scan_setup_check() to setup a scrub
#11861 Improvements to the 'compatibility' property
#11862 cmd/zfs receive: allow dry-run (-n) to check property args
#11864 receive: don't fail inheriting (-x) properties on wrong dataset type
#11877 Combine zio caches if possible
#11881 FreeBSD: use vnlru_free_vfsops if available
#11883 FreeBSD: add support for lockless symlink lookup
#11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr
#11896 Fix crash in zio_done error reporting
#11905 zfs-send(8): Restore sorting of flags
#11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir
#11930 vdev_mirror: don't scrub/resilver devices that can't be read
#11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines
#11955 zfs get: don't lookup mount options when using "-s local"
#11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl
#11959 vdev_id: variable not getting expanded under map_slot()
#11966 Scale worker threads and taskqs with number of CPUs
#11994 Clean up use of zfs_log_create in zfs_dir
#11997 FreeBSD: Don't force xattr mount option
#11997 FreeBSD: Implement xattr=sa
#11997 FreeBSD: Use SET_ERROR to trace xattr name errors
#11998 Simplify/fix dnode_move() for dn_zfetch
#12003 FreeBSD: Initialize/destroy zp->z_lock
#12010 Fix dRAID self-healing short columns
#12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots"
#12040 Reinstate the old zpool read label logic as a fallback
#12046 Improve scrub maxinflight_bytes math
#12049 FreeBSD: avoid memory allocation in arc_prune_async
#12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI
#12061 Fix dRAID sequential resilver silent damage handling
#12072 Let zfs diff be more permissive
#12077 FreeBSD: Retry OCF ENOMEM errors.
#12088 Propagate vdev state due to invalid label corruption
#12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat
#12097 FreeBSD: Update dataset_kstats for zvols in dev mode
#12104 FreeBSD boot code reminder after zpool upgrade
#12114 Introduce write-mostly sums

Obtained from: OpenZFS
OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3


# 6db169e9 13-Apr-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@3522f57b6 (master)

Notable upstream pull request merges:
#11742 When specifying raidz vdev name, parity count should match
#11744 Use a helper function to clarify gang block size
#11771 Support running FreeBSD buildworld on Arm-based macOS hosts

This is the last update that will be MFCed into stable/13.

From now on, the tracking of OpenZFS branches will be different:
- main continues tracking openzfs/zfs/master
- stable/13 is going to track openzfs/zfs/zfs-2.1-release

Obtained from: OpenZFS
MFC after: 1 week


# ba27dd8b 21-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9312e0fd1

Notable upstream changes:
778869fa1 Fix reporting of mount progress
e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD
03e02e5b5 Fix checksum errors not being counted on repeated repair
64e0fe14f Restore FreeBSD resource usage accounting
11f2e9a49 Fix panic if scrubbing after removing a slog device

MFC after: 2 weeks


# 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


# 5dce0384 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: Avoid updating the L2ARC device header unnecessarily

From openzfs-master 0ae184a6b commit message:
If we do not write any buffers to the cache device and the evict hand
has not advanced do not update the cache device header.

Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58
Patch Author: George Amanakis <gamanakis@gmail.com>

MFC after: 3 days
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D28682

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

OpenZFS: Fix issues caused by reversed commits + rebase

# 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
...

# 5596f836 14-Nov-2020 Mateusz Guzik <mjg@FreeBSD.org>

zfs: disable periodic arc updates

They are only there to provide less innacurate statistics for debuggers.
However, this is quite heavy-weight and instead it would be better to
teach debuggers how to obtain the necessary information.

# 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


# 2c48331d 18-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

MFV 2.0-rc2

- Fixes divide by zero for unusual hz
- remove cryptodev dependency


# eac7052f 04-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-gfd20a8

- fixes jail delegation
- fixes raw kstat unsupported complaints
- exposes dbgmsg, dbuf, and checksum benchmark stats
- restore rename -u support


# ac0bf12e 28-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-ga00c61


# 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


# b7198dcf 16-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@10e36e176

Notable upstream pull request merges:
#14948 Remove ARC/ZIO physdone callbacks
#14963 Store the L2ARC device ashift in the vdev label
#14970 Switch refcount tracking from lists to AVL-trees
#14981 Shorten arcstat_quiescence sleep time

Obtained from: OpenZFS
OpenZFS commit: 10e36e17612ba9c634b140ae76847bb62b5be68f


# 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


# e639e0d2 12-May-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@e61076683

Notable upstream pull request merges:
#14744 Optimize check_filesystem() and process_error_log()
#14773 Allow zhack label repair to restore detached devices
#14794 zpool import -m also removing spare and cache when log device
is missing
#14805 Simplify and optimize random_int_between()
#14813 Enable the head_errlog feature to remove errors
#14816 Fix two abd_gang_add_gang() issues
#14817 Verify block pointers before writing them out
#14819 Add dmu_tx_hold_append() interface
#14823 Remove single parent assertion from zio_nowait()
#14824 Plug memory leak in zfsdev_state
#14825 Block cloning dbuf fixes
#14828 Remove duplicate code in l2arc_evict()
#14837 Fixes in head_errlog feature with encryption
#14839 Prevent panic during concurrent snapshot rollback and zvol read
#14853 zil: Don't expect zio_shrink() to succeed

Obtained from: OpenZFS
OpenZFS commit: e6107668385044718b0a73330ed6423650806473


# 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


# 15f0b8c3 25-Jan-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@9cd71c860 (master)

Notable upstream pull request merges:
#13805 Configure zed's diagnosis engine with vdev properties
#14110 zfs list: Allow more fields in ZFS_ITER_SIMPLE mode
#14121 Batch enqueue/dequeue for bqueue
#14123 arc_read()/arc_access() refactoring and cleanup
#14159 Bypass metaslab throttle for removal allocations
#14243 Implement uncached prefetch
#14251 Cache dbuf_hash() calculation
#14253 Allow reciever to override encryption property in case of replication
#14254 Restrict visibility of per-dataset kstats inside FreeBSD jails
#14255 Zero end of embedded block buffer in dump_write_embedded()
#14263 Cleanups identified by CodeQL and Coverity
#14264 Miscellaneous fixes
#14272 Change ZEVENT_POOL_GUID to ZEVENT_POOL to display pool names
#14287 FreeBSD: Remove stray debug printf
#14288 Colorize zfs diff output
#14289 deadlock between spa_errlog_lock and dp_config_rwlock
#14291 FreeBSD: Fix potential boot panic with bad label
#14292 Add tunable to allow changing micro ZAP's max size
#14293 Turn default_bs and default_ibs into ZFS_MODULE_PARAMs
#14295 zed: add hotplug support for spare vdevs
#14304 Activate filesystem features only in syncing context
#14311 zpool: do guid-based comparison in is_vdev_cb()
#14317 Pack zrlock_t by 8 bytes
#14320 Update arc_summary and arcstat outputs
#14328 FreeBSD: catch up to 1400077
#14376 Use setproctitle to report progress of zfs send
#14340 Remove some dead ARC code
#14358 Wait for txg sync if the last DRR_FREEOBJECTS might result in a hole
#14360 libzpool: fix ddi_strtoull to update nptr
#14364 Fix unprotected zfs_znode_dmu_fini
#14379 zfs_receive_one: Check for the more likely error first
#14380 Cleanup of dead code suggested by Clang Static Analyzer
#14397 Avoid passing an uninitialized index to dsl_prop_known_index
#14404 Fix reading uninitialized variable in receive_read
#14407 free_blocks(): Fix reports from 2016 PVS Studio FreeBSD report
#14418 Introduce minimal ZIL block commit delay
#14422 x86 assembly: fix .size placement and replace .align with .balign

Obtained from: OpenZFS
OpenZFS commit: 9cd71c8604d52def22ffaddc35755712f0fb9349


# 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


# c7046f76 21-Sep-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c629f0bf6

Notable upstream pull request merges:
#13725 Fix BLAKE3 tuneable and module loading on Linux and FreeBSD
#13756 FreeBSD: Organize sysctls
#13773 FreeBSD: add kqfilter support for zvol cdev
#13781 Importing from cachefile can trip assertion
#13794 Apply arc_shrink_shift to ARC above arc_c_min
#13798 Improve too large physical ashift handling
#13799 Revert "Avoid panic with recordsize > 128k, raw sending and
no large_blocks"
#13802 Add zfs.sync.snapshot_rename
#13831 zfs_enter rework
#13855 zfs recv hangs if max recordsize is less than received
recordsize

Obtained from: OpenZFS
OpenZFS commit: c629f0bf62e351355716f9870d6c2e377584b016


# 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


# 716fd348 18-May-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c0cf6ed67

Notable upstream pull request merges:
#10662 zvol_wait: Ignore locked zvols
#12789 Improve log spacemap load time
#12812 Improved zpool status output, list all affected datasets
#13277 FreeBSD: Use NDFREE_PNBUF if available
#13302 Make zfs_max_recordsize default to 16M
#13311 Fix error handling in FreeBSD's get/putpages VOPs
#13345 FreeBSD: Fix translation from ABD to physical pages
#13373 zfs: holds: dequadratify
#13375 Corrected edge case in uncompressed ARC->L2ARC handling
#13388 Improve mg_aliquot math
#13405 Reduce dbuf_find() lock contention
#13406 FreeBSD: use zero_region instead of allocating a dedicated page

Obtained from: OpenZFS
OpenZFS commit: c0cf6ed6792e545fd614c2a88cb53756db7e03f8


# 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


# c03c5b1c 08-Mar-2022 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#9078: log xattr=sa create/remove/update to ZIL
#11919: Cross-platform xattr user namespace compatibility
#13014: Report dnodes with faulty bonuslen
#13016: FreeBSD: Fix zvol_cdev_open locking
#13019: spl: Don't check FreeBSD rwlocks for double initialization
#13027: Fix clearing set-uid and set-gid bits on a file when
replying a write
#13031: Add enumerated vdev names to 'zpool iostat -v' and
'zpool list -v'
#13074: Enable encrypted raw sending to pools with greater ashift
#13076: Receive checks should allow unencrypted child datasets
#13098: Avoid dirtying the final TXGs when exporting a pool
#13172: Fix ENOSPC when unlinking multiple files from full pool

Obtained from: OpenZFS
OpenZFS commit: a86e089415679cf1b98eb424a159bb36aa2c19e3


# 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


# dae17134 17-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@269b5dadc (master) into main

Notable upstream pull request merges:
#12285 Introduce a tunable to exclude special class buffers from L2ARC
#12689 Check l2cache vdevs pending list inside the vdev_inuse()
#12735 Enable edonr in FreeBSD
#12743 FreeBSD: fix world build after de198f2
#12745 Restore dirty dnode detection logic

Obtained from: OpenZFS
OpenZFS commit: 269b5dadcfd1d5732cf763dddcd46009a332eae4


# 6ba2210e 21-Oct-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12392 Avoid panic in case of pool errors and missing L2ARC
#12448 skip snapshot in zfs_iter_mounted()
#12516 Fix NFS and large reads on older kernels
#12533 Fail invalid incremental recursive send gracefully
#12569 FreeBSD: Really zero the zero page
#12575 Reject zfs send -RI with nonexistent fromsnap
#12602 Correct refcount_add in dmu_zfetch
#12650 zpool should call zfs_nicestrtonum() with non-NULL handle

Obtained from: OpenZFS
OpenZFS commit: ec64fdb93d144ab1884097cfd36e18b62a2db848


# 53b70c86 15-Sep-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4a1195ca5 (master) into main

Notable upstream pull request merges:
#11312 Temporarily use root credentials to mount snapshots in .zfs
#12246 arc: Drop an incorrect assert
#12443 Fixed data integrity issue when underlying disk returns error
to zfs
#12522 Compressed receive with different ashift can result in incorrect
PSIZE on disk
#12535 Verify embedded blkptr's in arc_read()
#12541 Allow sending corrupt snapshots even if metadata is corrupted

Obtained from: OpenZFS
OpenZFS commit: 4a1195ca5041cbff2a6b025a31937fef84876c52


# 2faf504d 17-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@8ae86e2ed (master) into main

Notable upstream pull request merges:
#12422 Fix/improve dbuf hits accounting
#12406 Increase default volblocksize from 8KB to 16KB
#12398 Remove b_pabd/b_rabd allocation from arc_hdr_alloc()
#12397 Run arc_evict thread at higher priority
#12297 Avoid vq_lock drop in vdev_queue_aggregate()
#12161 Restore FreeBSD sysctl processing for arc.min and arc.max

Obtained from: OpenZFS
OpenZFS commit: 8ae86e2edc736483c1530fd689525aa2460eaec8


# 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


# 2617128a 30-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4694131a0 (master) into main

Notable upstream pull request merges:
#12253 module/zfs: simplify ddt_stat_add() loop
#12288 Avoid 64bit division in multilist index functions

Obtained from: OpenZFS
OpenZFS commit: 4694131a0a05b6db2727c9801f9729b9378d3064


# 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


# 0d8fe237 20-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12054 Avoid deadlock when removing L2ARC devices under I/O
#12172 Use wmsum for arc, abd, dbuf and zfetch statistics
#12221 vdev_draid_min_asize() ignores reserved space

Obtained from: OpenZFS
OpenZFS commit: c4c162c1e8ff9ce8833014711875d18df520096c


# 3ff01b23 12-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12149: Multiple man-pages: Move to appropriate section
#12158: Re-embed multilist_t storage
#12191: Convert non-libzpool libraries to -fvisibility=hidden
#12196: Unify manpage makefiles, move pages to better sexions, ...
#12210: libzutil: import filtering optimisation
#12212: Remove pool io kstats

Obtained from: OpenZFS
OpenZFS commit: afa7b3484556d3ae610a34582ce5ebd2c3e27bba


# 16038816 08-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@75b4cbf62 (master) into main

Notable upstream pull request merges:
#11710 Allow zfs to send replication streams with missing snapshots
#11751 Avoid taking global lock to destroy zfsdev state
#11786 Ratelimit deadman zevents as with delay zevents
#11803 ZFS traverse_visitbp optimization to limit prefetch
#11813 Allow pool names that look like Solaris disk names
#11822 Atomically check and set dropped zevent count
#11822 Don't scale zfs_zevent_len_max by CPU count
#11833 Refactor zfsdev state init/destroy to share common code
#11837 zfs get -p only outputs 3 columns if "clones" property is empty
#11843 libzutil: zfs_isnumber(): return false if input empty
#11849 Use dsl_scan_setup_check() to setup a scrub
#11861 Improvements to the 'compatibility' property
#11862 cmd/zfs receive: allow dry-run (-n) to check property args
#11864 receive: don't fail inheriting (-x) properties on wrong dataset type
#11877 Combine zio caches if possible
#11881 FreeBSD: use vnlru_free_vfsops if available
#11883 FreeBSD: add support for lockless symlink lookup
#11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr
#11896 Fix crash in zio_done error reporting
#11905 zfs-send(8): Restore sorting of flags
#11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir
#11930 vdev_mirror: don't scrub/resilver devices that can't be read
#11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines
#11955 zfs get: don't lookup mount options when using "-s local"
#11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl
#11959 vdev_id: variable not getting expanded under map_slot()
#11966 Scale worker threads and taskqs with number of CPUs
#11994 Clean up use of zfs_log_create in zfs_dir
#11997 FreeBSD: Don't force xattr mount option
#11997 FreeBSD: Implement xattr=sa
#11997 FreeBSD: Use SET_ERROR to trace xattr name errors
#11998 Simplify/fix dnode_move() for dn_zfetch
#12003 FreeBSD: Initialize/destroy zp->z_lock
#12010 Fix dRAID self-healing short columns
#12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots"
#12040 Reinstate the old zpool read label logic as a fallback
#12046 Improve scrub maxinflight_bytes math
#12049 FreeBSD: avoid memory allocation in arc_prune_async
#12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI
#12061 Fix dRAID sequential resilver silent damage handling
#12072 Let zfs diff be more permissive
#12077 FreeBSD: Retry OCF ENOMEM errors.
#12088 Propagate vdev state due to invalid label corruption
#12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat
#12097 FreeBSD: Update dataset_kstats for zvols in dev mode
#12104 FreeBSD boot code reminder after zpool upgrade
#12114 Introduce write-mostly sums

Obtained from: OpenZFS
OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3


# 6db169e9 13-Apr-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@3522f57b6 (master)

Notable upstream pull request merges:
#11742 When specifying raidz vdev name, parity count should match
#11744 Use a helper function to clarify gang block size
#11771 Support running FreeBSD buildworld on Arm-based macOS hosts

This is the last update that will be MFCed into stable/13.

From now on, the tracking of OpenZFS branches will be different:
- main continues tracking openzfs/zfs/master
- stable/13 is going to track openzfs/zfs/zfs-2.1-release

Obtained from: OpenZFS
MFC after: 1 week


# ba27dd8b 21-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9312e0fd1

Notable upstream changes:
778869fa1 Fix reporting of mount progress
e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD
03e02e5b5 Fix checksum errors not being counted on repeated repair
64e0fe14f Restore FreeBSD resource usage accounting
11f2e9a49 Fix panic if scrubbing after removing a slog device

MFC after: 2 weeks


# 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


# 5dce0384 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: Avoid updating the L2ARC device header unnecessarily

From openzfs-master 0ae184a6b commit message:
If we do not write any buffers to the cache device and the evict hand
has not advanced do not update the cache device header.

Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58
Patch Author: George Amanakis <gamanakis@gmail.com>

MFC after: 3 days
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D28682

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

OpenZFS: Fix issues caused by reversed commits + rebase

# 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
...

# 5596f836 14-Nov-2020 Mateusz Guzik <mjg@FreeBSD.org>

zfs: disable periodic arc updates

They are only there to provide less innacurate statistics for debuggers.
However, this is quite heavy-weight and instead it would be better to
teach debuggers how to obtain the necessary information.

# 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


# 2c48331d 18-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

MFV 2.0-rc2

- Fixes divide by zero for unusual hz
- remove cryptodev dependency


# eac7052f 04-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-gfd20a8

- fixes jail delegation
- fixes raw kstat unsupported complaints
- exposes dbgmsg, dbuf, and checksum benchmark stats
- restore rename -u support


# ac0bf12e 28-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-ga00c61


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

Initial import from vendor-sys branch of openzfs


# b7198dcf 16-Jun-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@10e36e176

Notable upstream pull request merges:
#14948 Remove ARC/ZIO physdone callbacks
#14963 Store the L2ARC device ashift in the vdev label
#14970 Switch refcount tracking from lists to AVL-trees
#14981 Shorten arcstat_quiescence sleep time

Obtained from: OpenZFS
OpenZFS commit: 10e36e17612ba9c634b140ae76847bb62b5be68f


# 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


# e639e0d2 12-May-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@e61076683

Notable upstream pull request merges:
#14744 Optimize check_filesystem() and process_error_log()
#14773 Allow zhack label repair to restore detached devices
#14794 zpool import -m also removing spare and cache when log device
is missing
#14805 Simplify and optimize random_int_between()
#14813 Enable the head_errlog feature to remove errors
#14816 Fix two abd_gang_add_gang() issues
#14817 Verify block pointers before writing them out
#14819 Add dmu_tx_hold_append() interface
#14823 Remove single parent assertion from zio_nowait()
#14824 Plug memory leak in zfsdev_state
#14825 Block cloning dbuf fixes
#14828 Remove duplicate code in l2arc_evict()
#14837 Fixes in head_errlog feature with encryption
#14839 Prevent panic during concurrent snapshot rollback and zvol read
#14853 zil: Don't expect zio_shrink() to succeed

Obtained from: OpenZFS
OpenZFS commit: e6107668385044718b0a73330ed6423650806473


# 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


# 15f0b8c3 25-Jan-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@9cd71c860 (master)

Notable upstream pull request merges:
#13805 Configure zed's diagnosis engine with vdev properties
#14110 zfs list: Allow more fields in ZFS_ITER_SIMPLE mode
#14121 Batch enqueue/dequeue for bqueue
#14123 arc_read()/arc_access() refactoring and cleanup
#14159 Bypass metaslab throttle for removal allocations
#14243 Implement uncached prefetch
#14251 Cache dbuf_hash() calculation
#14253 Allow reciever to override encryption property in case of replication
#14254 Restrict visibility of per-dataset kstats inside FreeBSD jails
#14255 Zero end of embedded block buffer in dump_write_embedded()
#14263 Cleanups identified by CodeQL and Coverity
#14264 Miscellaneous fixes
#14272 Change ZEVENT_POOL_GUID to ZEVENT_POOL to display pool names
#14287 FreeBSD: Remove stray debug printf
#14288 Colorize zfs diff output
#14289 deadlock between spa_errlog_lock and dp_config_rwlock
#14291 FreeBSD: Fix potential boot panic with bad label
#14292 Add tunable to allow changing micro ZAP's max size
#14293 Turn default_bs and default_ibs into ZFS_MODULE_PARAMs
#14295 zed: add hotplug support for spare vdevs
#14304 Activate filesystem features only in syncing context
#14311 zpool: do guid-based comparison in is_vdev_cb()
#14317 Pack zrlock_t by 8 bytes
#14320 Update arc_summary and arcstat outputs
#14328 FreeBSD: catch up to 1400077
#14376 Use setproctitle to report progress of zfs send
#14340 Remove some dead ARC code
#14358 Wait for txg sync if the last DRR_FREEOBJECTS might result in a hole
#14360 libzpool: fix ddi_strtoull to update nptr
#14364 Fix unprotected zfs_znode_dmu_fini
#14379 zfs_receive_one: Check for the more likely error first
#14380 Cleanup of dead code suggested by Clang Static Analyzer
#14397 Avoid passing an uninitialized index to dsl_prop_known_index
#14404 Fix reading uninitialized variable in receive_read
#14407 free_blocks(): Fix reports from 2016 PVS Studio FreeBSD report
#14418 Introduce minimal ZIL block commit delay
#14422 x86 assembly: fix .size placement and replace .align with .balign

Obtained from: OpenZFS
OpenZFS commit: 9cd71c8604d52def22ffaddc35755712f0fb9349


# 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


# c7046f76 21-Sep-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c629f0bf6

Notable upstream pull request merges:
#13725 Fix BLAKE3 tuneable and module loading on Linux and FreeBSD
#13756 FreeBSD: Organize sysctls
#13773 FreeBSD: add kqfilter support for zvol cdev
#13781 Importing from cachefile can trip assertion
#13794 Apply arc_shrink_shift to ARC above arc_c_min
#13798 Improve too large physical ashift handling
#13799 Revert "Avoid panic with recordsize > 128k, raw sending and
no large_blocks"
#13802 Add zfs.sync.snapshot_rename
#13831 zfs_enter rework
#13855 zfs recv hangs if max recordsize is less than received
recordsize

Obtained from: OpenZFS
OpenZFS commit: c629f0bf62e351355716f9870d6c2e377584b016


# 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


# 716fd348 18-May-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c0cf6ed67

Notable upstream pull request merges:
#10662 zvol_wait: Ignore locked zvols
#12789 Improve log spacemap load time
#12812 Improved zpool status output, list all affected datasets
#13277 FreeBSD: Use NDFREE_PNBUF if available
#13302 Make zfs_max_recordsize default to 16M
#13311 Fix error handling in FreeBSD's get/putpages VOPs
#13345 FreeBSD: Fix translation from ABD to physical pages
#13373 zfs: holds: dequadratify
#13375 Corrected edge case in uncompressed ARC->L2ARC handling
#13388 Improve mg_aliquot math
#13405 Reduce dbuf_find() lock contention
#13406 FreeBSD: use zero_region instead of allocating a dedicated page

Obtained from: OpenZFS
OpenZFS commit: c0cf6ed6792e545fd614c2a88cb53756db7e03f8


# 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


# c03c5b1c 08-Mar-2022 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#9078: log xattr=sa create/remove/update to ZIL
#11919: Cross-platform xattr user namespace compatibility
#13014: Report dnodes with faulty bonuslen
#13016: FreeBSD: Fix zvol_cdev_open locking
#13019: spl: Don't check FreeBSD rwlocks for double initialization
#13027: Fix clearing set-uid and set-gid bits on a file when
replying a write
#13031: Add enumerated vdev names to 'zpool iostat -v' and
'zpool list -v'
#13074: Enable encrypted raw sending to pools with greater ashift
#13076: Receive checks should allow unencrypted child datasets
#13098: Avoid dirtying the final TXGs when exporting a pool
#13172: Fix ENOSPC when unlinking multiple files from full pool

Obtained from: OpenZFS
OpenZFS commit: a86e089415679cf1b98eb424a159bb36aa2c19e3


# 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


# dae17134 17-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@269b5dadc (master) into main

Notable upstream pull request merges:
#12285 Introduce a tunable to exclude special class buffers from L2ARC
#12689 Check l2cache vdevs pending list inside the vdev_inuse()
#12735 Enable edonr in FreeBSD
#12743 FreeBSD: fix world build after de198f2
#12745 Restore dirty dnode detection logic

Obtained from: OpenZFS
OpenZFS commit: 269b5dadcfd1d5732cf763dddcd46009a332eae4


# 6ba2210e 21-Oct-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12392 Avoid panic in case of pool errors and missing L2ARC
#12448 skip snapshot in zfs_iter_mounted()
#12516 Fix NFS and large reads on older kernels
#12533 Fail invalid incremental recursive send gracefully
#12569 FreeBSD: Really zero the zero page
#12575 Reject zfs send -RI with nonexistent fromsnap
#12602 Correct refcount_add in dmu_zfetch
#12650 zpool should call zfs_nicestrtonum() with non-NULL handle

Obtained from: OpenZFS
OpenZFS commit: ec64fdb93d144ab1884097cfd36e18b62a2db848


# 53b70c86 15-Sep-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4a1195ca5 (master) into main

Notable upstream pull request merges:
#11312 Temporarily use root credentials to mount snapshots in .zfs
#12246 arc: Drop an incorrect assert
#12443 Fixed data integrity issue when underlying disk returns error
to zfs
#12522 Compressed receive with different ashift can result in incorrect
PSIZE on disk
#12535 Verify embedded blkptr's in arc_read()
#12541 Allow sending corrupt snapshots even if metadata is corrupted

Obtained from: OpenZFS
OpenZFS commit: 4a1195ca5041cbff2a6b025a31937fef84876c52


# 2faf504d 17-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@8ae86e2ed (master) into main

Notable upstream pull request merges:
#12422 Fix/improve dbuf hits accounting
#12406 Increase default volblocksize from 8KB to 16KB
#12398 Remove b_pabd/b_rabd allocation from arc_hdr_alloc()
#12397 Run arc_evict thread at higher priority
#12297 Avoid vq_lock drop in vdev_queue_aggregate()
#12161 Restore FreeBSD sysctl processing for arc.min and arc.max

Obtained from: OpenZFS
OpenZFS commit: 8ae86e2edc736483c1530fd689525aa2460eaec8


# 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


# 2617128a 30-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4694131a0 (master) into main

Notable upstream pull request merges:
#12253 module/zfs: simplify ddt_stat_add() loop
#12288 Avoid 64bit division in multilist index functions

Obtained from: OpenZFS
OpenZFS commit: 4694131a0a05b6db2727c9801f9729b9378d3064


# 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


# 0d8fe237 20-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12054 Avoid deadlock when removing L2ARC devices under I/O
#12172 Use wmsum for arc, abd, dbuf and zfetch statistics
#12221 vdev_draid_min_asize() ignores reserved space

Obtained from: OpenZFS
OpenZFS commit: c4c162c1e8ff9ce8833014711875d18df520096c


# 3ff01b23 12-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12149: Multiple man-pages: Move to appropriate section
#12158: Re-embed multilist_t storage
#12191: Convert non-libzpool libraries to -fvisibility=hidden
#12196: Unify manpage makefiles, move pages to better sexions, ...
#12210: libzutil: import filtering optimisation
#12212: Remove pool io kstats

Obtained from: OpenZFS
OpenZFS commit: afa7b3484556d3ae610a34582ce5ebd2c3e27bba


# 16038816 08-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@75b4cbf62 (master) into main

Notable upstream pull request merges:
#11710 Allow zfs to send replication streams with missing snapshots
#11751 Avoid taking global lock to destroy zfsdev state
#11786 Ratelimit deadman zevents as with delay zevents
#11803 ZFS traverse_visitbp optimization to limit prefetch
#11813 Allow pool names that look like Solaris disk names
#11822 Atomically check and set dropped zevent count
#11822 Don't scale zfs_zevent_len_max by CPU count
#11833 Refactor zfsdev state init/destroy to share common code
#11837 zfs get -p only outputs 3 columns if "clones" property is empty
#11843 libzutil: zfs_isnumber(): return false if input empty
#11849 Use dsl_scan_setup_check() to setup a scrub
#11861 Improvements to the 'compatibility' property
#11862 cmd/zfs receive: allow dry-run (-n) to check property args
#11864 receive: don't fail inheriting (-x) properties on wrong dataset type
#11877 Combine zio caches if possible
#11881 FreeBSD: use vnlru_free_vfsops if available
#11883 FreeBSD: add support for lockless symlink lookup
#11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr
#11896 Fix crash in zio_done error reporting
#11905 zfs-send(8): Restore sorting of flags
#11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir
#11930 vdev_mirror: don't scrub/resilver devices that can't be read
#11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines
#11955 zfs get: don't lookup mount options when using "-s local"
#11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl
#11959 vdev_id: variable not getting expanded under map_slot()
#11966 Scale worker threads and taskqs with number of CPUs
#11994 Clean up use of zfs_log_create in zfs_dir
#11997 FreeBSD: Don't force xattr mount option
#11997 FreeBSD: Implement xattr=sa
#11997 FreeBSD: Use SET_ERROR to trace xattr name errors
#11998 Simplify/fix dnode_move() for dn_zfetch
#12003 FreeBSD: Initialize/destroy zp->z_lock
#12010 Fix dRAID self-healing short columns
#12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots"
#12040 Reinstate the old zpool read label logic as a fallback
#12046 Improve scrub maxinflight_bytes math
#12049 FreeBSD: avoid memory allocation in arc_prune_async
#12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI
#12061 Fix dRAID sequential resilver silent damage handling
#12072 Let zfs diff be more permissive
#12077 FreeBSD: Retry OCF ENOMEM errors.
#12088 Propagate vdev state due to invalid label corruption
#12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat
#12097 FreeBSD: Update dataset_kstats for zvols in dev mode
#12104 FreeBSD boot code reminder after zpool upgrade
#12114 Introduce write-mostly sums

Obtained from: OpenZFS
OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3


# 6db169e9 13-Apr-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@3522f57b6 (master)

Notable upstream pull request merges:
#11742 When specifying raidz vdev name, parity count should match
#11744 Use a helper function to clarify gang block size
#11771 Support running FreeBSD buildworld on Arm-based macOS hosts

This is the last update that will be MFCed into stable/13.

From now on, the tracking of OpenZFS branches will be different:
- main continues tracking openzfs/zfs/master
- stable/13 is going to track openzfs/zfs/zfs-2.1-release

Obtained from: OpenZFS
MFC after: 1 week


# ba27dd8b 21-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9312e0fd1

Notable upstream changes:
778869fa1 Fix reporting of mount progress
e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD
03e02e5b5 Fix checksum errors not being counted on repeated repair
64e0fe14f Restore FreeBSD resource usage accounting
11f2e9a49 Fix panic if scrubbing after removing a slog device

MFC after: 2 weeks


# 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


# 5dce0384 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: Avoid updating the L2ARC device header unnecessarily

From openzfs-master 0ae184a6b commit message:
If we do not write any buffers to the cache device and the evict hand
has not advanced do not update the cache device header.

Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58
Patch Author: George Amanakis <gamanakis@gmail.com>

MFC after: 3 days
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D28682

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

OpenZFS: Fix issues caused by reversed commits + rebase

# 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
...

# 5596f836 14-Nov-2020 Mateusz Guzik <mjg@FreeBSD.org>

zfs: disable periodic arc updates

They are only there to provide less innacurate statistics for debuggers.
However, this is quite heavy-weight and instead it would be better to
teach debuggers how to obtain the necessary information.

# 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


# 2c48331d 18-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

MFV 2.0-rc2

- Fixes divide by zero for unusual hz
- remove cryptodev dependency


# eac7052f 04-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-gfd20a8

- fixes jail delegation
- fixes raw kstat unsupported complaints
- exposes dbgmsg, dbuf, and checksum benchmark stats
- restore rename -u support


# ac0bf12e 28-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-ga00c61


# 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


# 15f0b8c3 25-Jan-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@9cd71c860 (master)

Notable upstream pull request merges:
#13805 Configure zed's diagnosis engine with vdev properties
#14110 zfs list: Allow more fields in ZFS_ITER_SIMPLE mode
#14121 Batch enqueue/dequeue for bqueue
#14123 arc_read()/arc_access() refactoring and cleanup
#14159 Bypass metaslab throttle for removal allocations
#14243 Implement uncached prefetch
#14251 Cache dbuf_hash() calculation
#14253 Allow reciever to override encryption property in case of replication
#14254 Restrict visibility of per-dataset kstats inside FreeBSD jails
#14255 Zero end of embedded block buffer in dump_write_embedded()
#14263 Cleanups identified by CodeQL and Coverity
#14264 Miscellaneous fixes
#14272 Change ZEVENT_POOL_GUID to ZEVENT_POOL to display pool names
#14287 FreeBSD: Remove stray debug printf
#14288 Colorize zfs diff output
#14289 deadlock between spa_errlog_lock and dp_config_rwlock
#14291 FreeBSD: Fix potential boot panic with bad label
#14292 Add tunable to allow changing micro ZAP's max size
#14293 Turn default_bs and default_ibs into ZFS_MODULE_PARAMs
#14295 zed: add hotplug support for spare vdevs
#14304 Activate filesystem features only in syncing context
#14311 zpool: do guid-based comparison in is_vdev_cb()
#14317 Pack zrlock_t by 8 bytes
#14320 Update arc_summary and arcstat outputs
#14328 FreeBSD: catch up to 1400077
#14376 Use setproctitle to report progress of zfs send
#14340 Remove some dead ARC code
#14358 Wait for txg sync if the last DRR_FREEOBJECTS might result in a hole
#14360 libzpool: fix ddi_strtoull to update nptr
#14364 Fix unprotected zfs_znode_dmu_fini
#14379 zfs_receive_one: Check for the more likely error first
#14380 Cleanup of dead code suggested by Clang Static Analyzer
#14397 Avoid passing an uninitialized index to dsl_prop_known_index
#14404 Fix reading uninitialized variable in receive_read
#14407 free_blocks(): Fix reports from 2016 PVS Studio FreeBSD report
#14418 Introduce minimal ZIL block commit delay
#14422 x86 assembly: fix .size placement and replace .align with .balign

Obtained from: OpenZFS
OpenZFS commit: 9cd71c8604d52def22ffaddc35755712f0fb9349


# 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


# c7046f76 21-Sep-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c629f0bf6

Notable upstream pull request merges:
#13725 Fix BLAKE3 tuneable and module loading on Linux and FreeBSD
#13756 FreeBSD: Organize sysctls
#13773 FreeBSD: add kqfilter support for zvol cdev
#13781 Importing from cachefile can trip assertion
#13794 Apply arc_shrink_shift to ARC above arc_c_min
#13798 Improve too large physical ashift handling
#13799 Revert "Avoid panic with recordsize > 128k, raw sending and
no large_blocks"
#13802 Add zfs.sync.snapshot_rename
#13831 zfs_enter rework
#13855 zfs recv hangs if max recordsize is less than received
recordsize

Obtained from: OpenZFS
OpenZFS commit: c629f0bf62e351355716f9870d6c2e377584b016


# 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


# 716fd348 18-May-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c0cf6ed67

Notable upstream pull request merges:
#10662 zvol_wait: Ignore locked zvols
#12789 Improve log spacemap load time
#12812 Improved zpool status output, list all affected datasets
#13277 FreeBSD: Use NDFREE_PNBUF if available
#13302 Make zfs_max_recordsize default to 16M
#13311 Fix error handling in FreeBSD's get/putpages VOPs
#13345 FreeBSD: Fix translation from ABD to physical pages
#13373 zfs: holds: dequadratify
#13375 Corrected edge case in uncompressed ARC->L2ARC handling
#13388 Improve mg_aliquot math
#13405 Reduce dbuf_find() lock contention
#13406 FreeBSD: use zero_region instead of allocating a dedicated page

Obtained from: OpenZFS
OpenZFS commit: c0cf6ed6792e545fd614c2a88cb53756db7e03f8


# 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


# c03c5b1c 08-Mar-2022 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#9078: log xattr=sa create/remove/update to ZIL
#11919: Cross-platform xattr user namespace compatibility
#13014: Report dnodes with faulty bonuslen
#13016: FreeBSD: Fix zvol_cdev_open locking
#13019: spl: Don't check FreeBSD rwlocks for double initialization
#13027: Fix clearing set-uid and set-gid bits on a file when
replying a write
#13031: Add enumerated vdev names to 'zpool iostat -v' and
'zpool list -v'
#13074: Enable encrypted raw sending to pools with greater ashift
#13076: Receive checks should allow unencrypted child datasets
#13098: Avoid dirtying the final TXGs when exporting a pool
#13172: Fix ENOSPC when unlinking multiple files from full pool

Obtained from: OpenZFS
OpenZFS commit: a86e089415679cf1b98eb424a159bb36aa2c19e3


# 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


# dae17134 17-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@269b5dadc (master) into main

Notable upstream pull request merges:
#12285 Introduce a tunable to exclude special class buffers from L2ARC
#12689 Check l2cache vdevs pending list inside the vdev_inuse()
#12735 Enable edonr in FreeBSD
#12743 FreeBSD: fix world build after de198f2
#12745 Restore dirty dnode detection logic

Obtained from: OpenZFS
OpenZFS commit: 269b5dadcfd1d5732cf763dddcd46009a332eae4


# 6ba2210e 21-Oct-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12392 Avoid panic in case of pool errors and missing L2ARC
#12448 skip snapshot in zfs_iter_mounted()
#12516 Fix NFS and large reads on older kernels
#12533 Fail invalid incremental recursive send gracefully
#12569 FreeBSD: Really zero the zero page
#12575 Reject zfs send -RI with nonexistent fromsnap
#12602 Correct refcount_add in dmu_zfetch
#12650 zpool should call zfs_nicestrtonum() with non-NULL handle

Obtained from: OpenZFS
OpenZFS commit: ec64fdb93d144ab1884097cfd36e18b62a2db848


# 53b70c86 15-Sep-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4a1195ca5 (master) into main

Notable upstream pull request merges:
#11312 Temporarily use root credentials to mount snapshots in .zfs
#12246 arc: Drop an incorrect assert
#12443 Fixed data integrity issue when underlying disk returns error
to zfs
#12522 Compressed receive with different ashift can result in incorrect
PSIZE on disk
#12535 Verify embedded blkptr's in arc_read()
#12541 Allow sending corrupt snapshots even if metadata is corrupted

Obtained from: OpenZFS
OpenZFS commit: 4a1195ca5041cbff2a6b025a31937fef84876c52


# 2faf504d 17-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@8ae86e2ed (master) into main

Notable upstream pull request merges:
#12422 Fix/improve dbuf hits accounting
#12406 Increase default volblocksize from 8KB to 16KB
#12398 Remove b_pabd/b_rabd allocation from arc_hdr_alloc()
#12397 Run arc_evict thread at higher priority
#12297 Avoid vq_lock drop in vdev_queue_aggregate()
#12161 Restore FreeBSD sysctl processing for arc.min and arc.max

Obtained from: OpenZFS
OpenZFS commit: 8ae86e2edc736483c1530fd689525aa2460eaec8


# 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


# 2617128a 30-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4694131a0 (master) into main

Notable upstream pull request merges:
#12253 module/zfs: simplify ddt_stat_add() loop
#12288 Avoid 64bit division in multilist index functions

Obtained from: OpenZFS
OpenZFS commit: 4694131a0a05b6db2727c9801f9729b9378d3064


# 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


# 0d8fe237 20-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12054 Avoid deadlock when removing L2ARC devices under I/O
#12172 Use wmsum for arc, abd, dbuf and zfetch statistics
#12221 vdev_draid_min_asize() ignores reserved space

Obtained from: OpenZFS
OpenZFS commit: c4c162c1e8ff9ce8833014711875d18df520096c


# 3ff01b23 12-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12149: Multiple man-pages: Move to appropriate section
#12158: Re-embed multilist_t storage
#12191: Convert non-libzpool libraries to -fvisibility=hidden
#12196: Unify manpage makefiles, move pages to better sexions, ...
#12210: libzutil: import filtering optimisation
#12212: Remove pool io kstats

Obtained from: OpenZFS
OpenZFS commit: afa7b3484556d3ae610a34582ce5ebd2c3e27bba


# 16038816 08-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@75b4cbf62 (master) into main

Notable upstream pull request merges:
#11710 Allow zfs to send replication streams with missing snapshots
#11751 Avoid taking global lock to destroy zfsdev state
#11786 Ratelimit deadman zevents as with delay zevents
#11803 ZFS traverse_visitbp optimization to limit prefetch
#11813 Allow pool names that look like Solaris disk names
#11822 Atomically check and set dropped zevent count
#11822 Don't scale zfs_zevent_len_max by CPU count
#11833 Refactor zfsdev state init/destroy to share common code
#11837 zfs get -p only outputs 3 columns if "clones" property is empty
#11843 libzutil: zfs_isnumber(): return false if input empty
#11849 Use dsl_scan_setup_check() to setup a scrub
#11861 Improvements to the 'compatibility' property
#11862 cmd/zfs receive: allow dry-run (-n) to check property args
#11864 receive: don't fail inheriting (-x) properties on wrong dataset type
#11877 Combine zio caches if possible
#11881 FreeBSD: use vnlru_free_vfsops if available
#11883 FreeBSD: add support for lockless symlink lookup
#11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr
#11896 Fix crash in zio_done error reporting
#11905 zfs-send(8): Restore sorting of flags
#11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir
#11930 vdev_mirror: don't scrub/resilver devices that can't be read
#11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines
#11955 zfs get: don't lookup mount options when using "-s local"
#11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl
#11959 vdev_id: variable not getting expanded under map_slot()
#11966 Scale worker threads and taskqs with number of CPUs
#11994 Clean up use of zfs_log_create in zfs_dir
#11997 FreeBSD: Don't force xattr mount option
#11997 FreeBSD: Implement xattr=sa
#11997 FreeBSD: Use SET_ERROR to trace xattr name errors
#11998 Simplify/fix dnode_move() for dn_zfetch
#12003 FreeBSD: Initialize/destroy zp->z_lock
#12010 Fix dRAID self-healing short columns
#12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots"
#12040 Reinstate the old zpool read label logic as a fallback
#12046 Improve scrub maxinflight_bytes math
#12049 FreeBSD: avoid memory allocation in arc_prune_async
#12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI
#12061 Fix dRAID sequential resilver silent damage handling
#12072 Let zfs diff be more permissive
#12077 FreeBSD: Retry OCF ENOMEM errors.
#12088 Propagate vdev state due to invalid label corruption
#12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat
#12097 FreeBSD: Update dataset_kstats for zvols in dev mode
#12104 FreeBSD boot code reminder after zpool upgrade
#12114 Introduce write-mostly sums

Obtained from: OpenZFS
OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3


# 6db169e9 13-Apr-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@3522f57b6 (master)

Notable upstream pull request merges:
#11742 When specifying raidz vdev name, parity count should match
#11744 Use a helper function to clarify gang block size
#11771 Support running FreeBSD buildworld on Arm-based macOS hosts

This is the last update that will be MFCed into stable/13.

From now on, the tracking of OpenZFS branches will be different:
- main continues tracking openzfs/zfs/master
- stable/13 is going to track openzfs/zfs/zfs-2.1-release

Obtained from: OpenZFS
MFC after: 1 week


# ba27dd8b 21-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9312e0fd1

Notable upstream changes:
778869fa1 Fix reporting of mount progress
e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD
03e02e5b5 Fix checksum errors not being counted on repeated repair
64e0fe14f Restore FreeBSD resource usage accounting
11f2e9a49 Fix panic if scrubbing after removing a slog device

MFC after: 2 weeks


# 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


# 5dce0384 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: Avoid updating the L2ARC device header unnecessarily

From openzfs-master 0ae184a6b commit message:
If we do not write any buffers to the cache device and the evict hand
has not advanced do not update the cache device header.

Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58
Patch Author: George Amanakis <gamanakis@gmail.com>

MFC after: 3 days
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D28682

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

OpenZFS: Fix issues caused by reversed commits + rebase

# 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
...

# 5596f836 14-Nov-2020 Mateusz Guzik <mjg@FreeBSD.org>

zfs: disable periodic arc updates

They are only there to provide less innacurate statistics for debuggers.
However, this is quite heavy-weight and instead it would be better to
teach debuggers how to obtain the necessary information.

# 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


# 2c48331d 18-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

MFV 2.0-rc2

- Fixes divide by zero for unusual hz
- remove cryptodev dependency


# eac7052f 04-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-gfd20a8

- fixes jail delegation
- fixes raw kstat unsupported complaints
- exposes dbgmsg, dbuf, and checksum benchmark stats
- restore rename -u support


# ac0bf12e 28-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-ga00c61


# 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


# 15f0b8c3 25-Jan-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@9cd71c860 (master)

Notable upstream pull request merges:
#13805 Configure zed's diagnosis engine with vdev properties
#14110 zfs list: Allow more fields in ZFS_ITER_SIMPLE mode
#14121 Batch enqueue/dequeue for bqueue
#14123 arc_read()/arc_access() refactoring and cleanup
#14159 Bypass metaslab throttle for removal allocations
#14243 Implement uncached prefetch
#14251 Cache dbuf_hash() calculation
#14253 Allow reciever to override encryption property in case of replication
#14254 Restrict visibility of per-dataset kstats inside FreeBSD jails
#14255 Zero end of embedded block buffer in dump_write_embedded()
#14263 Cleanups identified by CodeQL and Coverity
#14264 Miscellaneous fixes
#14272 Change ZEVENT_POOL_GUID to ZEVENT_POOL to display pool names
#14287 FreeBSD: Remove stray debug printf
#14288 Colorize zfs diff output
#14289 deadlock between spa_errlog_lock and dp_config_rwlock
#14291 FreeBSD: Fix potential boot panic with bad label
#14292 Add tunable to allow changing micro ZAP's max size
#14293 Turn default_bs and default_ibs into ZFS_MODULE_PARAMs
#14295 zed: add hotplug support for spare vdevs
#14304 Activate filesystem features only in syncing context
#14311 zpool: do guid-based comparison in is_vdev_cb()
#14317 Pack zrlock_t by 8 bytes
#14320 Update arc_summary and arcstat outputs
#14328 FreeBSD: catch up to 1400077
#14376 Use setproctitle to report progress of zfs send
#14340 Remove some dead ARC code
#14358 Wait for txg sync if the last DRR_FREEOBJECTS might result in a hole
#14360 libzpool: fix ddi_strtoull to update nptr
#14364 Fix unprotected zfs_znode_dmu_fini
#14379 zfs_receive_one: Check for the more likely error first
#14380 Cleanup of dead code suggested by Clang Static Analyzer
#14397 Avoid passing an uninitialized index to dsl_prop_known_index
#14404 Fix reading uninitialized variable in receive_read
#14407 free_blocks(): Fix reports from 2016 PVS Studio FreeBSD report
#14418 Introduce minimal ZIL block commit delay
#14422 x86 assembly: fix .size placement and replace .align with .balign

Obtained from: OpenZFS
OpenZFS commit: 9cd71c8604d52def22ffaddc35755712f0fb9349


# 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


# c7046f76 21-Sep-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c629f0bf6

Notable upstream pull request merges:
#13725 Fix BLAKE3 tuneable and module loading on Linux and FreeBSD
#13756 FreeBSD: Organize sysctls
#13773 FreeBSD: add kqfilter support for zvol cdev
#13781 Importing from cachefile can trip assertion
#13794 Apply arc_shrink_shift to ARC above arc_c_min
#13798 Improve too large physical ashift handling
#13799 Revert "Avoid panic with recordsize > 128k, raw sending and
no large_blocks"
#13802 Add zfs.sync.snapshot_rename
#13831 zfs_enter rework
#13855 zfs recv hangs if max recordsize is less than received
recordsize

Obtained from: OpenZFS
OpenZFS commit: c629f0bf62e351355716f9870d6c2e377584b016


# 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


# 716fd348 18-May-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c0cf6ed67

Notable upstream pull request merges:
#10662 zvol_wait: Ignore locked zvols
#12789 Improve log spacemap load time
#12812 Improved zpool status output, list all affected datasets
#13277 FreeBSD: Use NDFREE_PNBUF if available
#13302 Make zfs_max_recordsize default to 16M
#13311 Fix error handling in FreeBSD's get/putpages VOPs
#13345 FreeBSD: Fix translation from ABD to physical pages
#13373 zfs: holds: dequadratify
#13375 Corrected edge case in uncompressed ARC->L2ARC handling
#13388 Improve mg_aliquot math
#13405 Reduce dbuf_find() lock contention
#13406 FreeBSD: use zero_region instead of allocating a dedicated page

Obtained from: OpenZFS
OpenZFS commit: c0cf6ed6792e545fd614c2a88cb53756db7e03f8


# 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


# c03c5b1c 08-Mar-2022 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#9078: log xattr=sa create/remove/update to ZIL
#11919: Cross-platform xattr user namespace compatibility
#13014: Report dnodes with faulty bonuslen
#13016: FreeBSD: Fix zvol_cdev_open locking
#13019: spl: Don't check FreeBSD rwlocks for double initialization
#13027: Fix clearing set-uid and set-gid bits on a file when
replying a write
#13031: Add enumerated vdev names to 'zpool iostat -v' and
'zpool list -v'
#13074: Enable encrypted raw sending to pools with greater ashift
#13076: Receive checks should allow unencrypted child datasets
#13098: Avoid dirtying the final TXGs when exporting a pool
#13172: Fix ENOSPC when unlinking multiple files from full pool

Obtained from: OpenZFS
OpenZFS commit: a86e089415679cf1b98eb424a159bb36aa2c19e3


# 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


# dae17134 17-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@269b5dadc (master) into main

Notable upstream pull request merges:
#12285 Introduce a tunable to exclude special class buffers from L2ARC
#12689 Check l2cache vdevs pending list inside the vdev_inuse()
#12735 Enable edonr in FreeBSD
#12743 FreeBSD: fix world build after de198f2
#12745 Restore dirty dnode detection logic

Obtained from: OpenZFS
OpenZFS commit: 269b5dadcfd1d5732cf763dddcd46009a332eae4


# 6ba2210e 21-Oct-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12392 Avoid panic in case of pool errors and missing L2ARC
#12448 skip snapshot in zfs_iter_mounted()
#12516 Fix NFS and large reads on older kernels
#12533 Fail invalid incremental recursive send gracefully
#12569 FreeBSD: Really zero the zero page
#12575 Reject zfs send -RI with nonexistent fromsnap
#12602 Correct refcount_add in dmu_zfetch
#12650 zpool should call zfs_nicestrtonum() with non-NULL handle

Obtained from: OpenZFS
OpenZFS commit: ec64fdb93d144ab1884097cfd36e18b62a2db848


# 53b70c86 15-Sep-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4a1195ca5 (master) into main

Notable upstream pull request merges:
#11312 Temporarily use root credentials to mount snapshots in .zfs
#12246 arc: Drop an incorrect assert
#12443 Fixed data integrity issue when underlying disk returns error
to zfs
#12522 Compressed receive with different ashift can result in incorrect
PSIZE on disk
#12535 Verify embedded blkptr's in arc_read()
#12541 Allow sending corrupt snapshots even if metadata is corrupted

Obtained from: OpenZFS
OpenZFS commit: 4a1195ca5041cbff2a6b025a31937fef84876c52


# 2faf504d 17-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@8ae86e2ed (master) into main

Notable upstream pull request merges:
#12422 Fix/improve dbuf hits accounting
#12406 Increase default volblocksize from 8KB to 16KB
#12398 Remove b_pabd/b_rabd allocation from arc_hdr_alloc()
#12397 Run arc_evict thread at higher priority
#12297 Avoid vq_lock drop in vdev_queue_aggregate()
#12161 Restore FreeBSD sysctl processing for arc.min and arc.max

Obtained from: OpenZFS
OpenZFS commit: 8ae86e2edc736483c1530fd689525aa2460eaec8


# 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


# 2617128a 30-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4694131a0 (master) into main

Notable upstream pull request merges:
#12253 module/zfs: simplify ddt_stat_add() loop
#12288 Avoid 64bit division in multilist index functions

Obtained from: OpenZFS
OpenZFS commit: 4694131a0a05b6db2727c9801f9729b9378d3064


# 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


# 0d8fe237 20-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12054 Avoid deadlock when removing L2ARC devices under I/O
#12172 Use wmsum for arc, abd, dbuf and zfetch statistics
#12221 vdev_draid_min_asize() ignores reserved space

Obtained from: OpenZFS
OpenZFS commit: c4c162c1e8ff9ce8833014711875d18df520096c


# 3ff01b23 12-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12149: Multiple man-pages: Move to appropriate section
#12158: Re-embed multilist_t storage
#12191: Convert non-libzpool libraries to -fvisibility=hidden
#12196: Unify manpage makefiles, move pages to better sexions, ...
#12210: libzutil: import filtering optimisation
#12212: Remove pool io kstats

Obtained from: OpenZFS
OpenZFS commit: afa7b3484556d3ae610a34582ce5ebd2c3e27bba


# 16038816 08-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@75b4cbf62 (master) into main

Notable upstream pull request merges:
#11710 Allow zfs to send replication streams with missing snapshots
#11751 Avoid taking global lock to destroy zfsdev state
#11786 Ratelimit deadman zevents as with delay zevents
#11803 ZFS traverse_visitbp optimization to limit prefetch
#11813 Allow pool names that look like Solaris disk names
#11822 Atomically check and set dropped zevent count
#11822 Don't scale zfs_zevent_len_max by CPU count
#11833 Refactor zfsdev state init/destroy to share common code
#11837 zfs get -p only outputs 3 columns if "clones" property is empty
#11843 libzutil: zfs_isnumber(): return false if input empty
#11849 Use dsl_scan_setup_check() to setup a scrub
#11861 Improvements to the 'compatibility' property
#11862 cmd/zfs receive: allow dry-run (-n) to check property args
#11864 receive: don't fail inheriting (-x) properties on wrong dataset type
#11877 Combine zio caches if possible
#11881 FreeBSD: use vnlru_free_vfsops if available
#11883 FreeBSD: add support for lockless symlink lookup
#11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr
#11896 Fix crash in zio_done error reporting
#11905 zfs-send(8): Restore sorting of flags
#11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir
#11930 vdev_mirror: don't scrub/resilver devices that can't be read
#11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines
#11955 zfs get: don't lookup mount options when using "-s local"
#11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl
#11959 vdev_id: variable not getting expanded under map_slot()
#11966 Scale worker threads and taskqs with number of CPUs
#11994 Clean up use of zfs_log_create in zfs_dir
#11997 FreeBSD: Don't force xattr mount option
#11997 FreeBSD: Implement xattr=sa
#11997 FreeBSD: Use SET_ERROR to trace xattr name errors
#11998 Simplify/fix dnode_move() for dn_zfetch
#12003 FreeBSD: Initialize/destroy zp->z_lock
#12010 Fix dRAID self-healing short columns
#12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots"
#12040 Reinstate the old zpool read label logic as a fallback
#12046 Improve scrub maxinflight_bytes math
#12049 FreeBSD: avoid memory allocation in arc_prune_async
#12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI
#12061 Fix dRAID sequential resilver silent damage handling
#12072 Let zfs diff be more permissive
#12077 FreeBSD: Retry OCF ENOMEM errors.
#12088 Propagate vdev state due to invalid label corruption
#12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat
#12097 FreeBSD: Update dataset_kstats for zvols in dev mode
#12104 FreeBSD boot code reminder after zpool upgrade
#12114 Introduce write-mostly sums

Obtained from: OpenZFS
OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3


# 6db169e9 13-Apr-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@3522f57b6 (master)

Notable upstream pull request merges:
#11742 When specifying raidz vdev name, parity count should match
#11744 Use a helper function to clarify gang block size
#11771 Support running FreeBSD buildworld on Arm-based macOS hosts

This is the last update that will be MFCed into stable/13.

From now on, the tracking of OpenZFS branches will be different:
- main continues tracking openzfs/zfs/master
- stable/13 is going to track openzfs/zfs/zfs-2.1-release

Obtained from: OpenZFS
MFC after: 1 week


# ba27dd8b 21-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9312e0fd1

Notable upstream changes:
778869fa1 Fix reporting of mount progress
e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD
03e02e5b5 Fix checksum errors not being counted on repeated repair
64e0fe14f Restore FreeBSD resource usage accounting
11f2e9a49 Fix panic if scrubbing after removing a slog device

MFC after: 2 weeks


# 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


# 5dce0384 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: Avoid updating the L2ARC device header unnecessarily

From openzfs-master 0ae184a6b commit message:
If we do not write any buffers to the cache device and the evict hand
has not advanced do not update the cache device header.

Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58
Patch Author: George Amanakis <gamanakis@gmail.com>

MFC after: 3 days
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D28682

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

OpenZFS: Fix issues caused by reversed commits + rebase

# 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
...

# 5596f836 14-Nov-2020 Mateusz Guzik <mjg@FreeBSD.org>

zfs: disable periodic arc updates

They are only there to provide less innacurate statistics for debuggers.
However, this is quite heavy-weight and instead it would be better to
teach debuggers how to obtain the necessary information.

# 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


# 2c48331d 18-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

MFV 2.0-rc2

- Fixes divide by zero for unusual hz
- remove cryptodev dependency


# eac7052f 04-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-gfd20a8

- fixes jail delegation
- fixes raw kstat unsupported complaints
- exposes dbgmsg, dbuf, and checksum benchmark stats
- restore rename -u support


# ac0bf12e 28-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-ga00c61


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

Initial import from vendor-sys branch of openzfs


# 15f0b8c3 25-Jan-2023 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@9cd71c860 (master)

Notable upstream pull request merges:
#13805 Configure zed's diagnosis engine with vdev properties
#14110 zfs list: Allow more fields in ZFS_ITER_SIMPLE mode
#14121 Batch enqueue/dequeue for bqueue
#14123 arc_read()/arc_access() refactoring and cleanup
#14159 Bypass metaslab throttle for removal allocations
#14243 Implement uncached prefetch
#14251 Cache dbuf_hash() calculation
#14253 Allow reciever to override encryption property in case of replication
#14254 Restrict visibility of per-dataset kstats inside FreeBSD jails
#14255 Zero end of embedded block buffer in dump_write_embedded()
#14263 Cleanups identified by CodeQL and Coverity
#14264 Miscellaneous fixes
#14272 Change ZEVENT_POOL_GUID to ZEVENT_POOL to display pool names
#14287 FreeBSD: Remove stray debug printf
#14288 Colorize zfs diff output
#14289 deadlock between spa_errlog_lock and dp_config_rwlock
#14291 FreeBSD: Fix potential boot panic with bad label
#14292 Add tunable to allow changing micro ZAP's max size
#14293 Turn default_bs and default_ibs into ZFS_MODULE_PARAMs
#14295 zed: add hotplug support for spare vdevs
#14304 Activate filesystem features only in syncing context
#14311 zpool: do guid-based comparison in is_vdev_cb()
#14317 Pack zrlock_t by 8 bytes
#14320 Update arc_summary and arcstat outputs
#14328 FreeBSD: catch up to 1400077
#14376 Use setproctitle to report progress of zfs send
#14340 Remove some dead ARC code
#14358 Wait for txg sync if the last DRR_FREEOBJECTS might result in a hole
#14360 libzpool: fix ddi_strtoull to update nptr
#14364 Fix unprotected zfs_znode_dmu_fini
#14379 zfs_receive_one: Check for the more likely error first
#14380 Cleanup of dead code suggested by Clang Static Analyzer
#14397 Avoid passing an uninitialized index to dsl_prop_known_index
#14404 Fix reading uninitialized variable in receive_read
#14407 free_blocks(): Fix reports from 2016 PVS Studio FreeBSD report
#14418 Introduce minimal ZIL block commit delay
#14422 x86 assembly: fix .size placement and replace .align with .balign

Obtained from: OpenZFS
OpenZFS commit: 9cd71c8604d52def22ffaddc35755712f0fb9349


# 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


# c7046f76 21-Sep-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c629f0bf6

Notable upstream pull request merges:
#13725 Fix BLAKE3 tuneable and module loading on Linux and FreeBSD
#13756 FreeBSD: Organize sysctls
#13773 FreeBSD: add kqfilter support for zvol cdev
#13781 Importing from cachefile can trip assertion
#13794 Apply arc_shrink_shift to ARC above arc_c_min
#13798 Improve too large physical ashift handling
#13799 Revert "Avoid panic with recordsize > 128k, raw sending and
no large_blocks"
#13802 Add zfs.sync.snapshot_rename
#13831 zfs_enter rework
#13855 zfs recv hangs if max recordsize is less than received
recordsize

Obtained from: OpenZFS
OpenZFS commit: c629f0bf62e351355716f9870d6c2e377584b016


# 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


# 716fd348 18-May-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c0cf6ed67

Notable upstream pull request merges:
#10662 zvol_wait: Ignore locked zvols
#12789 Improve log spacemap load time
#12812 Improved zpool status output, list all affected datasets
#13277 FreeBSD: Use NDFREE_PNBUF if available
#13302 Make zfs_max_recordsize default to 16M
#13311 Fix error handling in FreeBSD's get/putpages VOPs
#13345 FreeBSD: Fix translation from ABD to physical pages
#13373 zfs: holds: dequadratify
#13375 Corrected edge case in uncompressed ARC->L2ARC handling
#13388 Improve mg_aliquot math
#13405 Reduce dbuf_find() lock contention
#13406 FreeBSD: use zero_region instead of allocating a dedicated page

Obtained from: OpenZFS
OpenZFS commit: c0cf6ed6792e545fd614c2a88cb53756db7e03f8


# 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


# c03c5b1c 08-Mar-2022 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#9078: log xattr=sa create/remove/update to ZIL
#11919: Cross-platform xattr user namespace compatibility
#13014: Report dnodes with faulty bonuslen
#13016: FreeBSD: Fix zvol_cdev_open locking
#13019: spl: Don't check FreeBSD rwlocks for double initialization
#13027: Fix clearing set-uid and set-gid bits on a file when
replying a write
#13031: Add enumerated vdev names to 'zpool iostat -v' and
'zpool list -v'
#13074: Enable encrypted raw sending to pools with greater ashift
#13076: Receive checks should allow unencrypted child datasets
#13098: Avoid dirtying the final TXGs when exporting a pool
#13172: Fix ENOSPC when unlinking multiple files from full pool

Obtained from: OpenZFS
OpenZFS commit: a86e089415679cf1b98eb424a159bb36aa2c19e3


# 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


# dae17134 17-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@269b5dadc (master) into main

Notable upstream pull request merges:
#12285 Introduce a tunable to exclude special class buffers from L2ARC
#12689 Check l2cache vdevs pending list inside the vdev_inuse()
#12735 Enable edonr in FreeBSD
#12743 FreeBSD: fix world build after de198f2
#12745 Restore dirty dnode detection logic

Obtained from: OpenZFS
OpenZFS commit: 269b5dadcfd1d5732cf763dddcd46009a332eae4


# 6ba2210e 21-Oct-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12392 Avoid panic in case of pool errors and missing L2ARC
#12448 skip snapshot in zfs_iter_mounted()
#12516 Fix NFS and large reads on older kernels
#12533 Fail invalid incremental recursive send gracefully
#12569 FreeBSD: Really zero the zero page
#12575 Reject zfs send -RI with nonexistent fromsnap
#12602 Correct refcount_add in dmu_zfetch
#12650 zpool should call zfs_nicestrtonum() with non-NULL handle

Obtained from: OpenZFS
OpenZFS commit: ec64fdb93d144ab1884097cfd36e18b62a2db848


# 53b70c86 15-Sep-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4a1195ca5 (master) into main

Notable upstream pull request merges:
#11312 Temporarily use root credentials to mount snapshots in .zfs
#12246 arc: Drop an incorrect assert
#12443 Fixed data integrity issue when underlying disk returns error
to zfs
#12522 Compressed receive with different ashift can result in incorrect
PSIZE on disk
#12535 Verify embedded blkptr's in arc_read()
#12541 Allow sending corrupt snapshots even if metadata is corrupted

Obtained from: OpenZFS
OpenZFS commit: 4a1195ca5041cbff2a6b025a31937fef84876c52


# 2faf504d 17-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@8ae86e2ed (master) into main

Notable upstream pull request merges:
#12422 Fix/improve dbuf hits accounting
#12406 Increase default volblocksize from 8KB to 16KB
#12398 Remove b_pabd/b_rabd allocation from arc_hdr_alloc()
#12397 Run arc_evict thread at higher priority
#12297 Avoid vq_lock drop in vdev_queue_aggregate()
#12161 Restore FreeBSD sysctl processing for arc.min and arc.max

Obtained from: OpenZFS
OpenZFS commit: 8ae86e2edc736483c1530fd689525aa2460eaec8


# 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


# 2617128a 30-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4694131a0 (master) into main

Notable upstream pull request merges:
#12253 module/zfs: simplify ddt_stat_add() loop
#12288 Avoid 64bit division in multilist index functions

Obtained from: OpenZFS
OpenZFS commit: 4694131a0a05b6db2727c9801f9729b9378d3064


# 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


# 0d8fe237 20-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12054 Avoid deadlock when removing L2ARC devices under I/O
#12172 Use wmsum for arc, abd, dbuf and zfetch statistics
#12221 vdev_draid_min_asize() ignores reserved space

Obtained from: OpenZFS
OpenZFS commit: c4c162c1e8ff9ce8833014711875d18df520096c


# 3ff01b23 12-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12149: Multiple man-pages: Move to appropriate section
#12158: Re-embed multilist_t storage
#12191: Convert non-libzpool libraries to -fvisibility=hidden
#12196: Unify manpage makefiles, move pages to better sexions, ...
#12210: libzutil: import filtering optimisation
#12212: Remove pool io kstats

Obtained from: OpenZFS
OpenZFS commit: afa7b3484556d3ae610a34582ce5ebd2c3e27bba


# 16038816 08-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@75b4cbf62 (master) into main

Notable upstream pull request merges:
#11710 Allow zfs to send replication streams with missing snapshots
#11751 Avoid taking global lock to destroy zfsdev state
#11786 Ratelimit deadman zevents as with delay zevents
#11803 ZFS traverse_visitbp optimization to limit prefetch
#11813 Allow pool names that look like Solaris disk names
#11822 Atomically check and set dropped zevent count
#11822 Don't scale zfs_zevent_len_max by CPU count
#11833 Refactor zfsdev state init/destroy to share common code
#11837 zfs get -p only outputs 3 columns if "clones" property is empty
#11843 libzutil: zfs_isnumber(): return false if input empty
#11849 Use dsl_scan_setup_check() to setup a scrub
#11861 Improvements to the 'compatibility' property
#11862 cmd/zfs receive: allow dry-run (-n) to check property args
#11864 receive: don't fail inheriting (-x) properties on wrong dataset type
#11877 Combine zio caches if possible
#11881 FreeBSD: use vnlru_free_vfsops if available
#11883 FreeBSD: add support for lockless symlink lookup
#11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr
#11896 Fix crash in zio_done error reporting
#11905 zfs-send(8): Restore sorting of flags
#11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir
#11930 vdev_mirror: don't scrub/resilver devices that can't be read
#11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines
#11955 zfs get: don't lookup mount options when using "-s local"
#11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl
#11959 vdev_id: variable not getting expanded under map_slot()
#11966 Scale worker threads and taskqs with number of CPUs
#11994 Clean up use of zfs_log_create in zfs_dir
#11997 FreeBSD: Don't force xattr mount option
#11997 FreeBSD: Implement xattr=sa
#11997 FreeBSD: Use SET_ERROR to trace xattr name errors
#11998 Simplify/fix dnode_move() for dn_zfetch
#12003 FreeBSD: Initialize/destroy zp->z_lock
#12010 Fix dRAID self-healing short columns
#12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots"
#12040 Reinstate the old zpool read label logic as a fallback
#12046 Improve scrub maxinflight_bytes math
#12049 FreeBSD: avoid memory allocation in arc_prune_async
#12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI
#12061 Fix dRAID sequential resilver silent damage handling
#12072 Let zfs diff be more permissive
#12077 FreeBSD: Retry OCF ENOMEM errors.
#12088 Propagate vdev state due to invalid label corruption
#12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat
#12097 FreeBSD: Update dataset_kstats for zvols in dev mode
#12104 FreeBSD boot code reminder after zpool upgrade
#12114 Introduce write-mostly sums

Obtained from: OpenZFS
OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3


# 6db169e9 13-Apr-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@3522f57b6 (master)

Notable upstream pull request merges:
#11742 When specifying raidz vdev name, parity count should match
#11744 Use a helper function to clarify gang block size
#11771 Support running FreeBSD buildworld on Arm-based macOS hosts

This is the last update that will be MFCed into stable/13.

From now on, the tracking of OpenZFS branches will be different:
- main continues tracking openzfs/zfs/master
- stable/13 is going to track openzfs/zfs/zfs-2.1-release

Obtained from: OpenZFS
MFC after: 1 week


# ba27dd8b 21-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9312e0fd1

Notable upstream changes:
778869fa1 Fix reporting of mount progress
e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD
03e02e5b5 Fix checksum errors not being counted on repeated repair
64e0fe14f Restore FreeBSD resource usage accounting
11f2e9a49 Fix panic if scrubbing after removing a slog device

MFC after: 2 weeks


# 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


# 5dce0384 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: Avoid updating the L2ARC device header unnecessarily

From openzfs-master 0ae184a6b commit message:
If we do not write any buffers to the cache device and the evict hand
has not advanced do not update the cache device header.

Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58
Patch Author: George Amanakis <gamanakis@gmail.com>

MFC after: 3 days
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D28682

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

OpenZFS: Fix issues caused by reversed commits + rebase

# 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
...

# 5596f836 14-Nov-2020 Mateusz Guzik <mjg@FreeBSD.org>

zfs: disable periodic arc updates

They are only there to provide less innacurate statistics for debuggers.
However, this is quite heavy-weight and instead it would be better to
teach debuggers how to obtain the necessary information.

# 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


# 2c48331d 18-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

MFV 2.0-rc2

- Fixes divide by zero for unusual hz
- remove cryptodev dependency


# eac7052f 04-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-gfd20a8

- fixes jail delegation
- fixes raw kstat unsupported complaints
- exposes dbgmsg, dbuf, and checksum benchmark stats
- restore rename -u support


# ac0bf12e 28-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-ga00c61


# 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


# c7046f76 21-Sep-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c629f0bf6

Notable upstream pull request merges:
#13725 Fix BLAKE3 tuneable and module loading on Linux and FreeBSD
#13756 FreeBSD: Organize sysctls
#13773 FreeBSD: add kqfilter support for zvol cdev
#13781 Importing from cachefile can trip assertion
#13794 Apply arc_shrink_shift to ARC above arc_c_min
#13798 Improve too large physical ashift handling
#13799 Revert "Avoid panic with recordsize > 128k, raw sending and
no large_blocks"
#13802 Add zfs.sync.snapshot_rename
#13831 zfs_enter rework
#13855 zfs recv hangs if max recordsize is less than received
recordsize

Obtained from: OpenZFS
OpenZFS commit: c629f0bf62e351355716f9870d6c2e377584b016


# 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


# 716fd348 18-May-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c0cf6ed67

Notable upstream pull request merges:
#10662 zvol_wait: Ignore locked zvols
#12789 Improve log spacemap load time
#12812 Improved zpool status output, list all affected datasets
#13277 FreeBSD: Use NDFREE_PNBUF if available
#13302 Make zfs_max_recordsize default to 16M
#13311 Fix error handling in FreeBSD's get/putpages VOPs
#13345 FreeBSD: Fix translation from ABD to physical pages
#13373 zfs: holds: dequadratify
#13375 Corrected edge case in uncompressed ARC->L2ARC handling
#13388 Improve mg_aliquot math
#13405 Reduce dbuf_find() lock contention
#13406 FreeBSD: use zero_region instead of allocating a dedicated page

Obtained from: OpenZFS
OpenZFS commit: c0cf6ed6792e545fd614c2a88cb53756db7e03f8


# 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


# c03c5b1c 08-Mar-2022 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#9078: log xattr=sa create/remove/update to ZIL
#11919: Cross-platform xattr user namespace compatibility
#13014: Report dnodes with faulty bonuslen
#13016: FreeBSD: Fix zvol_cdev_open locking
#13019: spl: Don't check FreeBSD rwlocks for double initialization
#13027: Fix clearing set-uid and set-gid bits on a file when
replying a write
#13031: Add enumerated vdev names to 'zpool iostat -v' and
'zpool list -v'
#13074: Enable encrypted raw sending to pools with greater ashift
#13076: Receive checks should allow unencrypted child datasets
#13098: Avoid dirtying the final TXGs when exporting a pool
#13172: Fix ENOSPC when unlinking multiple files from full pool

Obtained from: OpenZFS
OpenZFS commit: a86e089415679cf1b98eb424a159bb36aa2c19e3


# 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


# dae17134 17-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@269b5dadc (master) into main

Notable upstream pull request merges:
#12285 Introduce a tunable to exclude special class buffers from L2ARC
#12689 Check l2cache vdevs pending list inside the vdev_inuse()
#12735 Enable edonr in FreeBSD
#12743 FreeBSD: fix world build after de198f2
#12745 Restore dirty dnode detection logic

Obtained from: OpenZFS
OpenZFS commit: 269b5dadcfd1d5732cf763dddcd46009a332eae4


# 6ba2210e 21-Oct-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12392 Avoid panic in case of pool errors and missing L2ARC
#12448 skip snapshot in zfs_iter_mounted()
#12516 Fix NFS and large reads on older kernels
#12533 Fail invalid incremental recursive send gracefully
#12569 FreeBSD: Really zero the zero page
#12575 Reject zfs send -RI with nonexistent fromsnap
#12602 Correct refcount_add in dmu_zfetch
#12650 zpool should call zfs_nicestrtonum() with non-NULL handle

Obtained from: OpenZFS
OpenZFS commit: ec64fdb93d144ab1884097cfd36e18b62a2db848


# 53b70c86 15-Sep-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4a1195ca5 (master) into main

Notable upstream pull request merges:
#11312 Temporarily use root credentials to mount snapshots in .zfs
#12246 arc: Drop an incorrect assert
#12443 Fixed data integrity issue when underlying disk returns error
to zfs
#12522 Compressed receive with different ashift can result in incorrect
PSIZE on disk
#12535 Verify embedded blkptr's in arc_read()
#12541 Allow sending corrupt snapshots even if metadata is corrupted

Obtained from: OpenZFS
OpenZFS commit: 4a1195ca5041cbff2a6b025a31937fef84876c52


# 2faf504d 17-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@8ae86e2ed (master) into main

Notable upstream pull request merges:
#12422 Fix/improve dbuf hits accounting
#12406 Increase default volblocksize from 8KB to 16KB
#12398 Remove b_pabd/b_rabd allocation from arc_hdr_alloc()
#12397 Run arc_evict thread at higher priority
#12297 Avoid vq_lock drop in vdev_queue_aggregate()
#12161 Restore FreeBSD sysctl processing for arc.min and arc.max

Obtained from: OpenZFS
OpenZFS commit: 8ae86e2edc736483c1530fd689525aa2460eaec8


# 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


# 2617128a 30-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4694131a0 (master) into main

Notable upstream pull request merges:
#12253 module/zfs: simplify ddt_stat_add() loop
#12288 Avoid 64bit division in multilist index functions

Obtained from: OpenZFS
OpenZFS commit: 4694131a0a05b6db2727c9801f9729b9378d3064


# 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


# 0d8fe237 20-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12054 Avoid deadlock when removing L2ARC devices under I/O
#12172 Use wmsum for arc, abd, dbuf and zfetch statistics
#12221 vdev_draid_min_asize() ignores reserved space

Obtained from: OpenZFS
OpenZFS commit: c4c162c1e8ff9ce8833014711875d18df520096c


# 3ff01b23 12-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12149: Multiple man-pages: Move to appropriate section
#12158: Re-embed multilist_t storage
#12191: Convert non-libzpool libraries to -fvisibility=hidden
#12196: Unify manpage makefiles, move pages to better sexions, ...
#12210: libzutil: import filtering optimisation
#12212: Remove pool io kstats

Obtained from: OpenZFS
OpenZFS commit: afa7b3484556d3ae610a34582ce5ebd2c3e27bba


# 16038816 08-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@75b4cbf62 (master) into main

Notable upstream pull request merges:
#11710 Allow zfs to send replication streams with missing snapshots
#11751 Avoid taking global lock to destroy zfsdev state
#11786 Ratelimit deadman zevents as with delay zevents
#11803 ZFS traverse_visitbp optimization to limit prefetch
#11813 Allow pool names that look like Solaris disk names
#11822 Atomically check and set dropped zevent count
#11822 Don't scale zfs_zevent_len_max by CPU count
#11833 Refactor zfsdev state init/destroy to share common code
#11837 zfs get -p only outputs 3 columns if "clones" property is empty
#11843 libzutil: zfs_isnumber(): return false if input empty
#11849 Use dsl_scan_setup_check() to setup a scrub
#11861 Improvements to the 'compatibility' property
#11862 cmd/zfs receive: allow dry-run (-n) to check property args
#11864 receive: don't fail inheriting (-x) properties on wrong dataset type
#11877 Combine zio caches if possible
#11881 FreeBSD: use vnlru_free_vfsops if available
#11883 FreeBSD: add support for lockless symlink lookup
#11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr
#11896 Fix crash in zio_done error reporting
#11905 zfs-send(8): Restore sorting of flags
#11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir
#11930 vdev_mirror: don't scrub/resilver devices that can't be read
#11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines
#11955 zfs get: don't lookup mount options when using "-s local"
#11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl
#11959 vdev_id: variable not getting expanded under map_slot()
#11966 Scale worker threads and taskqs with number of CPUs
#11994 Clean up use of zfs_log_create in zfs_dir
#11997 FreeBSD: Don't force xattr mount option
#11997 FreeBSD: Implement xattr=sa
#11997 FreeBSD: Use SET_ERROR to trace xattr name errors
#11998 Simplify/fix dnode_move() for dn_zfetch
#12003 FreeBSD: Initialize/destroy zp->z_lock
#12010 Fix dRAID self-healing short columns
#12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots"
#12040 Reinstate the old zpool read label logic as a fallback
#12046 Improve scrub maxinflight_bytes math
#12049 FreeBSD: avoid memory allocation in arc_prune_async
#12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI
#12061 Fix dRAID sequential resilver silent damage handling
#12072 Let zfs diff be more permissive
#12077 FreeBSD: Retry OCF ENOMEM errors.
#12088 Propagate vdev state due to invalid label corruption
#12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat
#12097 FreeBSD: Update dataset_kstats for zvols in dev mode
#12104 FreeBSD boot code reminder after zpool upgrade
#12114 Introduce write-mostly sums

Obtained from: OpenZFS
OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3


# 6db169e9 13-Apr-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@3522f57b6 (master)

Notable upstream pull request merges:
#11742 When specifying raidz vdev name, parity count should match
#11744 Use a helper function to clarify gang block size
#11771 Support running FreeBSD buildworld on Arm-based macOS hosts

This is the last update that will be MFCed into stable/13.

From now on, the tracking of OpenZFS branches will be different:
- main continues tracking openzfs/zfs/master
- stable/13 is going to track openzfs/zfs/zfs-2.1-release

Obtained from: OpenZFS
MFC after: 1 week


# ba27dd8b 21-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9312e0fd1

Notable upstream changes:
778869fa1 Fix reporting of mount progress
e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD
03e02e5b5 Fix checksum errors not being counted on repeated repair
64e0fe14f Restore FreeBSD resource usage accounting
11f2e9a49 Fix panic if scrubbing after removing a slog device

MFC after: 2 weeks


# 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


# 5dce0384 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: Avoid updating the L2ARC device header unnecessarily

From openzfs-master 0ae184a6b commit message:
If we do not write any buffers to the cache device and the evict hand
has not advanced do not update the cache device header.

Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58
Patch Author: George Amanakis <gamanakis@gmail.com>

MFC after: 3 days
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D28682

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

OpenZFS: Fix issues caused by reversed commits + rebase

# 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
...

# 5596f836 14-Nov-2020 Mateusz Guzik <mjg@FreeBSD.org>

zfs: disable periodic arc updates

They are only there to provide less innacurate statistics for debuggers.
However, this is quite heavy-weight and instead it would be better to
teach debuggers how to obtain the necessary information.

# 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


# 2c48331d 18-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

MFV 2.0-rc2

- Fixes divide by zero for unusual hz
- remove cryptodev dependency


# eac7052f 04-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-gfd20a8

- fixes jail delegation
- fixes raw kstat unsupported complaints
- exposes dbgmsg, dbuf, and checksum benchmark stats
- restore rename -u support


# ac0bf12e 28-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-ga00c61


# 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


# c7046f76 21-Sep-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c629f0bf6

Notable upstream pull request merges:
#13725 Fix BLAKE3 tuneable and module loading on Linux and FreeBSD
#13756 FreeBSD: Organize sysctls
#13773 FreeBSD: add kqfilter support for zvol cdev
#13781 Importing from cachefile can trip assertion
#13794 Apply arc_shrink_shift to ARC above arc_c_min
#13798 Improve too large physical ashift handling
#13799 Revert "Avoid panic with recordsize > 128k, raw sending and
no large_blocks"
#13802 Add zfs.sync.snapshot_rename
#13831 zfs_enter rework
#13855 zfs recv hangs if max recordsize is less than received
recordsize

Obtained from: OpenZFS
OpenZFS commit: c629f0bf62e351355716f9870d6c2e377584b016


# 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


# 716fd348 18-May-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c0cf6ed67

Notable upstream pull request merges:
#10662 zvol_wait: Ignore locked zvols
#12789 Improve log spacemap load time
#12812 Improved zpool status output, list all affected datasets
#13277 FreeBSD: Use NDFREE_PNBUF if available
#13302 Make zfs_max_recordsize default to 16M
#13311 Fix error handling in FreeBSD's get/putpages VOPs
#13345 FreeBSD: Fix translation from ABD to physical pages
#13373 zfs: holds: dequadratify
#13375 Corrected edge case in uncompressed ARC->L2ARC handling
#13388 Improve mg_aliquot math
#13405 Reduce dbuf_find() lock contention
#13406 FreeBSD: use zero_region instead of allocating a dedicated page

Obtained from: OpenZFS
OpenZFS commit: c0cf6ed6792e545fd614c2a88cb53756db7e03f8


# 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


# c03c5b1c 08-Mar-2022 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#9078: log xattr=sa create/remove/update to ZIL
#11919: Cross-platform xattr user namespace compatibility
#13014: Report dnodes with faulty bonuslen
#13016: FreeBSD: Fix zvol_cdev_open locking
#13019: spl: Don't check FreeBSD rwlocks for double initialization
#13027: Fix clearing set-uid and set-gid bits on a file when
replying a write
#13031: Add enumerated vdev names to 'zpool iostat -v' and
'zpool list -v'
#13074: Enable encrypted raw sending to pools with greater ashift
#13076: Receive checks should allow unencrypted child datasets
#13098: Avoid dirtying the final TXGs when exporting a pool
#13172: Fix ENOSPC when unlinking multiple files from full pool

Obtained from: OpenZFS
OpenZFS commit: a86e089415679cf1b98eb424a159bb36aa2c19e3


# 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


# dae17134 17-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@269b5dadc (master) into main

Notable upstream pull request merges:
#12285 Introduce a tunable to exclude special class buffers from L2ARC
#12689 Check l2cache vdevs pending list inside the vdev_inuse()
#12735 Enable edonr in FreeBSD
#12743 FreeBSD: fix world build after de198f2
#12745 Restore dirty dnode detection logic

Obtained from: OpenZFS
OpenZFS commit: 269b5dadcfd1d5732cf763dddcd46009a332eae4


# 6ba2210e 21-Oct-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12392 Avoid panic in case of pool errors and missing L2ARC
#12448 skip snapshot in zfs_iter_mounted()
#12516 Fix NFS and large reads on older kernels
#12533 Fail invalid incremental recursive send gracefully
#12569 FreeBSD: Really zero the zero page
#12575 Reject zfs send -RI with nonexistent fromsnap
#12602 Correct refcount_add in dmu_zfetch
#12650 zpool should call zfs_nicestrtonum() with non-NULL handle

Obtained from: OpenZFS
OpenZFS commit: ec64fdb93d144ab1884097cfd36e18b62a2db848


# 53b70c86 15-Sep-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4a1195ca5 (master) into main

Notable upstream pull request merges:
#11312 Temporarily use root credentials to mount snapshots in .zfs
#12246 arc: Drop an incorrect assert
#12443 Fixed data integrity issue when underlying disk returns error
to zfs
#12522 Compressed receive with different ashift can result in incorrect
PSIZE on disk
#12535 Verify embedded blkptr's in arc_read()
#12541 Allow sending corrupt snapshots even if metadata is corrupted

Obtained from: OpenZFS
OpenZFS commit: 4a1195ca5041cbff2a6b025a31937fef84876c52


# 2faf504d 17-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@8ae86e2ed (master) into main

Notable upstream pull request merges:
#12422 Fix/improve dbuf hits accounting
#12406 Increase default volblocksize from 8KB to 16KB
#12398 Remove b_pabd/b_rabd allocation from arc_hdr_alloc()
#12397 Run arc_evict thread at higher priority
#12297 Avoid vq_lock drop in vdev_queue_aggregate()
#12161 Restore FreeBSD sysctl processing for arc.min and arc.max

Obtained from: OpenZFS
OpenZFS commit: 8ae86e2edc736483c1530fd689525aa2460eaec8


# 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


# 2617128a 30-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4694131a0 (master) into main

Notable upstream pull request merges:
#12253 module/zfs: simplify ddt_stat_add() loop
#12288 Avoid 64bit division in multilist index functions

Obtained from: OpenZFS
OpenZFS commit: 4694131a0a05b6db2727c9801f9729b9378d3064


# 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


# 0d8fe237 20-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12054 Avoid deadlock when removing L2ARC devices under I/O
#12172 Use wmsum for arc, abd, dbuf and zfetch statistics
#12221 vdev_draid_min_asize() ignores reserved space

Obtained from: OpenZFS
OpenZFS commit: c4c162c1e8ff9ce8833014711875d18df520096c


# 3ff01b23 12-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12149: Multiple man-pages: Move to appropriate section
#12158: Re-embed multilist_t storage
#12191: Convert non-libzpool libraries to -fvisibility=hidden
#12196: Unify manpage makefiles, move pages to better sexions, ...
#12210: libzutil: import filtering optimisation
#12212: Remove pool io kstats

Obtained from: OpenZFS
OpenZFS commit: afa7b3484556d3ae610a34582ce5ebd2c3e27bba


# 16038816 08-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@75b4cbf62 (master) into main

Notable upstream pull request merges:
#11710 Allow zfs to send replication streams with missing snapshots
#11751 Avoid taking global lock to destroy zfsdev state
#11786 Ratelimit deadman zevents as with delay zevents
#11803 ZFS traverse_visitbp optimization to limit prefetch
#11813 Allow pool names that look like Solaris disk names
#11822 Atomically check and set dropped zevent count
#11822 Don't scale zfs_zevent_len_max by CPU count
#11833 Refactor zfsdev state init/destroy to share common code
#11837 zfs get -p only outputs 3 columns if "clones" property is empty
#11843 libzutil: zfs_isnumber(): return false if input empty
#11849 Use dsl_scan_setup_check() to setup a scrub
#11861 Improvements to the 'compatibility' property
#11862 cmd/zfs receive: allow dry-run (-n) to check property args
#11864 receive: don't fail inheriting (-x) properties on wrong dataset type
#11877 Combine zio caches if possible
#11881 FreeBSD: use vnlru_free_vfsops if available
#11883 FreeBSD: add support for lockless symlink lookup
#11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr
#11896 Fix crash in zio_done error reporting
#11905 zfs-send(8): Restore sorting of flags
#11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir
#11930 vdev_mirror: don't scrub/resilver devices that can't be read
#11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines
#11955 zfs get: don't lookup mount options when using "-s local"
#11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl
#11959 vdev_id: variable not getting expanded under map_slot()
#11966 Scale worker threads and taskqs with number of CPUs
#11994 Clean up use of zfs_log_create in zfs_dir
#11997 FreeBSD: Don't force xattr mount option
#11997 FreeBSD: Implement xattr=sa
#11997 FreeBSD: Use SET_ERROR to trace xattr name errors
#11998 Simplify/fix dnode_move() for dn_zfetch
#12003 FreeBSD: Initialize/destroy zp->z_lock
#12010 Fix dRAID self-healing short columns
#12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots"
#12040 Reinstate the old zpool read label logic as a fallback
#12046 Improve scrub maxinflight_bytes math
#12049 FreeBSD: avoid memory allocation in arc_prune_async
#12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI
#12061 Fix dRAID sequential resilver silent damage handling
#12072 Let zfs diff be more permissive
#12077 FreeBSD: Retry OCF ENOMEM errors.
#12088 Propagate vdev state due to invalid label corruption
#12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat
#12097 FreeBSD: Update dataset_kstats for zvols in dev mode
#12104 FreeBSD boot code reminder after zpool upgrade
#12114 Introduce write-mostly sums

Obtained from: OpenZFS
OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3


# 6db169e9 13-Apr-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@3522f57b6 (master)

Notable upstream pull request merges:
#11742 When specifying raidz vdev name, parity count should match
#11744 Use a helper function to clarify gang block size
#11771 Support running FreeBSD buildworld on Arm-based macOS hosts

This is the last update that will be MFCed into stable/13.

From now on, the tracking of OpenZFS branches will be different:
- main continues tracking openzfs/zfs/master
- stable/13 is going to track openzfs/zfs/zfs-2.1-release

Obtained from: OpenZFS
MFC after: 1 week


# ba27dd8b 21-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9312e0fd1

Notable upstream changes:
778869fa1 Fix reporting of mount progress
e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD
03e02e5b5 Fix checksum errors not being counted on repeated repair
64e0fe14f Restore FreeBSD resource usage accounting
11f2e9a49 Fix panic if scrubbing after removing a slog device

MFC after: 2 weeks


# 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


# 5dce0384 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: Avoid updating the L2ARC device header unnecessarily

From openzfs-master 0ae184a6b commit message:
If we do not write any buffers to the cache device and the evict hand
has not advanced do not update the cache device header.

Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58
Patch Author: George Amanakis <gamanakis@gmail.com>

MFC after: 3 days
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D28682

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

OpenZFS: Fix issues caused by reversed commits + rebase

# 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
...

# 5596f836 14-Nov-2020 Mateusz Guzik <mjg@FreeBSD.org>

zfs: disable periodic arc updates

They are only there to provide less innacurate statistics for debuggers.
However, this is quite heavy-weight and instead it would be better to
teach debuggers how to obtain the necessary information.

# 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


# 2c48331d 18-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

MFV 2.0-rc2

- Fixes divide by zero for unusual hz
- remove cryptodev dependency


# eac7052f 04-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-gfd20a8

- fixes jail delegation
- fixes raw kstat unsupported complaints
- exposes dbgmsg, dbuf, and checksum benchmark stats
- restore rename -u support


# ac0bf12e 28-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-ga00c61


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

Initial import from vendor-sys branch of openzfs


# c7046f76 21-Sep-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c629f0bf6

Notable upstream pull request merges:
#13725 Fix BLAKE3 tuneable and module loading on Linux and FreeBSD
#13756 FreeBSD: Organize sysctls
#13773 FreeBSD: add kqfilter support for zvol cdev
#13781 Importing from cachefile can trip assertion
#13794 Apply arc_shrink_shift to ARC above arc_c_min
#13798 Improve too large physical ashift handling
#13799 Revert "Avoid panic with recordsize > 128k, raw sending and
no large_blocks"
#13802 Add zfs.sync.snapshot_rename
#13831 zfs_enter rework
#13855 zfs recv hangs if max recordsize is less than received
recordsize

Obtained from: OpenZFS
OpenZFS commit: c629f0bf62e351355716f9870d6c2e377584b016


# 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


# 716fd348 18-May-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c0cf6ed67

Notable upstream pull request merges:
#10662 zvol_wait: Ignore locked zvols
#12789 Improve log spacemap load time
#12812 Improved zpool status output, list all affected datasets
#13277 FreeBSD: Use NDFREE_PNBUF if available
#13302 Make zfs_max_recordsize default to 16M
#13311 Fix error handling in FreeBSD's get/putpages VOPs
#13345 FreeBSD: Fix translation from ABD to physical pages
#13373 zfs: holds: dequadratify
#13375 Corrected edge case in uncompressed ARC->L2ARC handling
#13388 Improve mg_aliquot math
#13405 Reduce dbuf_find() lock contention
#13406 FreeBSD: use zero_region instead of allocating a dedicated page

Obtained from: OpenZFS
OpenZFS commit: c0cf6ed6792e545fd614c2a88cb53756db7e03f8


# 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


# c03c5b1c 08-Mar-2022 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#9078: log xattr=sa create/remove/update to ZIL
#11919: Cross-platform xattr user namespace compatibility
#13014: Report dnodes with faulty bonuslen
#13016: FreeBSD: Fix zvol_cdev_open locking
#13019: spl: Don't check FreeBSD rwlocks for double initialization
#13027: Fix clearing set-uid and set-gid bits on a file when
replying a write
#13031: Add enumerated vdev names to 'zpool iostat -v' and
'zpool list -v'
#13074: Enable encrypted raw sending to pools with greater ashift
#13076: Receive checks should allow unencrypted child datasets
#13098: Avoid dirtying the final TXGs when exporting a pool
#13172: Fix ENOSPC when unlinking multiple files from full pool

Obtained from: OpenZFS
OpenZFS commit: a86e089415679cf1b98eb424a159bb36aa2c19e3


# 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


# dae17134 17-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@269b5dadc (master) into main

Notable upstream pull request merges:
#12285 Introduce a tunable to exclude special class buffers from L2ARC
#12689 Check l2cache vdevs pending list inside the vdev_inuse()
#12735 Enable edonr in FreeBSD
#12743 FreeBSD: fix world build after de198f2
#12745 Restore dirty dnode detection logic

Obtained from: OpenZFS
OpenZFS commit: 269b5dadcfd1d5732cf763dddcd46009a332eae4


# 6ba2210e 21-Oct-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12392 Avoid panic in case of pool errors and missing L2ARC
#12448 skip snapshot in zfs_iter_mounted()
#12516 Fix NFS and large reads on older kernels
#12533 Fail invalid incremental recursive send gracefully
#12569 FreeBSD: Really zero the zero page
#12575 Reject zfs send -RI with nonexistent fromsnap
#12602 Correct refcount_add in dmu_zfetch
#12650 zpool should call zfs_nicestrtonum() with non-NULL handle

Obtained from: OpenZFS
OpenZFS commit: ec64fdb93d144ab1884097cfd36e18b62a2db848


# 53b70c86 15-Sep-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4a1195ca5 (master) into main

Notable upstream pull request merges:
#11312 Temporarily use root credentials to mount snapshots in .zfs
#12246 arc: Drop an incorrect assert
#12443 Fixed data integrity issue when underlying disk returns error
to zfs
#12522 Compressed receive with different ashift can result in incorrect
PSIZE on disk
#12535 Verify embedded blkptr's in arc_read()
#12541 Allow sending corrupt snapshots even if metadata is corrupted

Obtained from: OpenZFS
OpenZFS commit: 4a1195ca5041cbff2a6b025a31937fef84876c52


# 2faf504d 17-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@8ae86e2ed (master) into main

Notable upstream pull request merges:
#12422 Fix/improve dbuf hits accounting
#12406 Increase default volblocksize from 8KB to 16KB
#12398 Remove b_pabd/b_rabd allocation from arc_hdr_alloc()
#12397 Run arc_evict thread at higher priority
#12297 Avoid vq_lock drop in vdev_queue_aggregate()
#12161 Restore FreeBSD sysctl processing for arc.min and arc.max

Obtained from: OpenZFS
OpenZFS commit: 8ae86e2edc736483c1530fd689525aa2460eaec8


# 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


# 2617128a 30-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4694131a0 (master) into main

Notable upstream pull request merges:
#12253 module/zfs: simplify ddt_stat_add() loop
#12288 Avoid 64bit division in multilist index functions

Obtained from: OpenZFS
OpenZFS commit: 4694131a0a05b6db2727c9801f9729b9378d3064


# 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


# 0d8fe237 20-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12054 Avoid deadlock when removing L2ARC devices under I/O
#12172 Use wmsum for arc, abd, dbuf and zfetch statistics
#12221 vdev_draid_min_asize() ignores reserved space

Obtained from: OpenZFS
OpenZFS commit: c4c162c1e8ff9ce8833014711875d18df520096c


# 3ff01b23 12-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12149: Multiple man-pages: Move to appropriate section
#12158: Re-embed multilist_t storage
#12191: Convert non-libzpool libraries to -fvisibility=hidden
#12196: Unify manpage makefiles, move pages to better sexions, ...
#12210: libzutil: import filtering optimisation
#12212: Remove pool io kstats

Obtained from: OpenZFS
OpenZFS commit: afa7b3484556d3ae610a34582ce5ebd2c3e27bba


# 16038816 08-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@75b4cbf62 (master) into main

Notable upstream pull request merges:
#11710 Allow zfs to send replication streams with missing snapshots
#11751 Avoid taking global lock to destroy zfsdev state
#11786 Ratelimit deadman zevents as with delay zevents
#11803 ZFS traverse_visitbp optimization to limit prefetch
#11813 Allow pool names that look like Solaris disk names
#11822 Atomically check and set dropped zevent count
#11822 Don't scale zfs_zevent_len_max by CPU count
#11833 Refactor zfsdev state init/destroy to share common code
#11837 zfs get -p only outputs 3 columns if "clones" property is empty
#11843 libzutil: zfs_isnumber(): return false if input empty
#11849 Use dsl_scan_setup_check() to setup a scrub
#11861 Improvements to the 'compatibility' property
#11862 cmd/zfs receive: allow dry-run (-n) to check property args
#11864 receive: don't fail inheriting (-x) properties on wrong dataset type
#11877 Combine zio caches if possible
#11881 FreeBSD: use vnlru_free_vfsops if available
#11883 FreeBSD: add support for lockless symlink lookup
#11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr
#11896 Fix crash in zio_done error reporting
#11905 zfs-send(8): Restore sorting of flags
#11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir
#11930 vdev_mirror: don't scrub/resilver devices that can't be read
#11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines
#11955 zfs get: don't lookup mount options when using "-s local"
#11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl
#11959 vdev_id: variable not getting expanded under map_slot()
#11966 Scale worker threads and taskqs with number of CPUs
#11994 Clean up use of zfs_log_create in zfs_dir
#11997 FreeBSD: Don't force xattr mount option
#11997 FreeBSD: Implement xattr=sa
#11997 FreeBSD: Use SET_ERROR to trace xattr name errors
#11998 Simplify/fix dnode_move() for dn_zfetch
#12003 FreeBSD: Initialize/destroy zp->z_lock
#12010 Fix dRAID self-healing short columns
#12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots"
#12040 Reinstate the old zpool read label logic as a fallback
#12046 Improve scrub maxinflight_bytes math
#12049 FreeBSD: avoid memory allocation in arc_prune_async
#12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI
#12061 Fix dRAID sequential resilver silent damage handling
#12072 Let zfs diff be more permissive
#12077 FreeBSD: Retry OCF ENOMEM errors.
#12088 Propagate vdev state due to invalid label corruption
#12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat
#12097 FreeBSD: Update dataset_kstats for zvols in dev mode
#12104 FreeBSD boot code reminder after zpool upgrade
#12114 Introduce write-mostly sums

Obtained from: OpenZFS
OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3


# 6db169e9 13-Apr-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@3522f57b6 (master)

Notable upstream pull request merges:
#11742 When specifying raidz vdev name, parity count should match
#11744 Use a helper function to clarify gang block size
#11771 Support running FreeBSD buildworld on Arm-based macOS hosts

This is the last update that will be MFCed into stable/13.

From now on, the tracking of OpenZFS branches will be different:
- main continues tracking openzfs/zfs/master
- stable/13 is going to track openzfs/zfs/zfs-2.1-release

Obtained from: OpenZFS
MFC after: 1 week


# ba27dd8b 21-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9312e0fd1

Notable upstream changes:
778869fa1 Fix reporting of mount progress
e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD
03e02e5b5 Fix checksum errors not being counted on repeated repair
64e0fe14f Restore FreeBSD resource usage accounting
11f2e9a49 Fix panic if scrubbing after removing a slog device

MFC after: 2 weeks


# 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


# 5dce0384 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: Avoid updating the L2ARC device header unnecessarily

From openzfs-master 0ae184a6b commit message:
If we do not write any buffers to the cache device and the evict hand
has not advanced do not update the cache device header.

Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58
Patch Author: George Amanakis <gamanakis@gmail.com>

MFC after: 3 days
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D28682

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

OpenZFS: Fix issues caused by reversed commits + rebase

# 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
...

# 5596f836 14-Nov-2020 Mateusz Guzik <mjg@FreeBSD.org>

zfs: disable periodic arc updates

They are only there to provide less innacurate statistics for debuggers.
However, this is quite heavy-weight and instead it would be better to
teach debuggers how to obtain the necessary information.

# 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


# 2c48331d 18-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

MFV 2.0-rc2

- Fixes divide by zero for unusual hz
- remove cryptodev dependency


# eac7052f 04-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-gfd20a8

- fixes jail delegation
- fixes raw kstat unsupported complaints
- exposes dbgmsg, dbuf, and checksum benchmark stats
- restore rename -u support


# ac0bf12e 28-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-ga00c61


# 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


# 716fd348 18-May-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c0cf6ed67

Notable upstream pull request merges:
#10662 zvol_wait: Ignore locked zvols
#12789 Improve log spacemap load time
#12812 Improved zpool status output, list all affected datasets
#13277 FreeBSD: Use NDFREE_PNBUF if available
#13302 Make zfs_max_recordsize default to 16M
#13311 Fix error handling in FreeBSD's get/putpages VOPs
#13345 FreeBSD: Fix translation from ABD to physical pages
#13373 zfs: holds: dequadratify
#13375 Corrected edge case in uncompressed ARC->L2ARC handling
#13388 Improve mg_aliquot math
#13405 Reduce dbuf_find() lock contention
#13406 FreeBSD: use zero_region instead of allocating a dedicated page

Obtained from: OpenZFS
OpenZFS commit: c0cf6ed6792e545fd614c2a88cb53756db7e03f8


# 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


# c03c5b1c 08-Mar-2022 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#9078: log xattr=sa create/remove/update to ZIL
#11919: Cross-platform xattr user namespace compatibility
#13014: Report dnodes with faulty bonuslen
#13016: FreeBSD: Fix zvol_cdev_open locking
#13019: spl: Don't check FreeBSD rwlocks for double initialization
#13027: Fix clearing set-uid and set-gid bits on a file when
replying a write
#13031: Add enumerated vdev names to 'zpool iostat -v' and
'zpool list -v'
#13074: Enable encrypted raw sending to pools with greater ashift
#13076: Receive checks should allow unencrypted child datasets
#13098: Avoid dirtying the final TXGs when exporting a pool
#13172: Fix ENOSPC when unlinking multiple files from full pool

Obtained from: OpenZFS
OpenZFS commit: a86e089415679cf1b98eb424a159bb36aa2c19e3


# 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


# dae17134 17-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@269b5dadc (master) into main

Notable upstream pull request merges:
#12285 Introduce a tunable to exclude special class buffers from L2ARC
#12689 Check l2cache vdevs pending list inside the vdev_inuse()
#12735 Enable edonr in FreeBSD
#12743 FreeBSD: fix world build after de198f2
#12745 Restore dirty dnode detection logic

Obtained from: OpenZFS
OpenZFS commit: 269b5dadcfd1d5732cf763dddcd46009a332eae4


# 6ba2210e 21-Oct-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12392 Avoid panic in case of pool errors and missing L2ARC
#12448 skip snapshot in zfs_iter_mounted()
#12516 Fix NFS and large reads on older kernels
#12533 Fail invalid incremental recursive send gracefully
#12569 FreeBSD: Really zero the zero page
#12575 Reject zfs send -RI with nonexistent fromsnap
#12602 Correct refcount_add in dmu_zfetch
#12650 zpool should call zfs_nicestrtonum() with non-NULL handle

Obtained from: OpenZFS
OpenZFS commit: ec64fdb93d144ab1884097cfd36e18b62a2db848


# 53b70c86 15-Sep-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4a1195ca5 (master) into main

Notable upstream pull request merges:
#11312 Temporarily use root credentials to mount snapshots in .zfs
#12246 arc: Drop an incorrect assert
#12443 Fixed data integrity issue when underlying disk returns error
to zfs
#12522 Compressed receive with different ashift can result in incorrect
PSIZE on disk
#12535 Verify embedded blkptr's in arc_read()
#12541 Allow sending corrupt snapshots even if metadata is corrupted

Obtained from: OpenZFS
OpenZFS commit: 4a1195ca5041cbff2a6b025a31937fef84876c52


# 2faf504d 17-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@8ae86e2ed (master) into main

Notable upstream pull request merges:
#12422 Fix/improve dbuf hits accounting
#12406 Increase default volblocksize from 8KB to 16KB
#12398 Remove b_pabd/b_rabd allocation from arc_hdr_alloc()
#12397 Run arc_evict thread at higher priority
#12297 Avoid vq_lock drop in vdev_queue_aggregate()
#12161 Restore FreeBSD sysctl processing for arc.min and arc.max

Obtained from: OpenZFS
OpenZFS commit: 8ae86e2edc736483c1530fd689525aa2460eaec8


# 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


# 2617128a 30-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4694131a0 (master) into main

Notable upstream pull request merges:
#12253 module/zfs: simplify ddt_stat_add() loop
#12288 Avoid 64bit division in multilist index functions

Obtained from: OpenZFS
OpenZFS commit: 4694131a0a05b6db2727c9801f9729b9378d3064


# 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


# 0d8fe237 20-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12054 Avoid deadlock when removing L2ARC devices under I/O
#12172 Use wmsum for arc, abd, dbuf and zfetch statistics
#12221 vdev_draid_min_asize() ignores reserved space

Obtained from: OpenZFS
OpenZFS commit: c4c162c1e8ff9ce8833014711875d18df520096c


# 3ff01b23 12-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12149: Multiple man-pages: Move to appropriate section
#12158: Re-embed multilist_t storage
#12191: Convert non-libzpool libraries to -fvisibility=hidden
#12196: Unify manpage makefiles, move pages to better sexions, ...
#12210: libzutil: import filtering optimisation
#12212: Remove pool io kstats

Obtained from: OpenZFS
OpenZFS commit: afa7b3484556d3ae610a34582ce5ebd2c3e27bba


# 16038816 08-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@75b4cbf62 (master) into main

Notable upstream pull request merges:
#11710 Allow zfs to send replication streams with missing snapshots
#11751 Avoid taking global lock to destroy zfsdev state
#11786 Ratelimit deadman zevents as with delay zevents
#11803 ZFS traverse_visitbp optimization to limit prefetch
#11813 Allow pool names that look like Solaris disk names
#11822 Atomically check and set dropped zevent count
#11822 Don't scale zfs_zevent_len_max by CPU count
#11833 Refactor zfsdev state init/destroy to share common code
#11837 zfs get -p only outputs 3 columns if "clones" property is empty
#11843 libzutil: zfs_isnumber(): return false if input empty
#11849 Use dsl_scan_setup_check() to setup a scrub
#11861 Improvements to the 'compatibility' property
#11862 cmd/zfs receive: allow dry-run (-n) to check property args
#11864 receive: don't fail inheriting (-x) properties on wrong dataset type
#11877 Combine zio caches if possible
#11881 FreeBSD: use vnlru_free_vfsops if available
#11883 FreeBSD: add support for lockless symlink lookup
#11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr
#11896 Fix crash in zio_done error reporting
#11905 zfs-send(8): Restore sorting of flags
#11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir
#11930 vdev_mirror: don't scrub/resilver devices that can't be read
#11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines
#11955 zfs get: don't lookup mount options when using "-s local"
#11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl
#11959 vdev_id: variable not getting expanded under map_slot()
#11966 Scale worker threads and taskqs with number of CPUs
#11994 Clean up use of zfs_log_create in zfs_dir
#11997 FreeBSD: Don't force xattr mount option
#11997 FreeBSD: Implement xattr=sa
#11997 FreeBSD: Use SET_ERROR to trace xattr name errors
#11998 Simplify/fix dnode_move() for dn_zfetch
#12003 FreeBSD: Initialize/destroy zp->z_lock
#12010 Fix dRAID self-healing short columns
#12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots"
#12040 Reinstate the old zpool read label logic as a fallback
#12046 Improve scrub maxinflight_bytes math
#12049 FreeBSD: avoid memory allocation in arc_prune_async
#12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI
#12061 Fix dRAID sequential resilver silent damage handling
#12072 Let zfs diff be more permissive
#12077 FreeBSD: Retry OCF ENOMEM errors.
#12088 Propagate vdev state due to invalid label corruption
#12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat
#12097 FreeBSD: Update dataset_kstats for zvols in dev mode
#12104 FreeBSD boot code reminder after zpool upgrade
#12114 Introduce write-mostly sums

Obtained from: OpenZFS
OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3


# 6db169e9 13-Apr-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@3522f57b6 (master)

Notable upstream pull request merges:
#11742 When specifying raidz vdev name, parity count should match
#11744 Use a helper function to clarify gang block size
#11771 Support running FreeBSD buildworld on Arm-based macOS hosts

This is the last update that will be MFCed into stable/13.

From now on, the tracking of OpenZFS branches will be different:
- main continues tracking openzfs/zfs/master
- stable/13 is going to track openzfs/zfs/zfs-2.1-release

Obtained from: OpenZFS
MFC after: 1 week


# ba27dd8b 21-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9312e0fd1

Notable upstream changes:
778869fa1 Fix reporting of mount progress
e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD
03e02e5b5 Fix checksum errors not being counted on repeated repair
64e0fe14f Restore FreeBSD resource usage accounting
11f2e9a49 Fix panic if scrubbing after removing a slog device

MFC after: 2 weeks


# 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


# 5dce0384 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: Avoid updating the L2ARC device header unnecessarily

From openzfs-master 0ae184a6b commit message:
If we do not write any buffers to the cache device and the evict hand
has not advanced do not update the cache device header.

Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58
Patch Author: George Amanakis <gamanakis@gmail.com>

MFC after: 3 days
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D28682

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

OpenZFS: Fix issues caused by reversed commits + rebase

# 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
...

# 5596f836 14-Nov-2020 Mateusz Guzik <mjg@FreeBSD.org>

zfs: disable periodic arc updates

They are only there to provide less innacurate statistics for debuggers.
However, this is quite heavy-weight and instead it would be better to
teach debuggers how to obtain the necessary information.

# 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


# 2c48331d 18-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

MFV 2.0-rc2

- Fixes divide by zero for unusual hz
- remove cryptodev dependency


# eac7052f 04-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-gfd20a8

- fixes jail delegation
- fixes raw kstat unsupported complaints
- exposes dbgmsg, dbuf, and checksum benchmark stats
- restore rename -u support


# ac0bf12e 28-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-ga00c61


# 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


# 716fd348 18-May-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c0cf6ed67

Notable upstream pull request merges:
#10662 zvol_wait: Ignore locked zvols
#12789 Improve log spacemap load time
#12812 Improved zpool status output, list all affected datasets
#13277 FreeBSD: Use NDFREE_PNBUF if available
#13302 Make zfs_max_recordsize default to 16M
#13311 Fix error handling in FreeBSD's get/putpages VOPs
#13345 FreeBSD: Fix translation from ABD to physical pages
#13373 zfs: holds: dequadratify
#13375 Corrected edge case in uncompressed ARC->L2ARC handling
#13388 Improve mg_aliquot math
#13405 Reduce dbuf_find() lock contention
#13406 FreeBSD: use zero_region instead of allocating a dedicated page

Obtained from: OpenZFS
OpenZFS commit: c0cf6ed6792e545fd614c2a88cb53756db7e03f8


# 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


# c03c5b1c 08-Mar-2022 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#9078: log xattr=sa create/remove/update to ZIL
#11919: Cross-platform xattr user namespace compatibility
#13014: Report dnodes with faulty bonuslen
#13016: FreeBSD: Fix zvol_cdev_open locking
#13019: spl: Don't check FreeBSD rwlocks for double initialization
#13027: Fix clearing set-uid and set-gid bits on a file when
replying a write
#13031: Add enumerated vdev names to 'zpool iostat -v' and
'zpool list -v'
#13074: Enable encrypted raw sending to pools with greater ashift
#13076: Receive checks should allow unencrypted child datasets
#13098: Avoid dirtying the final TXGs when exporting a pool
#13172: Fix ENOSPC when unlinking multiple files from full pool

Obtained from: OpenZFS
OpenZFS commit: a86e089415679cf1b98eb424a159bb36aa2c19e3


# 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


# dae17134 17-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@269b5dadc (master) into main

Notable upstream pull request merges:
#12285 Introduce a tunable to exclude special class buffers from L2ARC
#12689 Check l2cache vdevs pending list inside the vdev_inuse()
#12735 Enable edonr in FreeBSD
#12743 FreeBSD: fix world build after de198f2
#12745 Restore dirty dnode detection logic

Obtained from: OpenZFS
OpenZFS commit: 269b5dadcfd1d5732cf763dddcd46009a332eae4


# 6ba2210e 21-Oct-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12392 Avoid panic in case of pool errors and missing L2ARC
#12448 skip snapshot in zfs_iter_mounted()
#12516 Fix NFS and large reads on older kernels
#12533 Fail invalid incremental recursive send gracefully
#12569 FreeBSD: Really zero the zero page
#12575 Reject zfs send -RI with nonexistent fromsnap
#12602 Correct refcount_add in dmu_zfetch
#12650 zpool should call zfs_nicestrtonum() with non-NULL handle

Obtained from: OpenZFS
OpenZFS commit: ec64fdb93d144ab1884097cfd36e18b62a2db848


# 53b70c86 15-Sep-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4a1195ca5 (master) into main

Notable upstream pull request merges:
#11312 Temporarily use root credentials to mount snapshots in .zfs
#12246 arc: Drop an incorrect assert
#12443 Fixed data integrity issue when underlying disk returns error
to zfs
#12522 Compressed receive with different ashift can result in incorrect
PSIZE on disk
#12535 Verify embedded blkptr's in arc_read()
#12541 Allow sending corrupt snapshots even if metadata is corrupted

Obtained from: OpenZFS
OpenZFS commit: 4a1195ca5041cbff2a6b025a31937fef84876c52


# 2faf504d 17-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@8ae86e2ed (master) into main

Notable upstream pull request merges:
#12422 Fix/improve dbuf hits accounting
#12406 Increase default volblocksize from 8KB to 16KB
#12398 Remove b_pabd/b_rabd allocation from arc_hdr_alloc()
#12397 Run arc_evict thread at higher priority
#12297 Avoid vq_lock drop in vdev_queue_aggregate()
#12161 Restore FreeBSD sysctl processing for arc.min and arc.max

Obtained from: OpenZFS
OpenZFS commit: 8ae86e2edc736483c1530fd689525aa2460eaec8


# 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


# 2617128a 30-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4694131a0 (master) into main

Notable upstream pull request merges:
#12253 module/zfs: simplify ddt_stat_add() loop
#12288 Avoid 64bit division in multilist index functions

Obtained from: OpenZFS
OpenZFS commit: 4694131a0a05b6db2727c9801f9729b9378d3064


# 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


# 0d8fe237 20-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12054 Avoid deadlock when removing L2ARC devices under I/O
#12172 Use wmsum for arc, abd, dbuf and zfetch statistics
#12221 vdev_draid_min_asize() ignores reserved space

Obtained from: OpenZFS
OpenZFS commit: c4c162c1e8ff9ce8833014711875d18df520096c


# 3ff01b23 12-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12149: Multiple man-pages: Move to appropriate section
#12158: Re-embed multilist_t storage
#12191: Convert non-libzpool libraries to -fvisibility=hidden
#12196: Unify manpage makefiles, move pages to better sexions, ...
#12210: libzutil: import filtering optimisation
#12212: Remove pool io kstats

Obtained from: OpenZFS
OpenZFS commit: afa7b3484556d3ae610a34582ce5ebd2c3e27bba


# 16038816 08-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@75b4cbf62 (master) into main

Notable upstream pull request merges:
#11710 Allow zfs to send replication streams with missing snapshots
#11751 Avoid taking global lock to destroy zfsdev state
#11786 Ratelimit deadman zevents as with delay zevents
#11803 ZFS traverse_visitbp optimization to limit prefetch
#11813 Allow pool names that look like Solaris disk names
#11822 Atomically check and set dropped zevent count
#11822 Don't scale zfs_zevent_len_max by CPU count
#11833 Refactor zfsdev state init/destroy to share common code
#11837 zfs get -p only outputs 3 columns if "clones" property is empty
#11843 libzutil: zfs_isnumber(): return false if input empty
#11849 Use dsl_scan_setup_check() to setup a scrub
#11861 Improvements to the 'compatibility' property
#11862 cmd/zfs receive: allow dry-run (-n) to check property args
#11864 receive: don't fail inheriting (-x) properties on wrong dataset type
#11877 Combine zio caches if possible
#11881 FreeBSD: use vnlru_free_vfsops if available
#11883 FreeBSD: add support for lockless symlink lookup
#11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr
#11896 Fix crash in zio_done error reporting
#11905 zfs-send(8): Restore sorting of flags
#11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir
#11930 vdev_mirror: don't scrub/resilver devices that can't be read
#11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines
#11955 zfs get: don't lookup mount options when using "-s local"
#11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl
#11959 vdev_id: variable not getting expanded under map_slot()
#11966 Scale worker threads and taskqs with number of CPUs
#11994 Clean up use of zfs_log_create in zfs_dir
#11997 FreeBSD: Don't force xattr mount option
#11997 FreeBSD: Implement xattr=sa
#11997 FreeBSD: Use SET_ERROR to trace xattr name errors
#11998 Simplify/fix dnode_move() for dn_zfetch
#12003 FreeBSD: Initialize/destroy zp->z_lock
#12010 Fix dRAID self-healing short columns
#12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots"
#12040 Reinstate the old zpool read label logic as a fallback
#12046 Improve scrub maxinflight_bytes math
#12049 FreeBSD: avoid memory allocation in arc_prune_async
#12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI
#12061 Fix dRAID sequential resilver silent damage handling
#12072 Let zfs diff be more permissive
#12077 FreeBSD: Retry OCF ENOMEM errors.
#12088 Propagate vdev state due to invalid label corruption
#12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat
#12097 FreeBSD: Update dataset_kstats for zvols in dev mode
#12104 FreeBSD boot code reminder after zpool upgrade
#12114 Introduce write-mostly sums

Obtained from: OpenZFS
OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3


# 6db169e9 13-Apr-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@3522f57b6 (master)

Notable upstream pull request merges:
#11742 When specifying raidz vdev name, parity count should match
#11744 Use a helper function to clarify gang block size
#11771 Support running FreeBSD buildworld on Arm-based macOS hosts

This is the last update that will be MFCed into stable/13.

From now on, the tracking of OpenZFS branches will be different:
- main continues tracking openzfs/zfs/master
- stable/13 is going to track openzfs/zfs/zfs-2.1-release

Obtained from: OpenZFS
MFC after: 1 week


# ba27dd8b 21-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9312e0fd1

Notable upstream changes:
778869fa1 Fix reporting of mount progress
e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD
03e02e5b5 Fix checksum errors not being counted on repeated repair
64e0fe14f Restore FreeBSD resource usage accounting
11f2e9a49 Fix panic if scrubbing after removing a slog device

MFC after: 2 weeks


# 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


# 5dce0384 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: Avoid updating the L2ARC device header unnecessarily

From openzfs-master 0ae184a6b commit message:
If we do not write any buffers to the cache device and the evict hand
has not advanced do not update the cache device header.

Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58
Patch Author: George Amanakis <gamanakis@gmail.com>

MFC after: 3 days
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D28682

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

OpenZFS: Fix issues caused by reversed commits + rebase

# 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
...

# 5596f836 14-Nov-2020 Mateusz Guzik <mjg@FreeBSD.org>

zfs: disable periodic arc updates

They are only there to provide less innacurate statistics for debuggers.
However, this is quite heavy-weight and instead it would be better to
teach debuggers how to obtain the necessary information.

# 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


# 2c48331d 18-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

MFV 2.0-rc2

- Fixes divide by zero for unusual hz
- remove cryptodev dependency


# eac7052f 04-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-gfd20a8

- fixes jail delegation
- fixes raw kstat unsupported complaints
- exposes dbgmsg, dbuf, and checksum benchmark stats
- restore rename -u support


# ac0bf12e 28-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-ga00c61


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

Initial import from vendor-sys branch of openzfs


# 716fd348 18-May-2022 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@c0cf6ed67

Notable upstream pull request merges:
#10662 zvol_wait: Ignore locked zvols
#12789 Improve log spacemap load time
#12812 Improved zpool status output, list all affected datasets
#13277 FreeBSD: Use NDFREE_PNBUF if available
#13302 Make zfs_max_recordsize default to 16M
#13311 Fix error handling in FreeBSD's get/putpages VOPs
#13345 FreeBSD: Fix translation from ABD to physical pages
#13373 zfs: holds: dequadratify
#13375 Corrected edge case in uncompressed ARC->L2ARC handling
#13388 Improve mg_aliquot math
#13405 Reduce dbuf_find() lock contention
#13406 FreeBSD: use zero_region instead of allocating a dedicated page

Obtained from: OpenZFS
OpenZFS commit: c0cf6ed6792e545fd614c2a88cb53756db7e03f8


# 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


# c03c5b1c 08-Mar-2022 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#9078: log xattr=sa create/remove/update to ZIL
#11919: Cross-platform xattr user namespace compatibility
#13014: Report dnodes with faulty bonuslen
#13016: FreeBSD: Fix zvol_cdev_open locking
#13019: spl: Don't check FreeBSD rwlocks for double initialization
#13027: Fix clearing set-uid and set-gid bits on a file when
replying a write
#13031: Add enumerated vdev names to 'zpool iostat -v' and
'zpool list -v'
#13074: Enable encrypted raw sending to pools with greater ashift
#13076: Receive checks should allow unencrypted child datasets
#13098: Avoid dirtying the final TXGs when exporting a pool
#13172: Fix ENOSPC when unlinking multiple files from full pool

Obtained from: OpenZFS
OpenZFS commit: a86e089415679cf1b98eb424a159bb36aa2c19e3


# 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


# dae17134 17-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@269b5dadc (master) into main

Notable upstream pull request merges:
#12285 Introduce a tunable to exclude special class buffers from L2ARC
#12689 Check l2cache vdevs pending list inside the vdev_inuse()
#12735 Enable edonr in FreeBSD
#12743 FreeBSD: fix world build after de198f2
#12745 Restore dirty dnode detection logic

Obtained from: OpenZFS
OpenZFS commit: 269b5dadcfd1d5732cf763dddcd46009a332eae4


# 6ba2210e 21-Oct-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12392 Avoid panic in case of pool errors and missing L2ARC
#12448 skip snapshot in zfs_iter_mounted()
#12516 Fix NFS and large reads on older kernels
#12533 Fail invalid incremental recursive send gracefully
#12569 FreeBSD: Really zero the zero page
#12575 Reject zfs send -RI with nonexistent fromsnap
#12602 Correct refcount_add in dmu_zfetch
#12650 zpool should call zfs_nicestrtonum() with non-NULL handle

Obtained from: OpenZFS
OpenZFS commit: ec64fdb93d144ab1884097cfd36e18b62a2db848


# 53b70c86 15-Sep-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4a1195ca5 (master) into main

Notable upstream pull request merges:
#11312 Temporarily use root credentials to mount snapshots in .zfs
#12246 arc: Drop an incorrect assert
#12443 Fixed data integrity issue when underlying disk returns error
to zfs
#12522 Compressed receive with different ashift can result in incorrect
PSIZE on disk
#12535 Verify embedded blkptr's in arc_read()
#12541 Allow sending corrupt snapshots even if metadata is corrupted

Obtained from: OpenZFS
OpenZFS commit: 4a1195ca5041cbff2a6b025a31937fef84876c52


# 2faf504d 17-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@8ae86e2ed (master) into main

Notable upstream pull request merges:
#12422 Fix/improve dbuf hits accounting
#12406 Increase default volblocksize from 8KB to 16KB
#12398 Remove b_pabd/b_rabd allocation from arc_hdr_alloc()
#12397 Run arc_evict thread at higher priority
#12297 Avoid vq_lock drop in vdev_queue_aggregate()
#12161 Restore FreeBSD sysctl processing for arc.min and arc.max

Obtained from: OpenZFS
OpenZFS commit: 8ae86e2edc736483c1530fd689525aa2460eaec8


# 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


# 2617128a 30-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4694131a0 (master) into main

Notable upstream pull request merges:
#12253 module/zfs: simplify ddt_stat_add() loop
#12288 Avoid 64bit division in multilist index functions

Obtained from: OpenZFS
OpenZFS commit: 4694131a0a05b6db2727c9801f9729b9378d3064


# 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


# 0d8fe237 20-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12054 Avoid deadlock when removing L2ARC devices under I/O
#12172 Use wmsum for arc, abd, dbuf and zfetch statistics
#12221 vdev_draid_min_asize() ignores reserved space

Obtained from: OpenZFS
OpenZFS commit: c4c162c1e8ff9ce8833014711875d18df520096c


# 3ff01b23 12-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12149: Multiple man-pages: Move to appropriate section
#12158: Re-embed multilist_t storage
#12191: Convert non-libzpool libraries to -fvisibility=hidden
#12196: Unify manpage makefiles, move pages to better sexions, ...
#12210: libzutil: import filtering optimisation
#12212: Remove pool io kstats

Obtained from: OpenZFS
OpenZFS commit: afa7b3484556d3ae610a34582ce5ebd2c3e27bba


# 16038816 08-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@75b4cbf62 (master) into main

Notable upstream pull request merges:
#11710 Allow zfs to send replication streams with missing snapshots
#11751 Avoid taking global lock to destroy zfsdev state
#11786 Ratelimit deadman zevents as with delay zevents
#11803 ZFS traverse_visitbp optimization to limit prefetch
#11813 Allow pool names that look like Solaris disk names
#11822 Atomically check and set dropped zevent count
#11822 Don't scale zfs_zevent_len_max by CPU count
#11833 Refactor zfsdev state init/destroy to share common code
#11837 zfs get -p only outputs 3 columns if "clones" property is empty
#11843 libzutil: zfs_isnumber(): return false if input empty
#11849 Use dsl_scan_setup_check() to setup a scrub
#11861 Improvements to the 'compatibility' property
#11862 cmd/zfs receive: allow dry-run (-n) to check property args
#11864 receive: don't fail inheriting (-x) properties on wrong dataset type
#11877 Combine zio caches if possible
#11881 FreeBSD: use vnlru_free_vfsops if available
#11883 FreeBSD: add support for lockless symlink lookup
#11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr
#11896 Fix crash in zio_done error reporting
#11905 zfs-send(8): Restore sorting of flags
#11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir
#11930 vdev_mirror: don't scrub/resilver devices that can't be read
#11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines
#11955 zfs get: don't lookup mount options when using "-s local"
#11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl
#11959 vdev_id: variable not getting expanded under map_slot()
#11966 Scale worker threads and taskqs with number of CPUs
#11994 Clean up use of zfs_log_create in zfs_dir
#11997 FreeBSD: Don't force xattr mount option
#11997 FreeBSD: Implement xattr=sa
#11997 FreeBSD: Use SET_ERROR to trace xattr name errors
#11998 Simplify/fix dnode_move() for dn_zfetch
#12003 FreeBSD: Initialize/destroy zp->z_lock
#12010 Fix dRAID self-healing short columns
#12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots"
#12040 Reinstate the old zpool read label logic as a fallback
#12046 Improve scrub maxinflight_bytes math
#12049 FreeBSD: avoid memory allocation in arc_prune_async
#12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI
#12061 Fix dRAID sequential resilver silent damage handling
#12072 Let zfs diff be more permissive
#12077 FreeBSD: Retry OCF ENOMEM errors.
#12088 Propagate vdev state due to invalid label corruption
#12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat
#12097 FreeBSD: Update dataset_kstats for zvols in dev mode
#12104 FreeBSD boot code reminder after zpool upgrade
#12114 Introduce write-mostly sums

Obtained from: OpenZFS
OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3


# 6db169e9 13-Apr-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@3522f57b6 (master)

Notable upstream pull request merges:
#11742 When specifying raidz vdev name, parity count should match
#11744 Use a helper function to clarify gang block size
#11771 Support running FreeBSD buildworld on Arm-based macOS hosts

This is the last update that will be MFCed into stable/13.

From now on, the tracking of OpenZFS branches will be different:
- main continues tracking openzfs/zfs/master
- stable/13 is going to track openzfs/zfs/zfs-2.1-release

Obtained from: OpenZFS
MFC after: 1 week


# ba27dd8b 21-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9312e0fd1

Notable upstream changes:
778869fa1 Fix reporting of mount progress
e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD
03e02e5b5 Fix checksum errors not being counted on repeated repair
64e0fe14f Restore FreeBSD resource usage accounting
11f2e9a49 Fix panic if scrubbing after removing a slog device

MFC after: 2 weeks


# 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


# 5dce0384 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: Avoid updating the L2ARC device header unnecessarily

From openzfs-master 0ae184a6b commit message:
If we do not write any buffers to the cache device and the evict hand
has not advanced do not update the cache device header.

Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58
Patch Author: George Amanakis <gamanakis@gmail.com>

MFC after: 3 days
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D28682

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

OpenZFS: Fix issues caused by reversed commits + rebase

# 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
...

# 5596f836 14-Nov-2020 Mateusz Guzik <mjg@FreeBSD.org>

zfs: disable periodic arc updates

They are only there to provide less innacurate statistics for debuggers.
However, this is quite heavy-weight and instead it would be better to
teach debuggers how to obtain the necessary information.

# 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


# 2c48331d 18-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

MFV 2.0-rc2

- Fixes divide by zero for unusual hz
- remove cryptodev dependency


# eac7052f 04-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-gfd20a8

- fixes jail delegation
- fixes raw kstat unsupported complaints
- exposes dbgmsg, dbuf, and checksum benchmark stats
- restore rename -u support


# ac0bf12e 28-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-ga00c61


# 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


# c03c5b1c 08-Mar-2022 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#9078: log xattr=sa create/remove/update to ZIL
#11919: Cross-platform xattr user namespace compatibility
#13014: Report dnodes with faulty bonuslen
#13016: FreeBSD: Fix zvol_cdev_open locking
#13019: spl: Don't check FreeBSD rwlocks for double initialization
#13027: Fix clearing set-uid and set-gid bits on a file when
replying a write
#13031: Add enumerated vdev names to 'zpool iostat -v' and
'zpool list -v'
#13074: Enable encrypted raw sending to pools with greater ashift
#13076: Receive checks should allow unencrypted child datasets
#13098: Avoid dirtying the final TXGs when exporting a pool
#13172: Fix ENOSPC when unlinking multiple files from full pool

Obtained from: OpenZFS
OpenZFS commit: a86e089415679cf1b98eb424a159bb36aa2c19e3


# 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


# dae17134 17-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@269b5dadc (master) into main

Notable upstream pull request merges:
#12285 Introduce a tunable to exclude special class buffers from L2ARC
#12689 Check l2cache vdevs pending list inside the vdev_inuse()
#12735 Enable edonr in FreeBSD
#12743 FreeBSD: fix world build after de198f2
#12745 Restore dirty dnode detection logic

Obtained from: OpenZFS
OpenZFS commit: 269b5dadcfd1d5732cf763dddcd46009a332eae4


# 6ba2210e 21-Oct-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12392 Avoid panic in case of pool errors and missing L2ARC
#12448 skip snapshot in zfs_iter_mounted()
#12516 Fix NFS and large reads on older kernels
#12533 Fail invalid incremental recursive send gracefully
#12569 FreeBSD: Really zero the zero page
#12575 Reject zfs send -RI with nonexistent fromsnap
#12602 Correct refcount_add in dmu_zfetch
#12650 zpool should call zfs_nicestrtonum() with non-NULL handle

Obtained from: OpenZFS
OpenZFS commit: ec64fdb93d144ab1884097cfd36e18b62a2db848


# 53b70c86 15-Sep-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4a1195ca5 (master) into main

Notable upstream pull request merges:
#11312 Temporarily use root credentials to mount snapshots in .zfs
#12246 arc: Drop an incorrect assert
#12443 Fixed data integrity issue when underlying disk returns error
to zfs
#12522 Compressed receive with different ashift can result in incorrect
PSIZE on disk
#12535 Verify embedded blkptr's in arc_read()
#12541 Allow sending corrupt snapshots even if metadata is corrupted

Obtained from: OpenZFS
OpenZFS commit: 4a1195ca5041cbff2a6b025a31937fef84876c52


# 2faf504d 17-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@8ae86e2ed (master) into main

Notable upstream pull request merges:
#12422 Fix/improve dbuf hits accounting
#12406 Increase default volblocksize from 8KB to 16KB
#12398 Remove b_pabd/b_rabd allocation from arc_hdr_alloc()
#12397 Run arc_evict thread at higher priority
#12297 Avoid vq_lock drop in vdev_queue_aggregate()
#12161 Restore FreeBSD sysctl processing for arc.min and arc.max

Obtained from: OpenZFS
OpenZFS commit: 8ae86e2edc736483c1530fd689525aa2460eaec8


# 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


# 2617128a 30-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4694131a0 (master) into main

Notable upstream pull request merges:
#12253 module/zfs: simplify ddt_stat_add() loop
#12288 Avoid 64bit division in multilist index functions

Obtained from: OpenZFS
OpenZFS commit: 4694131a0a05b6db2727c9801f9729b9378d3064


# 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


# 0d8fe237 20-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12054 Avoid deadlock when removing L2ARC devices under I/O
#12172 Use wmsum for arc, abd, dbuf and zfetch statistics
#12221 vdev_draid_min_asize() ignores reserved space

Obtained from: OpenZFS
OpenZFS commit: c4c162c1e8ff9ce8833014711875d18df520096c


# 3ff01b23 12-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12149: Multiple man-pages: Move to appropriate section
#12158: Re-embed multilist_t storage
#12191: Convert non-libzpool libraries to -fvisibility=hidden
#12196: Unify manpage makefiles, move pages to better sexions, ...
#12210: libzutil: import filtering optimisation
#12212: Remove pool io kstats

Obtained from: OpenZFS
OpenZFS commit: afa7b3484556d3ae610a34582ce5ebd2c3e27bba


# 16038816 08-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@75b4cbf62 (master) into main

Notable upstream pull request merges:
#11710 Allow zfs to send replication streams with missing snapshots
#11751 Avoid taking global lock to destroy zfsdev state
#11786 Ratelimit deadman zevents as with delay zevents
#11803 ZFS traverse_visitbp optimization to limit prefetch
#11813 Allow pool names that look like Solaris disk names
#11822 Atomically check and set dropped zevent count
#11822 Don't scale zfs_zevent_len_max by CPU count
#11833 Refactor zfsdev state init/destroy to share common code
#11837 zfs get -p only outputs 3 columns if "clones" property is empty
#11843 libzutil: zfs_isnumber(): return false if input empty
#11849 Use dsl_scan_setup_check() to setup a scrub
#11861 Improvements to the 'compatibility' property
#11862 cmd/zfs receive: allow dry-run (-n) to check property args
#11864 receive: don't fail inheriting (-x) properties on wrong dataset type
#11877 Combine zio caches if possible
#11881 FreeBSD: use vnlru_free_vfsops if available
#11883 FreeBSD: add support for lockless symlink lookup
#11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr
#11896 Fix crash in zio_done error reporting
#11905 zfs-send(8): Restore sorting of flags
#11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir
#11930 vdev_mirror: don't scrub/resilver devices that can't be read
#11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines
#11955 zfs get: don't lookup mount options when using "-s local"
#11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl
#11959 vdev_id: variable not getting expanded under map_slot()
#11966 Scale worker threads and taskqs with number of CPUs
#11994 Clean up use of zfs_log_create in zfs_dir
#11997 FreeBSD: Don't force xattr mount option
#11997 FreeBSD: Implement xattr=sa
#11997 FreeBSD: Use SET_ERROR to trace xattr name errors
#11998 Simplify/fix dnode_move() for dn_zfetch
#12003 FreeBSD: Initialize/destroy zp->z_lock
#12010 Fix dRAID self-healing short columns
#12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots"
#12040 Reinstate the old zpool read label logic as a fallback
#12046 Improve scrub maxinflight_bytes math
#12049 FreeBSD: avoid memory allocation in arc_prune_async
#12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI
#12061 Fix dRAID sequential resilver silent damage handling
#12072 Let zfs diff be more permissive
#12077 FreeBSD: Retry OCF ENOMEM errors.
#12088 Propagate vdev state due to invalid label corruption
#12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat
#12097 FreeBSD: Update dataset_kstats for zvols in dev mode
#12104 FreeBSD boot code reminder after zpool upgrade
#12114 Introduce write-mostly sums

Obtained from: OpenZFS
OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3


# 6db169e9 13-Apr-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@3522f57b6 (master)

Notable upstream pull request merges:
#11742 When specifying raidz vdev name, parity count should match
#11744 Use a helper function to clarify gang block size
#11771 Support running FreeBSD buildworld on Arm-based macOS hosts

This is the last update that will be MFCed into stable/13.

From now on, the tracking of OpenZFS branches will be different:
- main continues tracking openzfs/zfs/master
- stable/13 is going to track openzfs/zfs/zfs-2.1-release

Obtained from: OpenZFS
MFC after: 1 week


# ba27dd8b 21-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9312e0fd1

Notable upstream changes:
778869fa1 Fix reporting of mount progress
e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD
03e02e5b5 Fix checksum errors not being counted on repeated repair
64e0fe14f Restore FreeBSD resource usage accounting
11f2e9a49 Fix panic if scrubbing after removing a slog device

MFC after: 2 weeks


# 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


# 5dce0384 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: Avoid updating the L2ARC device header unnecessarily

From openzfs-master 0ae184a6b commit message:
If we do not write any buffers to the cache device and the evict hand
has not advanced do not update the cache device header.

Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58
Patch Author: George Amanakis <gamanakis@gmail.com>

MFC after: 3 days
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D28682

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

OpenZFS: Fix issues caused by reversed commits + rebase

# 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
...

# 5596f836 14-Nov-2020 Mateusz Guzik <mjg@FreeBSD.org>

zfs: disable periodic arc updates

They are only there to provide less innacurate statistics for debuggers.
However, this is quite heavy-weight and instead it would be better to
teach debuggers how to obtain the necessary information.

# 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


# 2c48331d 18-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

MFV 2.0-rc2

- Fixes divide by zero for unusual hz
- remove cryptodev dependency


# eac7052f 04-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-gfd20a8

- fixes jail delegation
- fixes raw kstat unsupported complaints
- exposes dbgmsg, dbuf, and checksum benchmark stats
- restore rename -u support


# ac0bf12e 28-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-ga00c61


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

Initial import from vendor-sys branch of openzfs


# c03c5b1c 08-Mar-2022 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#9078: log xattr=sa create/remove/update to ZIL
#11919: Cross-platform xattr user namespace compatibility
#13014: Report dnodes with faulty bonuslen
#13016: FreeBSD: Fix zvol_cdev_open locking
#13019: spl: Don't check FreeBSD rwlocks for double initialization
#13027: Fix clearing set-uid and set-gid bits on a file when
replying a write
#13031: Add enumerated vdev names to 'zpool iostat -v' and
'zpool list -v'
#13074: Enable encrypted raw sending to pools with greater ashift
#13076: Receive checks should allow unencrypted child datasets
#13098: Avoid dirtying the final TXGs when exporting a pool
#13172: Fix ENOSPC when unlinking multiple files from full pool

Obtained from: OpenZFS
OpenZFS commit: a86e089415679cf1b98eb424a159bb36aa2c19e3


# 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


# dae17134 17-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@269b5dadc (master) into main

Notable upstream pull request merges:
#12285 Introduce a tunable to exclude special class buffers from L2ARC
#12689 Check l2cache vdevs pending list inside the vdev_inuse()
#12735 Enable edonr in FreeBSD
#12743 FreeBSD: fix world build after de198f2
#12745 Restore dirty dnode detection logic

Obtained from: OpenZFS
OpenZFS commit: 269b5dadcfd1d5732cf763dddcd46009a332eae4


# 6ba2210e 21-Oct-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12392 Avoid panic in case of pool errors and missing L2ARC
#12448 skip snapshot in zfs_iter_mounted()
#12516 Fix NFS and large reads on older kernels
#12533 Fail invalid incremental recursive send gracefully
#12569 FreeBSD: Really zero the zero page
#12575 Reject zfs send -RI with nonexistent fromsnap
#12602 Correct refcount_add in dmu_zfetch
#12650 zpool should call zfs_nicestrtonum() with non-NULL handle

Obtained from: OpenZFS
OpenZFS commit: ec64fdb93d144ab1884097cfd36e18b62a2db848


# 53b70c86 15-Sep-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4a1195ca5 (master) into main

Notable upstream pull request merges:
#11312 Temporarily use root credentials to mount snapshots in .zfs
#12246 arc: Drop an incorrect assert
#12443 Fixed data integrity issue when underlying disk returns error
to zfs
#12522 Compressed receive with different ashift can result in incorrect
PSIZE on disk
#12535 Verify embedded blkptr's in arc_read()
#12541 Allow sending corrupt snapshots even if metadata is corrupted

Obtained from: OpenZFS
OpenZFS commit: 4a1195ca5041cbff2a6b025a31937fef84876c52


# 2faf504d 17-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@8ae86e2ed (master) into main

Notable upstream pull request merges:
#12422 Fix/improve dbuf hits accounting
#12406 Increase default volblocksize from 8KB to 16KB
#12398 Remove b_pabd/b_rabd allocation from arc_hdr_alloc()
#12397 Run arc_evict thread at higher priority
#12297 Avoid vq_lock drop in vdev_queue_aggregate()
#12161 Restore FreeBSD sysctl processing for arc.min and arc.max

Obtained from: OpenZFS
OpenZFS commit: 8ae86e2edc736483c1530fd689525aa2460eaec8


# 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


# 2617128a 30-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4694131a0 (master) into main

Notable upstream pull request merges:
#12253 module/zfs: simplify ddt_stat_add() loop
#12288 Avoid 64bit division in multilist index functions

Obtained from: OpenZFS
OpenZFS commit: 4694131a0a05b6db2727c9801f9729b9378d3064


# 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


# 0d8fe237 20-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12054 Avoid deadlock when removing L2ARC devices under I/O
#12172 Use wmsum for arc, abd, dbuf and zfetch statistics
#12221 vdev_draid_min_asize() ignores reserved space

Obtained from: OpenZFS
OpenZFS commit: c4c162c1e8ff9ce8833014711875d18df520096c


# 3ff01b23 12-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12149: Multiple man-pages: Move to appropriate section
#12158: Re-embed multilist_t storage
#12191: Convert non-libzpool libraries to -fvisibility=hidden
#12196: Unify manpage makefiles, move pages to better sexions, ...
#12210: libzutil: import filtering optimisation
#12212: Remove pool io kstats

Obtained from: OpenZFS
OpenZFS commit: afa7b3484556d3ae610a34582ce5ebd2c3e27bba


# 16038816 08-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@75b4cbf62 (master) into main

Notable upstream pull request merges:
#11710 Allow zfs to send replication streams with missing snapshots
#11751 Avoid taking global lock to destroy zfsdev state
#11786 Ratelimit deadman zevents as with delay zevents
#11803 ZFS traverse_visitbp optimization to limit prefetch
#11813 Allow pool names that look like Solaris disk names
#11822 Atomically check and set dropped zevent count
#11822 Don't scale zfs_zevent_len_max by CPU count
#11833 Refactor zfsdev state init/destroy to share common code
#11837 zfs get -p only outputs 3 columns if "clones" property is empty
#11843 libzutil: zfs_isnumber(): return false if input empty
#11849 Use dsl_scan_setup_check() to setup a scrub
#11861 Improvements to the 'compatibility' property
#11862 cmd/zfs receive: allow dry-run (-n) to check property args
#11864 receive: don't fail inheriting (-x) properties on wrong dataset type
#11877 Combine zio caches if possible
#11881 FreeBSD: use vnlru_free_vfsops if available
#11883 FreeBSD: add support for lockless symlink lookup
#11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr
#11896 Fix crash in zio_done error reporting
#11905 zfs-send(8): Restore sorting of flags
#11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir
#11930 vdev_mirror: don't scrub/resilver devices that can't be read
#11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines
#11955 zfs get: don't lookup mount options when using "-s local"
#11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl
#11959 vdev_id: variable not getting expanded under map_slot()
#11966 Scale worker threads and taskqs with number of CPUs
#11994 Clean up use of zfs_log_create in zfs_dir
#11997 FreeBSD: Don't force xattr mount option
#11997 FreeBSD: Implement xattr=sa
#11997 FreeBSD: Use SET_ERROR to trace xattr name errors
#11998 Simplify/fix dnode_move() for dn_zfetch
#12003 FreeBSD: Initialize/destroy zp->z_lock
#12010 Fix dRAID self-healing short columns
#12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots"
#12040 Reinstate the old zpool read label logic as a fallback
#12046 Improve scrub maxinflight_bytes math
#12049 FreeBSD: avoid memory allocation in arc_prune_async
#12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI
#12061 Fix dRAID sequential resilver silent damage handling
#12072 Let zfs diff be more permissive
#12077 FreeBSD: Retry OCF ENOMEM errors.
#12088 Propagate vdev state due to invalid label corruption
#12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat
#12097 FreeBSD: Update dataset_kstats for zvols in dev mode
#12104 FreeBSD boot code reminder after zpool upgrade
#12114 Introduce write-mostly sums

Obtained from: OpenZFS
OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3


# 6db169e9 13-Apr-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@3522f57b6 (master)

Notable upstream pull request merges:
#11742 When specifying raidz vdev name, parity count should match
#11744 Use a helper function to clarify gang block size
#11771 Support running FreeBSD buildworld on Arm-based macOS hosts

This is the last update that will be MFCed into stable/13.

From now on, the tracking of OpenZFS branches will be different:
- main continues tracking openzfs/zfs/master
- stable/13 is going to track openzfs/zfs/zfs-2.1-release

Obtained from: OpenZFS
MFC after: 1 week


# ba27dd8b 21-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9312e0fd1

Notable upstream changes:
778869fa1 Fix reporting of mount progress
e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD
03e02e5b5 Fix checksum errors not being counted on repeated repair
64e0fe14f Restore FreeBSD resource usage accounting
11f2e9a49 Fix panic if scrubbing after removing a slog device

MFC after: 2 weeks


# 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


# 5dce0384 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: Avoid updating the L2ARC device header unnecessarily

From openzfs-master 0ae184a6b commit message:
If we do not write any buffers to the cache device and the evict hand
has not advanced do not update the cache device header.

Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58
Patch Author: George Amanakis <gamanakis@gmail.com>

MFC after: 3 days
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D28682

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

OpenZFS: Fix issues caused by reversed commits + rebase

# 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
...

# 5596f836 14-Nov-2020 Mateusz Guzik <mjg@FreeBSD.org>

zfs: disable periodic arc updates

They are only there to provide less innacurate statistics for debuggers.
However, this is quite heavy-weight and instead it would be better to
teach debuggers how to obtain the necessary information.

# 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


# 2c48331d 18-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

MFV 2.0-rc2

- Fixes divide by zero for unusual hz
- remove cryptodev dependency


# eac7052f 04-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-gfd20a8

- fixes jail delegation
- fixes raw kstat unsupported complaints
- exposes dbgmsg, dbuf, and checksum benchmark stats
- restore rename -u support


# ac0bf12e 28-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-ga00c61


# 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


# dae17134 17-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@269b5dadc (master) into main

Notable upstream pull request merges:
#12285 Introduce a tunable to exclude special class buffers from L2ARC
#12689 Check l2cache vdevs pending list inside the vdev_inuse()
#12735 Enable edonr in FreeBSD
#12743 FreeBSD: fix world build after de198f2
#12745 Restore dirty dnode detection logic

Obtained from: OpenZFS
OpenZFS commit: 269b5dadcfd1d5732cf763dddcd46009a332eae4


# 6ba2210e 21-Oct-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12392 Avoid panic in case of pool errors and missing L2ARC
#12448 skip snapshot in zfs_iter_mounted()
#12516 Fix NFS and large reads on older kernels
#12533 Fail invalid incremental recursive send gracefully
#12569 FreeBSD: Really zero the zero page
#12575 Reject zfs send -RI with nonexistent fromsnap
#12602 Correct refcount_add in dmu_zfetch
#12650 zpool should call zfs_nicestrtonum() with non-NULL handle

Obtained from: OpenZFS
OpenZFS commit: ec64fdb93d144ab1884097cfd36e18b62a2db848


# 53b70c86 15-Sep-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4a1195ca5 (master) into main

Notable upstream pull request merges:
#11312 Temporarily use root credentials to mount snapshots in .zfs
#12246 arc: Drop an incorrect assert
#12443 Fixed data integrity issue when underlying disk returns error
to zfs
#12522 Compressed receive with different ashift can result in incorrect
PSIZE on disk
#12535 Verify embedded blkptr's in arc_read()
#12541 Allow sending corrupt snapshots even if metadata is corrupted

Obtained from: OpenZFS
OpenZFS commit: 4a1195ca5041cbff2a6b025a31937fef84876c52


# 2faf504d 17-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@8ae86e2ed (master) into main

Notable upstream pull request merges:
#12422 Fix/improve dbuf hits accounting
#12406 Increase default volblocksize from 8KB to 16KB
#12398 Remove b_pabd/b_rabd allocation from arc_hdr_alloc()
#12397 Run arc_evict thread at higher priority
#12297 Avoid vq_lock drop in vdev_queue_aggregate()
#12161 Restore FreeBSD sysctl processing for arc.min and arc.max

Obtained from: OpenZFS
OpenZFS commit: 8ae86e2edc736483c1530fd689525aa2460eaec8


# 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


# 2617128a 30-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4694131a0 (master) into main

Notable upstream pull request merges:
#12253 module/zfs: simplify ddt_stat_add() loop
#12288 Avoid 64bit division in multilist index functions

Obtained from: OpenZFS
OpenZFS commit: 4694131a0a05b6db2727c9801f9729b9378d3064


# 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


# 0d8fe237 20-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12054 Avoid deadlock when removing L2ARC devices under I/O
#12172 Use wmsum for arc, abd, dbuf and zfetch statistics
#12221 vdev_draid_min_asize() ignores reserved space

Obtained from: OpenZFS
OpenZFS commit: c4c162c1e8ff9ce8833014711875d18df520096c


# 3ff01b23 12-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12149: Multiple man-pages: Move to appropriate section
#12158: Re-embed multilist_t storage
#12191: Convert non-libzpool libraries to -fvisibility=hidden
#12196: Unify manpage makefiles, move pages to better sexions, ...
#12210: libzutil: import filtering optimisation
#12212: Remove pool io kstats

Obtained from: OpenZFS
OpenZFS commit: afa7b3484556d3ae610a34582ce5ebd2c3e27bba


# 16038816 08-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@75b4cbf62 (master) into main

Notable upstream pull request merges:
#11710 Allow zfs to send replication streams with missing snapshots
#11751 Avoid taking global lock to destroy zfsdev state
#11786 Ratelimit deadman zevents as with delay zevents
#11803 ZFS traverse_visitbp optimization to limit prefetch
#11813 Allow pool names that look like Solaris disk names
#11822 Atomically check and set dropped zevent count
#11822 Don't scale zfs_zevent_len_max by CPU count
#11833 Refactor zfsdev state init/destroy to share common code
#11837 zfs get -p only outputs 3 columns if "clones" property is empty
#11843 libzutil: zfs_isnumber(): return false if input empty
#11849 Use dsl_scan_setup_check() to setup a scrub
#11861 Improvements to the 'compatibility' property
#11862 cmd/zfs receive: allow dry-run (-n) to check property args
#11864 receive: don't fail inheriting (-x) properties on wrong dataset type
#11877 Combine zio caches if possible
#11881 FreeBSD: use vnlru_free_vfsops if available
#11883 FreeBSD: add support for lockless symlink lookup
#11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr
#11896 Fix crash in zio_done error reporting
#11905 zfs-send(8): Restore sorting of flags
#11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir
#11930 vdev_mirror: don't scrub/resilver devices that can't be read
#11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines
#11955 zfs get: don't lookup mount options when using "-s local"
#11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl
#11959 vdev_id: variable not getting expanded under map_slot()
#11966 Scale worker threads and taskqs with number of CPUs
#11994 Clean up use of zfs_log_create in zfs_dir
#11997 FreeBSD: Don't force xattr mount option
#11997 FreeBSD: Implement xattr=sa
#11997 FreeBSD: Use SET_ERROR to trace xattr name errors
#11998 Simplify/fix dnode_move() for dn_zfetch
#12003 FreeBSD: Initialize/destroy zp->z_lock
#12010 Fix dRAID self-healing short columns
#12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots"
#12040 Reinstate the old zpool read label logic as a fallback
#12046 Improve scrub maxinflight_bytes math
#12049 FreeBSD: avoid memory allocation in arc_prune_async
#12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI
#12061 Fix dRAID sequential resilver silent damage handling
#12072 Let zfs diff be more permissive
#12077 FreeBSD: Retry OCF ENOMEM errors.
#12088 Propagate vdev state due to invalid label corruption
#12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat
#12097 FreeBSD: Update dataset_kstats for zvols in dev mode
#12104 FreeBSD boot code reminder after zpool upgrade
#12114 Introduce write-mostly sums

Obtained from: OpenZFS
OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3


# 6db169e9 13-Apr-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@3522f57b6 (master)

Notable upstream pull request merges:
#11742 When specifying raidz vdev name, parity count should match
#11744 Use a helper function to clarify gang block size
#11771 Support running FreeBSD buildworld on Arm-based macOS hosts

This is the last update that will be MFCed into stable/13.

From now on, the tracking of OpenZFS branches will be different:
- main continues tracking openzfs/zfs/master
- stable/13 is going to track openzfs/zfs/zfs-2.1-release

Obtained from: OpenZFS
MFC after: 1 week


# ba27dd8b 21-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9312e0fd1

Notable upstream changes:
778869fa1 Fix reporting of mount progress
e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD
03e02e5b5 Fix checksum errors not being counted on repeated repair
64e0fe14f Restore FreeBSD resource usage accounting
11f2e9a49 Fix panic if scrubbing after removing a slog device

MFC after: 2 weeks


# 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


# 5dce0384 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: Avoid updating the L2ARC device header unnecessarily

From openzfs-master 0ae184a6b commit message:
If we do not write any buffers to the cache device and the evict hand
has not advanced do not update the cache device header.

Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58
Patch Author: George Amanakis <gamanakis@gmail.com>

MFC after: 3 days
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D28682

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

OpenZFS: Fix issues caused by reversed commits + rebase

# 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
...

# 5596f836 14-Nov-2020 Mateusz Guzik <mjg@FreeBSD.org>

zfs: disable periodic arc updates

They are only there to provide less innacurate statistics for debuggers.
However, this is quite heavy-weight and instead it would be better to
teach debuggers how to obtain the necessary information.

# 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


# 2c48331d 18-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

MFV 2.0-rc2

- Fixes divide by zero for unusual hz
- remove cryptodev dependency


# eac7052f 04-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-gfd20a8

- fixes jail delegation
- fixes raw kstat unsupported complaints
- exposes dbgmsg, dbuf, and checksum benchmark stats
- restore rename -u support


# ac0bf12e 28-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-ga00c61


# 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


# dae17134 17-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@269b5dadc (master) into main

Notable upstream pull request merges:
#12285 Introduce a tunable to exclude special class buffers from L2ARC
#12689 Check l2cache vdevs pending list inside the vdev_inuse()
#12735 Enable edonr in FreeBSD
#12743 FreeBSD: fix world build after de198f2
#12745 Restore dirty dnode detection logic

Obtained from: OpenZFS
OpenZFS commit: 269b5dadcfd1d5732cf763dddcd46009a332eae4


# 6ba2210e 21-Oct-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12392 Avoid panic in case of pool errors and missing L2ARC
#12448 skip snapshot in zfs_iter_mounted()
#12516 Fix NFS and large reads on older kernels
#12533 Fail invalid incremental recursive send gracefully
#12569 FreeBSD: Really zero the zero page
#12575 Reject zfs send -RI with nonexistent fromsnap
#12602 Correct refcount_add in dmu_zfetch
#12650 zpool should call zfs_nicestrtonum() with non-NULL handle

Obtained from: OpenZFS
OpenZFS commit: ec64fdb93d144ab1884097cfd36e18b62a2db848


# 53b70c86 15-Sep-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4a1195ca5 (master) into main

Notable upstream pull request merges:
#11312 Temporarily use root credentials to mount snapshots in .zfs
#12246 arc: Drop an incorrect assert
#12443 Fixed data integrity issue when underlying disk returns error
to zfs
#12522 Compressed receive with different ashift can result in incorrect
PSIZE on disk
#12535 Verify embedded blkptr's in arc_read()
#12541 Allow sending corrupt snapshots even if metadata is corrupted

Obtained from: OpenZFS
OpenZFS commit: 4a1195ca5041cbff2a6b025a31937fef84876c52


# 2faf504d 17-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@8ae86e2ed (master) into main

Notable upstream pull request merges:
#12422 Fix/improve dbuf hits accounting
#12406 Increase default volblocksize from 8KB to 16KB
#12398 Remove b_pabd/b_rabd allocation from arc_hdr_alloc()
#12397 Run arc_evict thread at higher priority
#12297 Avoid vq_lock drop in vdev_queue_aggregate()
#12161 Restore FreeBSD sysctl processing for arc.min and arc.max

Obtained from: OpenZFS
OpenZFS commit: 8ae86e2edc736483c1530fd689525aa2460eaec8


# 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


# 2617128a 30-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4694131a0 (master) into main

Notable upstream pull request merges:
#12253 module/zfs: simplify ddt_stat_add() loop
#12288 Avoid 64bit division in multilist index functions

Obtained from: OpenZFS
OpenZFS commit: 4694131a0a05b6db2727c9801f9729b9378d3064


# 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


# 0d8fe237 20-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12054 Avoid deadlock when removing L2ARC devices under I/O
#12172 Use wmsum for arc, abd, dbuf and zfetch statistics
#12221 vdev_draid_min_asize() ignores reserved space

Obtained from: OpenZFS
OpenZFS commit: c4c162c1e8ff9ce8833014711875d18df520096c


# 3ff01b23 12-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12149: Multiple man-pages: Move to appropriate section
#12158: Re-embed multilist_t storage
#12191: Convert non-libzpool libraries to -fvisibility=hidden
#12196: Unify manpage makefiles, move pages to better sexions, ...
#12210: libzutil: import filtering optimisation
#12212: Remove pool io kstats

Obtained from: OpenZFS
OpenZFS commit: afa7b3484556d3ae610a34582ce5ebd2c3e27bba


# 16038816 08-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@75b4cbf62 (master) into main

Notable upstream pull request merges:
#11710 Allow zfs to send replication streams with missing snapshots
#11751 Avoid taking global lock to destroy zfsdev state
#11786 Ratelimit deadman zevents as with delay zevents
#11803 ZFS traverse_visitbp optimization to limit prefetch
#11813 Allow pool names that look like Solaris disk names
#11822 Atomically check and set dropped zevent count
#11822 Don't scale zfs_zevent_len_max by CPU count
#11833 Refactor zfsdev state init/destroy to share common code
#11837 zfs get -p only outputs 3 columns if "clones" property is empty
#11843 libzutil: zfs_isnumber(): return false if input empty
#11849 Use dsl_scan_setup_check() to setup a scrub
#11861 Improvements to the 'compatibility' property
#11862 cmd/zfs receive: allow dry-run (-n) to check property args
#11864 receive: don't fail inheriting (-x) properties on wrong dataset type
#11877 Combine zio caches if possible
#11881 FreeBSD: use vnlru_free_vfsops if available
#11883 FreeBSD: add support for lockless symlink lookup
#11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr
#11896 Fix crash in zio_done error reporting
#11905 zfs-send(8): Restore sorting of flags
#11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir
#11930 vdev_mirror: don't scrub/resilver devices that can't be read
#11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines
#11955 zfs get: don't lookup mount options when using "-s local"
#11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl
#11959 vdev_id: variable not getting expanded under map_slot()
#11966 Scale worker threads and taskqs with number of CPUs
#11994 Clean up use of zfs_log_create in zfs_dir
#11997 FreeBSD: Don't force xattr mount option
#11997 FreeBSD: Implement xattr=sa
#11997 FreeBSD: Use SET_ERROR to trace xattr name errors
#11998 Simplify/fix dnode_move() for dn_zfetch
#12003 FreeBSD: Initialize/destroy zp->z_lock
#12010 Fix dRAID self-healing short columns
#12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots"
#12040 Reinstate the old zpool read label logic as a fallback
#12046 Improve scrub maxinflight_bytes math
#12049 FreeBSD: avoid memory allocation in arc_prune_async
#12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI
#12061 Fix dRAID sequential resilver silent damage handling
#12072 Let zfs diff be more permissive
#12077 FreeBSD: Retry OCF ENOMEM errors.
#12088 Propagate vdev state due to invalid label corruption
#12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat
#12097 FreeBSD: Update dataset_kstats for zvols in dev mode
#12104 FreeBSD boot code reminder after zpool upgrade
#12114 Introduce write-mostly sums

Obtained from: OpenZFS
OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3


# 6db169e9 13-Apr-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@3522f57b6 (master)

Notable upstream pull request merges:
#11742 When specifying raidz vdev name, parity count should match
#11744 Use a helper function to clarify gang block size
#11771 Support running FreeBSD buildworld on Arm-based macOS hosts

This is the last update that will be MFCed into stable/13.

From now on, the tracking of OpenZFS branches will be different:
- main continues tracking openzfs/zfs/master
- stable/13 is going to track openzfs/zfs/zfs-2.1-release

Obtained from: OpenZFS
MFC after: 1 week


# ba27dd8b 21-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9312e0fd1

Notable upstream changes:
778869fa1 Fix reporting of mount progress
e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD
03e02e5b5 Fix checksum errors not being counted on repeated repair
64e0fe14f Restore FreeBSD resource usage accounting
11f2e9a49 Fix panic if scrubbing after removing a slog device

MFC after: 2 weeks


# 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


# 5dce0384 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: Avoid updating the L2ARC device header unnecessarily

From openzfs-master 0ae184a6b commit message:
If we do not write any buffers to the cache device and the evict hand
has not advanced do not update the cache device header.

Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58
Patch Author: George Amanakis <gamanakis@gmail.com>

MFC after: 3 days
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D28682

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

OpenZFS: Fix issues caused by reversed commits + rebase

# 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
...

# 5596f836 14-Nov-2020 Mateusz Guzik <mjg@FreeBSD.org>

zfs: disable periodic arc updates

They are only there to provide less innacurate statistics for debuggers.
However, this is quite heavy-weight and instead it would be better to
teach debuggers how to obtain the necessary information.

# 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


# 2c48331d 18-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

MFV 2.0-rc2

- Fixes divide by zero for unusual hz
- remove cryptodev dependency


# eac7052f 04-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-gfd20a8

- fixes jail delegation
- fixes raw kstat unsupported complaints
- exposes dbgmsg, dbuf, and checksum benchmark stats
- restore rename -u support


# ac0bf12e 28-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-ga00c61


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

Initial import from vendor-sys branch of openzfs


# dae17134 17-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@269b5dadc (master) into main

Notable upstream pull request merges:
#12285 Introduce a tunable to exclude special class buffers from L2ARC
#12689 Check l2cache vdevs pending list inside the vdev_inuse()
#12735 Enable edonr in FreeBSD
#12743 FreeBSD: fix world build after de198f2
#12745 Restore dirty dnode detection logic

Obtained from: OpenZFS
OpenZFS commit: 269b5dadcfd1d5732cf763dddcd46009a332eae4


# 6ba2210e 21-Oct-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12392 Avoid panic in case of pool errors and missing L2ARC
#12448 skip snapshot in zfs_iter_mounted()
#12516 Fix NFS and large reads on older kernels
#12533 Fail invalid incremental recursive send gracefully
#12569 FreeBSD: Really zero the zero page
#12575 Reject zfs send -RI with nonexistent fromsnap
#12602 Correct refcount_add in dmu_zfetch
#12650 zpool should call zfs_nicestrtonum() with non-NULL handle

Obtained from: OpenZFS
OpenZFS commit: ec64fdb93d144ab1884097cfd36e18b62a2db848


# 53b70c86 15-Sep-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4a1195ca5 (master) into main

Notable upstream pull request merges:
#11312 Temporarily use root credentials to mount snapshots in .zfs
#12246 arc: Drop an incorrect assert
#12443 Fixed data integrity issue when underlying disk returns error
to zfs
#12522 Compressed receive with different ashift can result in incorrect
PSIZE on disk
#12535 Verify embedded blkptr's in arc_read()
#12541 Allow sending corrupt snapshots even if metadata is corrupted

Obtained from: OpenZFS
OpenZFS commit: 4a1195ca5041cbff2a6b025a31937fef84876c52


# 2faf504d 17-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@8ae86e2ed (master) into main

Notable upstream pull request merges:
#12422 Fix/improve dbuf hits accounting
#12406 Increase default volblocksize from 8KB to 16KB
#12398 Remove b_pabd/b_rabd allocation from arc_hdr_alloc()
#12397 Run arc_evict thread at higher priority
#12297 Avoid vq_lock drop in vdev_queue_aggregate()
#12161 Restore FreeBSD sysctl processing for arc.min and arc.max

Obtained from: OpenZFS
OpenZFS commit: 8ae86e2edc736483c1530fd689525aa2460eaec8


# 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


# 2617128a 30-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4694131a0 (master) into main

Notable upstream pull request merges:
#12253 module/zfs: simplify ddt_stat_add() loop
#12288 Avoid 64bit division in multilist index functions

Obtained from: OpenZFS
OpenZFS commit: 4694131a0a05b6db2727c9801f9729b9378d3064


# 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


# 0d8fe237 20-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12054 Avoid deadlock when removing L2ARC devices under I/O
#12172 Use wmsum for arc, abd, dbuf and zfetch statistics
#12221 vdev_draid_min_asize() ignores reserved space

Obtained from: OpenZFS
OpenZFS commit: c4c162c1e8ff9ce8833014711875d18df520096c


# 3ff01b23 12-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12149: Multiple man-pages: Move to appropriate section
#12158: Re-embed multilist_t storage
#12191: Convert non-libzpool libraries to -fvisibility=hidden
#12196: Unify manpage makefiles, move pages to better sexions, ...
#12210: libzutil: import filtering optimisation
#12212: Remove pool io kstats

Obtained from: OpenZFS
OpenZFS commit: afa7b3484556d3ae610a34582ce5ebd2c3e27bba


# 16038816 08-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@75b4cbf62 (master) into main

Notable upstream pull request merges:
#11710 Allow zfs to send replication streams with missing snapshots
#11751 Avoid taking global lock to destroy zfsdev state
#11786 Ratelimit deadman zevents as with delay zevents
#11803 ZFS traverse_visitbp optimization to limit prefetch
#11813 Allow pool names that look like Solaris disk names
#11822 Atomically check and set dropped zevent count
#11822 Don't scale zfs_zevent_len_max by CPU count
#11833 Refactor zfsdev state init/destroy to share common code
#11837 zfs get -p only outputs 3 columns if "clones" property is empty
#11843 libzutil: zfs_isnumber(): return false if input empty
#11849 Use dsl_scan_setup_check() to setup a scrub
#11861 Improvements to the 'compatibility' property
#11862 cmd/zfs receive: allow dry-run (-n) to check property args
#11864 receive: don't fail inheriting (-x) properties on wrong dataset type
#11877 Combine zio caches if possible
#11881 FreeBSD: use vnlru_free_vfsops if available
#11883 FreeBSD: add support for lockless symlink lookup
#11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr
#11896 Fix crash in zio_done error reporting
#11905 zfs-send(8): Restore sorting of flags
#11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir
#11930 vdev_mirror: don't scrub/resilver devices that can't be read
#11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines
#11955 zfs get: don't lookup mount options when using "-s local"
#11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl
#11959 vdev_id: variable not getting expanded under map_slot()
#11966 Scale worker threads and taskqs with number of CPUs
#11994 Clean up use of zfs_log_create in zfs_dir
#11997 FreeBSD: Don't force xattr mount option
#11997 FreeBSD: Implement xattr=sa
#11997 FreeBSD: Use SET_ERROR to trace xattr name errors
#11998 Simplify/fix dnode_move() for dn_zfetch
#12003 FreeBSD: Initialize/destroy zp->z_lock
#12010 Fix dRAID self-healing short columns
#12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots"
#12040 Reinstate the old zpool read label logic as a fallback
#12046 Improve scrub maxinflight_bytes math
#12049 FreeBSD: avoid memory allocation in arc_prune_async
#12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI
#12061 Fix dRAID sequential resilver silent damage handling
#12072 Let zfs diff be more permissive
#12077 FreeBSD: Retry OCF ENOMEM errors.
#12088 Propagate vdev state due to invalid label corruption
#12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat
#12097 FreeBSD: Update dataset_kstats for zvols in dev mode
#12104 FreeBSD boot code reminder after zpool upgrade
#12114 Introduce write-mostly sums

Obtained from: OpenZFS
OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3


# 6db169e9 13-Apr-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@3522f57b6 (master)

Notable upstream pull request merges:
#11742 When specifying raidz vdev name, parity count should match
#11744 Use a helper function to clarify gang block size
#11771 Support running FreeBSD buildworld on Arm-based macOS hosts

This is the last update that will be MFCed into stable/13.

From now on, the tracking of OpenZFS branches will be different:
- main continues tracking openzfs/zfs/master
- stable/13 is going to track openzfs/zfs/zfs-2.1-release

Obtained from: OpenZFS
MFC after: 1 week


# ba27dd8b 21-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9312e0fd1

Notable upstream changes:
778869fa1 Fix reporting of mount progress
e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD
03e02e5b5 Fix checksum errors not being counted on repeated repair
64e0fe14f Restore FreeBSD resource usage accounting
11f2e9a49 Fix panic if scrubbing after removing a slog device

MFC after: 2 weeks


# 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


# 5dce0384 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: Avoid updating the L2ARC device header unnecessarily

From openzfs-master 0ae184a6b commit message:
If we do not write any buffers to the cache device and the evict hand
has not advanced do not update the cache device header.

Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58
Patch Author: George Amanakis <gamanakis@gmail.com>

MFC after: 3 days
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D28682

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

OpenZFS: Fix issues caused by reversed commits + rebase

# 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
...

# 5596f836 14-Nov-2020 Mateusz Guzik <mjg@FreeBSD.org>

zfs: disable periodic arc updates

They are only there to provide less innacurate statistics for debuggers.
However, this is quite heavy-weight and instead it would be better to
teach debuggers how to obtain the necessary information.

# 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


# 2c48331d 18-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

MFV 2.0-rc2

- Fixes divide by zero for unusual hz
- remove cryptodev dependency


# eac7052f 04-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-gfd20a8

- fixes jail delegation
- fixes raw kstat unsupported complaints
- exposes dbgmsg, dbuf, and checksum benchmark stats
- restore rename -u support


# ac0bf12e 28-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-ga00c61


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

Initial import from vendor-sys branch of openzfs


# 6ba2210e 21-Oct-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12392 Avoid panic in case of pool errors and missing L2ARC
#12448 skip snapshot in zfs_iter_mounted()
#12516 Fix NFS and large reads on older kernels
#12533 Fail invalid incremental recursive send gracefully
#12569 FreeBSD: Really zero the zero page
#12575 Reject zfs send -RI with nonexistent fromsnap
#12602 Correct refcount_add in dmu_zfetch
#12650 zpool should call zfs_nicestrtonum() with non-NULL handle

Obtained from: OpenZFS
OpenZFS commit: ec64fdb93d144ab1884097cfd36e18b62a2db848


# 53b70c86 15-Sep-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4a1195ca5 (master) into main

Notable upstream pull request merges:
#11312 Temporarily use root credentials to mount snapshots in .zfs
#12246 arc: Drop an incorrect assert
#12443 Fixed data integrity issue when underlying disk returns error
to zfs
#12522 Compressed receive with different ashift can result in incorrect
PSIZE on disk
#12535 Verify embedded blkptr's in arc_read()
#12541 Allow sending corrupt snapshots even if metadata is corrupted

Obtained from: OpenZFS
OpenZFS commit: 4a1195ca5041cbff2a6b025a31937fef84876c52


# 2faf504d 17-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@8ae86e2ed (master) into main

Notable upstream pull request merges:
#12422 Fix/improve dbuf hits accounting
#12406 Increase default volblocksize from 8KB to 16KB
#12398 Remove b_pabd/b_rabd allocation from arc_hdr_alloc()
#12397 Run arc_evict thread at higher priority
#12297 Avoid vq_lock drop in vdev_queue_aggregate()
#12161 Restore FreeBSD sysctl processing for arc.min and arc.max

Obtained from: OpenZFS
OpenZFS commit: 8ae86e2edc736483c1530fd689525aa2460eaec8


# 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


# 2617128a 30-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4694131a0 (master) into main

Notable upstream pull request merges:
#12253 module/zfs: simplify ddt_stat_add() loop
#12288 Avoid 64bit division in multilist index functions

Obtained from: OpenZFS
OpenZFS commit: 4694131a0a05b6db2727c9801f9729b9378d3064


# 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


# 0d8fe237 20-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12054 Avoid deadlock when removing L2ARC devices under I/O
#12172 Use wmsum for arc, abd, dbuf and zfetch statistics
#12221 vdev_draid_min_asize() ignores reserved space

Obtained from: OpenZFS
OpenZFS commit: c4c162c1e8ff9ce8833014711875d18df520096c


# 3ff01b23 12-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12149: Multiple man-pages: Move to appropriate section
#12158: Re-embed multilist_t storage
#12191: Convert non-libzpool libraries to -fvisibility=hidden
#12196: Unify manpage makefiles, move pages to better sexions, ...
#12210: libzutil: import filtering optimisation
#12212: Remove pool io kstats

Obtained from: OpenZFS
OpenZFS commit: afa7b3484556d3ae610a34582ce5ebd2c3e27bba


# 16038816 08-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@75b4cbf62 (master) into main

Notable upstream pull request merges:
#11710 Allow zfs to send replication streams with missing snapshots
#11751 Avoid taking global lock to destroy zfsdev state
#11786 Ratelimit deadman zevents as with delay zevents
#11803 ZFS traverse_visitbp optimization to limit prefetch
#11813 Allow pool names that look like Solaris disk names
#11822 Atomically check and set dropped zevent count
#11822 Don't scale zfs_zevent_len_max by CPU count
#11833 Refactor zfsdev state init/destroy to share common code
#11837 zfs get -p only outputs 3 columns if "clones" property is empty
#11843 libzutil: zfs_isnumber(): return false if input empty
#11849 Use dsl_scan_setup_check() to setup a scrub
#11861 Improvements to the 'compatibility' property
#11862 cmd/zfs receive: allow dry-run (-n) to check property args
#11864 receive: don't fail inheriting (-x) properties on wrong dataset type
#11877 Combine zio caches if possible
#11881 FreeBSD: use vnlru_free_vfsops if available
#11883 FreeBSD: add support for lockless symlink lookup
#11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr
#11896 Fix crash in zio_done error reporting
#11905 zfs-send(8): Restore sorting of flags
#11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir
#11930 vdev_mirror: don't scrub/resilver devices that can't be read
#11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines
#11955 zfs get: don't lookup mount options when using "-s local"
#11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl
#11959 vdev_id: variable not getting expanded under map_slot()
#11966 Scale worker threads and taskqs with number of CPUs
#11994 Clean up use of zfs_log_create in zfs_dir
#11997 FreeBSD: Don't force xattr mount option
#11997 FreeBSD: Implement xattr=sa
#11997 FreeBSD: Use SET_ERROR to trace xattr name errors
#11998 Simplify/fix dnode_move() for dn_zfetch
#12003 FreeBSD: Initialize/destroy zp->z_lock
#12010 Fix dRAID self-healing short columns
#12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots"
#12040 Reinstate the old zpool read label logic as a fallback
#12046 Improve scrub maxinflight_bytes math
#12049 FreeBSD: avoid memory allocation in arc_prune_async
#12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI
#12061 Fix dRAID sequential resilver silent damage handling
#12072 Let zfs diff be more permissive
#12077 FreeBSD: Retry OCF ENOMEM errors.
#12088 Propagate vdev state due to invalid label corruption
#12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat
#12097 FreeBSD: Update dataset_kstats for zvols in dev mode
#12104 FreeBSD boot code reminder after zpool upgrade
#12114 Introduce write-mostly sums

Obtained from: OpenZFS
OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3


# 6db169e9 13-Apr-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@3522f57b6 (master)

Notable upstream pull request merges:
#11742 When specifying raidz vdev name, parity count should match
#11744 Use a helper function to clarify gang block size
#11771 Support running FreeBSD buildworld on Arm-based macOS hosts

This is the last update that will be MFCed into stable/13.

From now on, the tracking of OpenZFS branches will be different:
- main continues tracking openzfs/zfs/master
- stable/13 is going to track openzfs/zfs/zfs-2.1-release

Obtained from: OpenZFS
MFC after: 1 week


# ba27dd8b 21-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9312e0fd1

Notable upstream changes:
778869fa1 Fix reporting of mount progress
e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD
03e02e5b5 Fix checksum errors not being counted on repeated repair
64e0fe14f Restore FreeBSD resource usage accounting
11f2e9a49 Fix panic if scrubbing after removing a slog device

MFC after: 2 weeks


# 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


# 5dce0384 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: Avoid updating the L2ARC device header unnecessarily

From openzfs-master 0ae184a6b commit message:
If we do not write any buffers to the cache device and the evict hand
has not advanced do not update the cache device header.

Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58
Patch Author: George Amanakis <gamanakis@gmail.com>

MFC after: 3 days
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D28682

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

OpenZFS: Fix issues caused by reversed commits + rebase

# 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
...

# 5596f836 14-Nov-2020 Mateusz Guzik <mjg@FreeBSD.org>

zfs: disable periodic arc updates

They are only there to provide less innacurate statistics for debuggers.
However, this is quite heavy-weight and instead it would be better to
teach debuggers how to obtain the necessary information.

# 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


# 2c48331d 18-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

MFV 2.0-rc2

- Fixes divide by zero for unusual hz
- remove cryptodev dependency


# eac7052f 04-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-gfd20a8

- fixes jail delegation
- fixes raw kstat unsupported complaints
- exposes dbgmsg, dbuf, and checksum benchmark stats
- restore rename -u support


# ac0bf12e 28-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-ga00c61


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

Initial import from vendor-sys branch of openzfs


# 53b70c86 15-Sep-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4a1195ca5 (master) into main

Notable upstream pull request merges:
#11312 Temporarily use root credentials to mount snapshots in .zfs
#12246 arc: Drop an incorrect assert
#12443 Fixed data integrity issue when underlying disk returns error
to zfs
#12522 Compressed receive with different ashift can result in incorrect
PSIZE on disk
#12535 Verify embedded blkptr's in arc_read()
#12541 Allow sending corrupt snapshots even if metadata is corrupted

Obtained from: OpenZFS
OpenZFS commit: 4a1195ca5041cbff2a6b025a31937fef84876c52


# 2faf504d 17-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@8ae86e2ed (master) into main

Notable upstream pull request merges:
#12422 Fix/improve dbuf hits accounting
#12406 Increase default volblocksize from 8KB to 16KB
#12398 Remove b_pabd/b_rabd allocation from arc_hdr_alloc()
#12397 Run arc_evict thread at higher priority
#12297 Avoid vq_lock drop in vdev_queue_aggregate()
#12161 Restore FreeBSD sysctl processing for arc.min and arc.max

Obtained from: OpenZFS
OpenZFS commit: 8ae86e2edc736483c1530fd689525aa2460eaec8


# 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


# 2617128a 30-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4694131a0 (master) into main

Notable upstream pull request merges:
#12253 module/zfs: simplify ddt_stat_add() loop
#12288 Avoid 64bit division in multilist index functions

Obtained from: OpenZFS
OpenZFS commit: 4694131a0a05b6db2727c9801f9729b9378d3064


# 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


# 0d8fe237 20-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12054 Avoid deadlock when removing L2ARC devices under I/O
#12172 Use wmsum for arc, abd, dbuf and zfetch statistics
#12221 vdev_draid_min_asize() ignores reserved space

Obtained from: OpenZFS
OpenZFS commit: c4c162c1e8ff9ce8833014711875d18df520096c


# 3ff01b23 12-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12149: Multiple man-pages: Move to appropriate section
#12158: Re-embed multilist_t storage
#12191: Convert non-libzpool libraries to -fvisibility=hidden
#12196: Unify manpage makefiles, move pages to better sexions, ...
#12210: libzutil: import filtering optimisation
#12212: Remove pool io kstats

Obtained from: OpenZFS
OpenZFS commit: afa7b3484556d3ae610a34582ce5ebd2c3e27bba


# 16038816 08-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@75b4cbf62 (master) into main

Notable upstream pull request merges:
#11710 Allow zfs to send replication streams with missing snapshots
#11751 Avoid taking global lock to destroy zfsdev state
#11786 Ratelimit deadman zevents as with delay zevents
#11803 ZFS traverse_visitbp optimization to limit prefetch
#11813 Allow pool names that look like Solaris disk names
#11822 Atomically check and set dropped zevent count
#11822 Don't scale zfs_zevent_len_max by CPU count
#11833 Refactor zfsdev state init/destroy to share common code
#11837 zfs get -p only outputs 3 columns if "clones" property is empty
#11843 libzutil: zfs_isnumber(): return false if input empty
#11849 Use dsl_scan_setup_check() to setup a scrub
#11861 Improvements to the 'compatibility' property
#11862 cmd/zfs receive: allow dry-run (-n) to check property args
#11864 receive: don't fail inheriting (-x) properties on wrong dataset type
#11877 Combine zio caches if possible
#11881 FreeBSD: use vnlru_free_vfsops if available
#11883 FreeBSD: add support for lockless symlink lookup
#11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr
#11896 Fix crash in zio_done error reporting
#11905 zfs-send(8): Restore sorting of flags
#11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir
#11930 vdev_mirror: don't scrub/resilver devices that can't be read
#11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines
#11955 zfs get: don't lookup mount options when using "-s local"
#11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl
#11959 vdev_id: variable not getting expanded under map_slot()
#11966 Scale worker threads and taskqs with number of CPUs
#11994 Clean up use of zfs_log_create in zfs_dir
#11997 FreeBSD: Don't force xattr mount option
#11997 FreeBSD: Implement xattr=sa
#11997 FreeBSD: Use SET_ERROR to trace xattr name errors
#11998 Simplify/fix dnode_move() for dn_zfetch
#12003 FreeBSD: Initialize/destroy zp->z_lock
#12010 Fix dRAID self-healing short columns
#12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots"
#12040 Reinstate the old zpool read label logic as a fallback
#12046 Improve scrub maxinflight_bytes math
#12049 FreeBSD: avoid memory allocation in arc_prune_async
#12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI
#12061 Fix dRAID sequential resilver silent damage handling
#12072 Let zfs diff be more permissive
#12077 FreeBSD: Retry OCF ENOMEM errors.
#12088 Propagate vdev state due to invalid label corruption
#12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat
#12097 FreeBSD: Update dataset_kstats for zvols in dev mode
#12104 FreeBSD boot code reminder after zpool upgrade
#12114 Introduce write-mostly sums

Obtained from: OpenZFS
OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3


# 6db169e9 13-Apr-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@3522f57b6 (master)

Notable upstream pull request merges:
#11742 When specifying raidz vdev name, parity count should match
#11744 Use a helper function to clarify gang block size
#11771 Support running FreeBSD buildworld on Arm-based macOS hosts

This is the last update that will be MFCed into stable/13.

From now on, the tracking of OpenZFS branches will be different:
- main continues tracking openzfs/zfs/master
- stable/13 is going to track openzfs/zfs/zfs-2.1-release

Obtained from: OpenZFS
MFC after: 1 week


# ba27dd8b 21-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9312e0fd1

Notable upstream changes:
778869fa1 Fix reporting of mount progress
e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD
03e02e5b5 Fix checksum errors not being counted on repeated repair
64e0fe14f Restore FreeBSD resource usage accounting
11f2e9a49 Fix panic if scrubbing after removing a slog device

MFC after: 2 weeks


# 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


# 5dce0384 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: Avoid updating the L2ARC device header unnecessarily

From openzfs-master 0ae184a6b commit message:
If we do not write any buffers to the cache device and the evict hand
has not advanced do not update the cache device header.

Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58
Patch Author: George Amanakis <gamanakis@gmail.com>

MFC after: 3 days
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D28682

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

OpenZFS: Fix issues caused by reversed commits + rebase

# 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
...

# 5596f836 14-Nov-2020 Mateusz Guzik <mjg@FreeBSD.org>

zfs: disable periodic arc updates

They are only there to provide less innacurate statistics for debuggers.
However, this is quite heavy-weight and instead it would be better to
teach debuggers how to obtain the necessary information.

# 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


# 2c48331d 18-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

MFV 2.0-rc2

- Fixes divide by zero for unusual hz
- remove cryptodev dependency


# eac7052f 04-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-gfd20a8

- fixes jail delegation
- fixes raw kstat unsupported complaints
- exposes dbgmsg, dbuf, and checksum benchmark stats
- restore rename -u support


# ac0bf12e 28-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-ga00c61


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

Initial import from vendor-sys branch of openzfs


# 2faf504d 17-Aug-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@8ae86e2ed (master) into main

Notable upstream pull request merges:
#12422 Fix/improve dbuf hits accounting
#12406 Increase default volblocksize from 8KB to 16KB
#12398 Remove b_pabd/b_rabd allocation from arc_hdr_alloc()
#12397 Run arc_evict thread at higher priority
#12297 Avoid vq_lock drop in vdev_queue_aggregate()
#12161 Restore FreeBSD sysctl processing for arc.min and arc.max

Obtained from: OpenZFS
OpenZFS commit: 8ae86e2edc736483c1530fd689525aa2460eaec8


# 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


# 2617128a 30-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4694131a0 (master) into main

Notable upstream pull request merges:
#12253 module/zfs: simplify ddt_stat_add() loop
#12288 Avoid 64bit division in multilist index functions

Obtained from: OpenZFS
OpenZFS commit: 4694131a0a05b6db2727c9801f9729b9378d3064


# 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


# 0d8fe237 20-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12054 Avoid deadlock when removing L2ARC devices under I/O
#12172 Use wmsum for arc, abd, dbuf and zfetch statistics
#12221 vdev_draid_min_asize() ignores reserved space

Obtained from: OpenZFS
OpenZFS commit: c4c162c1e8ff9ce8833014711875d18df520096c


# 3ff01b23 12-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12149: Multiple man-pages: Move to appropriate section
#12158: Re-embed multilist_t storage
#12191: Convert non-libzpool libraries to -fvisibility=hidden
#12196: Unify manpage makefiles, move pages to better sexions, ...
#12210: libzutil: import filtering optimisation
#12212: Remove pool io kstats

Obtained from: OpenZFS
OpenZFS commit: afa7b3484556d3ae610a34582ce5ebd2c3e27bba


# 16038816 08-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@75b4cbf62 (master) into main

Notable upstream pull request merges:
#11710 Allow zfs to send replication streams with missing snapshots
#11751 Avoid taking global lock to destroy zfsdev state
#11786 Ratelimit deadman zevents as with delay zevents
#11803 ZFS traverse_visitbp optimization to limit prefetch
#11813 Allow pool names that look like Solaris disk names
#11822 Atomically check and set dropped zevent count
#11822 Don't scale zfs_zevent_len_max by CPU count
#11833 Refactor zfsdev state init/destroy to share common code
#11837 zfs get -p only outputs 3 columns if "clones" property is empty
#11843 libzutil: zfs_isnumber(): return false if input empty
#11849 Use dsl_scan_setup_check() to setup a scrub
#11861 Improvements to the 'compatibility' property
#11862 cmd/zfs receive: allow dry-run (-n) to check property args
#11864 receive: don't fail inheriting (-x) properties on wrong dataset type
#11877 Combine zio caches if possible
#11881 FreeBSD: use vnlru_free_vfsops if available
#11883 FreeBSD: add support for lockless symlink lookup
#11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr
#11896 Fix crash in zio_done error reporting
#11905 zfs-send(8): Restore sorting of flags
#11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir
#11930 vdev_mirror: don't scrub/resilver devices that can't be read
#11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines
#11955 zfs get: don't lookup mount options when using "-s local"
#11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl
#11959 vdev_id: variable not getting expanded under map_slot()
#11966 Scale worker threads and taskqs with number of CPUs
#11994 Clean up use of zfs_log_create in zfs_dir
#11997 FreeBSD: Don't force xattr mount option
#11997 FreeBSD: Implement xattr=sa
#11997 FreeBSD: Use SET_ERROR to trace xattr name errors
#11998 Simplify/fix dnode_move() for dn_zfetch
#12003 FreeBSD: Initialize/destroy zp->z_lock
#12010 Fix dRAID self-healing short columns
#12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots"
#12040 Reinstate the old zpool read label logic as a fallback
#12046 Improve scrub maxinflight_bytes math
#12049 FreeBSD: avoid memory allocation in arc_prune_async
#12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI
#12061 Fix dRAID sequential resilver silent damage handling
#12072 Let zfs diff be more permissive
#12077 FreeBSD: Retry OCF ENOMEM errors.
#12088 Propagate vdev state due to invalid label corruption
#12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat
#12097 FreeBSD: Update dataset_kstats for zvols in dev mode
#12104 FreeBSD boot code reminder after zpool upgrade
#12114 Introduce write-mostly sums

Obtained from: OpenZFS
OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3


# 6db169e9 13-Apr-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@3522f57b6 (master)

Notable upstream pull request merges:
#11742 When specifying raidz vdev name, parity count should match
#11744 Use a helper function to clarify gang block size
#11771 Support running FreeBSD buildworld on Arm-based macOS hosts

This is the last update that will be MFCed into stable/13.

From now on, the tracking of OpenZFS branches will be different:
- main continues tracking openzfs/zfs/master
- stable/13 is going to track openzfs/zfs/zfs-2.1-release

Obtained from: OpenZFS
MFC after: 1 week


# ba27dd8b 21-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9312e0fd1

Notable upstream changes:
778869fa1 Fix reporting of mount progress
e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD
03e02e5b5 Fix checksum errors not being counted on repeated repair
64e0fe14f Restore FreeBSD resource usage accounting
11f2e9a49 Fix panic if scrubbing after removing a slog device

MFC after: 2 weeks


# 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


# 5dce0384 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: Avoid updating the L2ARC device header unnecessarily

From openzfs-master 0ae184a6b commit message:
If we do not write any buffers to the cache device and the evict hand
has not advanced do not update the cache device header.

Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58
Patch Author: George Amanakis <gamanakis@gmail.com>

MFC after: 3 days
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D28682

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

OpenZFS: Fix issues caused by reversed commits + rebase

# 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
...

# 5596f836 14-Nov-2020 Mateusz Guzik <mjg@FreeBSD.org>

zfs: disable periodic arc updates

They are only there to provide less innacurate statistics for debuggers.
However, this is quite heavy-weight and instead it would be better to
teach debuggers how to obtain the necessary information.

# 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


# 2c48331d 18-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

MFV 2.0-rc2

- Fixes divide by zero for unusual hz
- remove cryptodev dependency


# eac7052f 04-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-gfd20a8

- fixes jail delegation
- fixes raw kstat unsupported complaints
- exposes dbgmsg, dbuf, and checksum benchmark stats
- restore rename -u support


# ac0bf12e 28-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-ga00c61


# 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


# 2617128a 30-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4694131a0 (master) into main

Notable upstream pull request merges:
#12253 module/zfs: simplify ddt_stat_add() loop
#12288 Avoid 64bit division in multilist index functions

Obtained from: OpenZFS
OpenZFS commit: 4694131a0a05b6db2727c9801f9729b9378d3064


# 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


# 0d8fe237 20-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12054 Avoid deadlock when removing L2ARC devices under I/O
#12172 Use wmsum for arc, abd, dbuf and zfetch statistics
#12221 vdev_draid_min_asize() ignores reserved space

Obtained from: OpenZFS
OpenZFS commit: c4c162c1e8ff9ce8833014711875d18df520096c


# 3ff01b23 12-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12149: Multiple man-pages: Move to appropriate section
#12158: Re-embed multilist_t storage
#12191: Convert non-libzpool libraries to -fvisibility=hidden
#12196: Unify manpage makefiles, move pages to better sexions, ...
#12210: libzutil: import filtering optimisation
#12212: Remove pool io kstats

Obtained from: OpenZFS
OpenZFS commit: afa7b3484556d3ae610a34582ce5ebd2c3e27bba


# 16038816 08-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@75b4cbf62 (master) into main

Notable upstream pull request merges:
#11710 Allow zfs to send replication streams with missing snapshots
#11751 Avoid taking global lock to destroy zfsdev state
#11786 Ratelimit deadman zevents as with delay zevents
#11803 ZFS traverse_visitbp optimization to limit prefetch
#11813 Allow pool names that look like Solaris disk names
#11822 Atomically check and set dropped zevent count
#11822 Don't scale zfs_zevent_len_max by CPU count
#11833 Refactor zfsdev state init/destroy to share common code
#11837 zfs get -p only outputs 3 columns if "clones" property is empty
#11843 libzutil: zfs_isnumber(): return false if input empty
#11849 Use dsl_scan_setup_check() to setup a scrub
#11861 Improvements to the 'compatibility' property
#11862 cmd/zfs receive: allow dry-run (-n) to check property args
#11864 receive: don't fail inheriting (-x) properties on wrong dataset type
#11877 Combine zio caches if possible
#11881 FreeBSD: use vnlru_free_vfsops if available
#11883 FreeBSD: add support for lockless symlink lookup
#11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr
#11896 Fix crash in zio_done error reporting
#11905 zfs-send(8): Restore sorting of flags
#11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir
#11930 vdev_mirror: don't scrub/resilver devices that can't be read
#11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines
#11955 zfs get: don't lookup mount options when using "-s local"
#11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl
#11959 vdev_id: variable not getting expanded under map_slot()
#11966 Scale worker threads and taskqs with number of CPUs
#11994 Clean up use of zfs_log_create in zfs_dir
#11997 FreeBSD: Don't force xattr mount option
#11997 FreeBSD: Implement xattr=sa
#11997 FreeBSD: Use SET_ERROR to trace xattr name errors
#11998 Simplify/fix dnode_move() for dn_zfetch
#12003 FreeBSD: Initialize/destroy zp->z_lock
#12010 Fix dRAID self-healing short columns
#12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots"
#12040 Reinstate the old zpool read label logic as a fallback
#12046 Improve scrub maxinflight_bytes math
#12049 FreeBSD: avoid memory allocation in arc_prune_async
#12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI
#12061 Fix dRAID sequential resilver silent damage handling
#12072 Let zfs diff be more permissive
#12077 FreeBSD: Retry OCF ENOMEM errors.
#12088 Propagate vdev state due to invalid label corruption
#12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat
#12097 FreeBSD: Update dataset_kstats for zvols in dev mode
#12104 FreeBSD boot code reminder after zpool upgrade
#12114 Introduce write-mostly sums

Obtained from: OpenZFS
OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3


# 6db169e9 13-Apr-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@3522f57b6 (master)

Notable upstream pull request merges:
#11742 When specifying raidz vdev name, parity count should match
#11744 Use a helper function to clarify gang block size
#11771 Support running FreeBSD buildworld on Arm-based macOS hosts

This is the last update that will be MFCed into stable/13.

From now on, the tracking of OpenZFS branches will be different:
- main continues tracking openzfs/zfs/master
- stable/13 is going to track openzfs/zfs/zfs-2.1-release

Obtained from: OpenZFS
MFC after: 1 week


# ba27dd8b 21-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9312e0fd1

Notable upstream changes:
778869fa1 Fix reporting of mount progress
e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD
03e02e5b5 Fix checksum errors not being counted on repeated repair
64e0fe14f Restore FreeBSD resource usage accounting
11f2e9a49 Fix panic if scrubbing after removing a slog device

MFC after: 2 weeks


# 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


# 5dce0384 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: Avoid updating the L2ARC device header unnecessarily

From openzfs-master 0ae184a6b commit message:
If we do not write any buffers to the cache device and the evict hand
has not advanced do not update the cache device header.

Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58
Patch Author: George Amanakis <gamanakis@gmail.com>

MFC after: 3 days
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D28682

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

OpenZFS: Fix issues caused by reversed commits + rebase

# 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
...

# 5596f836 14-Nov-2020 Mateusz Guzik <mjg@FreeBSD.org>

zfs: disable periodic arc updates

They are only there to provide less innacurate statistics for debuggers.
However, this is quite heavy-weight and instead it would be better to
teach debuggers how to obtain the necessary information.

# 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


# 2c48331d 18-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

MFV 2.0-rc2

- Fixes divide by zero for unusual hz
- remove cryptodev dependency


# eac7052f 04-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-gfd20a8

- fixes jail delegation
- fixes raw kstat unsupported complaints
- exposes dbgmsg, dbuf, and checksum benchmark stats
- restore rename -u support


# ac0bf12e 28-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-ga00c61


# 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


# 2617128a 30-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4694131a0 (master) into main

Notable upstream pull request merges:
#12253 module/zfs: simplify ddt_stat_add() loop
#12288 Avoid 64bit division in multilist index functions

Obtained from: OpenZFS
OpenZFS commit: 4694131a0a05b6db2727c9801f9729b9378d3064


# 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


# 0d8fe237 20-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12054 Avoid deadlock when removing L2ARC devices under I/O
#12172 Use wmsum for arc, abd, dbuf and zfetch statistics
#12221 vdev_draid_min_asize() ignores reserved space

Obtained from: OpenZFS
OpenZFS commit: c4c162c1e8ff9ce8833014711875d18df520096c


# 3ff01b23 12-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12149: Multiple man-pages: Move to appropriate section
#12158: Re-embed multilist_t storage
#12191: Convert non-libzpool libraries to -fvisibility=hidden
#12196: Unify manpage makefiles, move pages to better sexions, ...
#12210: libzutil: import filtering optimisation
#12212: Remove pool io kstats

Obtained from: OpenZFS
OpenZFS commit: afa7b3484556d3ae610a34582ce5ebd2c3e27bba


# 16038816 08-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@75b4cbf62 (master) into main

Notable upstream pull request merges:
#11710 Allow zfs to send replication streams with missing snapshots
#11751 Avoid taking global lock to destroy zfsdev state
#11786 Ratelimit deadman zevents as with delay zevents
#11803 ZFS traverse_visitbp optimization to limit prefetch
#11813 Allow pool names that look like Solaris disk names
#11822 Atomically check and set dropped zevent count
#11822 Don't scale zfs_zevent_len_max by CPU count
#11833 Refactor zfsdev state init/destroy to share common code
#11837 zfs get -p only outputs 3 columns if "clones" property is empty
#11843 libzutil: zfs_isnumber(): return false if input empty
#11849 Use dsl_scan_setup_check() to setup a scrub
#11861 Improvements to the 'compatibility' property
#11862 cmd/zfs receive: allow dry-run (-n) to check property args
#11864 receive: don't fail inheriting (-x) properties on wrong dataset type
#11877 Combine zio caches if possible
#11881 FreeBSD: use vnlru_free_vfsops if available
#11883 FreeBSD: add support for lockless symlink lookup
#11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr
#11896 Fix crash in zio_done error reporting
#11905 zfs-send(8): Restore sorting of flags
#11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir
#11930 vdev_mirror: don't scrub/resilver devices that can't be read
#11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines
#11955 zfs get: don't lookup mount options when using "-s local"
#11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl
#11959 vdev_id: variable not getting expanded under map_slot()
#11966 Scale worker threads and taskqs with number of CPUs
#11994 Clean up use of zfs_log_create in zfs_dir
#11997 FreeBSD: Don't force xattr mount option
#11997 FreeBSD: Implement xattr=sa
#11997 FreeBSD: Use SET_ERROR to trace xattr name errors
#11998 Simplify/fix dnode_move() for dn_zfetch
#12003 FreeBSD: Initialize/destroy zp->z_lock
#12010 Fix dRAID self-healing short columns
#12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots"
#12040 Reinstate the old zpool read label logic as a fallback
#12046 Improve scrub maxinflight_bytes math
#12049 FreeBSD: avoid memory allocation in arc_prune_async
#12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI
#12061 Fix dRAID sequential resilver silent damage handling
#12072 Let zfs diff be more permissive
#12077 FreeBSD: Retry OCF ENOMEM errors.
#12088 Propagate vdev state due to invalid label corruption
#12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat
#12097 FreeBSD: Update dataset_kstats for zvols in dev mode
#12104 FreeBSD boot code reminder after zpool upgrade
#12114 Introduce write-mostly sums

Obtained from: OpenZFS
OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3


# 6db169e9 13-Apr-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@3522f57b6 (master)

Notable upstream pull request merges:
#11742 When specifying raidz vdev name, parity count should match
#11744 Use a helper function to clarify gang block size
#11771 Support running FreeBSD buildworld on Arm-based macOS hosts

This is the last update that will be MFCed into stable/13.

From now on, the tracking of OpenZFS branches will be different:
- main continues tracking openzfs/zfs/master
- stable/13 is going to track openzfs/zfs/zfs-2.1-release

Obtained from: OpenZFS
MFC after: 1 week


# ba27dd8b 21-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9312e0fd1

Notable upstream changes:
778869fa1 Fix reporting of mount progress
e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD
03e02e5b5 Fix checksum errors not being counted on repeated repair
64e0fe14f Restore FreeBSD resource usage accounting
11f2e9a49 Fix panic if scrubbing after removing a slog device

MFC after: 2 weeks


# 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


# 5dce0384 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: Avoid updating the L2ARC device header unnecessarily

From openzfs-master 0ae184a6b commit message:
If we do not write any buffers to the cache device and the evict hand
has not advanced do not update the cache device header.

Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58
Patch Author: George Amanakis <gamanakis@gmail.com>

MFC after: 3 days
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D28682

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

OpenZFS: Fix issues caused by reversed commits + rebase

# 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
...

# 5596f836 14-Nov-2020 Mateusz Guzik <mjg@FreeBSD.org>

zfs: disable periodic arc updates

They are only there to provide less innacurate statistics for debuggers.
However, this is quite heavy-weight and instead it would be better to
teach debuggers how to obtain the necessary information.

# 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


# 2c48331d 18-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

MFV 2.0-rc2

- Fixes divide by zero for unusual hz
- remove cryptodev dependency


# eac7052f 04-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-gfd20a8

- fixes jail delegation
- fixes raw kstat unsupported complaints
- exposes dbgmsg, dbuf, and checksum benchmark stats
- restore rename -u support


# ac0bf12e 28-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-ga00c61


# 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


# 2617128a 30-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4694131a0 (master) into main

Notable upstream pull request merges:
#12253 module/zfs: simplify ddt_stat_add() loop
#12288 Avoid 64bit division in multilist index functions

Obtained from: OpenZFS
OpenZFS commit: 4694131a0a05b6db2727c9801f9729b9378d3064


# 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


# 0d8fe237 20-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12054 Avoid deadlock when removing L2ARC devices under I/O
#12172 Use wmsum for arc, abd, dbuf and zfetch statistics
#12221 vdev_draid_min_asize() ignores reserved space

Obtained from: OpenZFS
OpenZFS commit: c4c162c1e8ff9ce8833014711875d18df520096c


# 3ff01b23 12-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12149: Multiple man-pages: Move to appropriate section
#12158: Re-embed multilist_t storage
#12191: Convert non-libzpool libraries to -fvisibility=hidden
#12196: Unify manpage makefiles, move pages to better sexions, ...
#12210: libzutil: import filtering optimisation
#12212: Remove pool io kstats

Obtained from: OpenZFS
OpenZFS commit: afa7b3484556d3ae610a34582ce5ebd2c3e27bba


# 16038816 08-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@75b4cbf62 (master) into main

Notable upstream pull request merges:
#11710 Allow zfs to send replication streams with missing snapshots
#11751 Avoid taking global lock to destroy zfsdev state
#11786 Ratelimit deadman zevents as with delay zevents
#11803 ZFS traverse_visitbp optimization to limit prefetch
#11813 Allow pool names that look like Solaris disk names
#11822 Atomically check and set dropped zevent count
#11822 Don't scale zfs_zevent_len_max by CPU count
#11833 Refactor zfsdev state init/destroy to share common code
#11837 zfs get -p only outputs 3 columns if "clones" property is empty
#11843 libzutil: zfs_isnumber(): return false if input empty
#11849 Use dsl_scan_setup_check() to setup a scrub
#11861 Improvements to the 'compatibility' property
#11862 cmd/zfs receive: allow dry-run (-n) to check property args
#11864 receive: don't fail inheriting (-x) properties on wrong dataset type
#11877 Combine zio caches if possible
#11881 FreeBSD: use vnlru_free_vfsops if available
#11883 FreeBSD: add support for lockless symlink lookup
#11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr
#11896 Fix crash in zio_done error reporting
#11905 zfs-send(8): Restore sorting of flags
#11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir
#11930 vdev_mirror: don't scrub/resilver devices that can't be read
#11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines
#11955 zfs get: don't lookup mount options when using "-s local"
#11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl
#11959 vdev_id: variable not getting expanded under map_slot()
#11966 Scale worker threads and taskqs with number of CPUs
#11994 Clean up use of zfs_log_create in zfs_dir
#11997 FreeBSD: Don't force xattr mount option
#11997 FreeBSD: Implement xattr=sa
#11997 FreeBSD: Use SET_ERROR to trace xattr name errors
#11998 Simplify/fix dnode_move() for dn_zfetch
#12003 FreeBSD: Initialize/destroy zp->z_lock
#12010 Fix dRAID self-healing short columns
#12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots"
#12040 Reinstate the old zpool read label logic as a fallback
#12046 Improve scrub maxinflight_bytes math
#12049 FreeBSD: avoid memory allocation in arc_prune_async
#12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI
#12061 Fix dRAID sequential resilver silent damage handling
#12072 Let zfs diff be more permissive
#12077 FreeBSD: Retry OCF ENOMEM errors.
#12088 Propagate vdev state due to invalid label corruption
#12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat
#12097 FreeBSD: Update dataset_kstats for zvols in dev mode
#12104 FreeBSD boot code reminder after zpool upgrade
#12114 Introduce write-mostly sums

Obtained from: OpenZFS
OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3


# 6db169e9 13-Apr-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@3522f57b6 (master)

Notable upstream pull request merges:
#11742 When specifying raidz vdev name, parity count should match
#11744 Use a helper function to clarify gang block size
#11771 Support running FreeBSD buildworld on Arm-based macOS hosts

This is the last update that will be MFCed into stable/13.

From now on, the tracking of OpenZFS branches will be different:
- main continues tracking openzfs/zfs/master
- stable/13 is going to track openzfs/zfs/zfs-2.1-release

Obtained from: OpenZFS
MFC after: 1 week


# ba27dd8b 21-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9312e0fd1

Notable upstream changes:
778869fa1 Fix reporting of mount progress
e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD
03e02e5b5 Fix checksum errors not being counted on repeated repair
64e0fe14f Restore FreeBSD resource usage accounting
11f2e9a49 Fix panic if scrubbing after removing a slog device

MFC after: 2 weeks


# 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


# 5dce0384 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: Avoid updating the L2ARC device header unnecessarily

From openzfs-master 0ae184a6b commit message:
If we do not write any buffers to the cache device and the evict hand
has not advanced do not update the cache device header.

Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58
Patch Author: George Amanakis <gamanakis@gmail.com>

MFC after: 3 days
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D28682

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

OpenZFS: Fix issues caused by reversed commits + rebase

# 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
...

# 5596f836 14-Nov-2020 Mateusz Guzik <mjg@FreeBSD.org>

zfs: disable periodic arc updates

They are only there to provide less innacurate statistics for debuggers.
However, this is quite heavy-weight and instead it would be better to
teach debuggers how to obtain the necessary information.

# 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


# 2c48331d 18-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

MFV 2.0-rc2

- Fixes divide by zero for unusual hz
- remove cryptodev dependency


# eac7052f 04-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-gfd20a8

- fixes jail delegation
- fixes raw kstat unsupported complaints
- exposes dbgmsg, dbuf, and checksum benchmark stats
- restore rename -u support


# ac0bf12e 28-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-ga00c61


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

Initial import from vendor-sys branch of openzfs


# 2617128a 30-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@4694131a0 (master) into main

Notable upstream pull request merges:
#12253 module/zfs: simplify ddt_stat_add() loop
#12288 Avoid 64bit division in multilist index functions

Obtained from: OpenZFS
OpenZFS commit: 4694131a0a05b6db2727c9801f9729b9378d3064


# 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


# 0d8fe237 20-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12054 Avoid deadlock when removing L2ARC devices under I/O
#12172 Use wmsum for arc, abd, dbuf and zfetch statistics
#12221 vdev_draid_min_asize() ignores reserved space

Obtained from: OpenZFS
OpenZFS commit: c4c162c1e8ff9ce8833014711875d18df520096c


# 3ff01b23 12-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12149: Multiple man-pages: Move to appropriate section
#12158: Re-embed multilist_t storage
#12191: Convert non-libzpool libraries to -fvisibility=hidden
#12196: Unify manpage makefiles, move pages to better sexions, ...
#12210: libzutil: import filtering optimisation
#12212: Remove pool io kstats

Obtained from: OpenZFS
OpenZFS commit: afa7b3484556d3ae610a34582ce5ebd2c3e27bba


# 16038816 08-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@75b4cbf62 (master) into main

Notable upstream pull request merges:
#11710 Allow zfs to send replication streams with missing snapshots
#11751 Avoid taking global lock to destroy zfsdev state
#11786 Ratelimit deadman zevents as with delay zevents
#11803 ZFS traverse_visitbp optimization to limit prefetch
#11813 Allow pool names that look like Solaris disk names
#11822 Atomically check and set dropped zevent count
#11822 Don't scale zfs_zevent_len_max by CPU count
#11833 Refactor zfsdev state init/destroy to share common code
#11837 zfs get -p only outputs 3 columns if "clones" property is empty
#11843 libzutil: zfs_isnumber(): return false if input empty
#11849 Use dsl_scan_setup_check() to setup a scrub
#11861 Improvements to the 'compatibility' property
#11862 cmd/zfs receive: allow dry-run (-n) to check property args
#11864 receive: don't fail inheriting (-x) properties on wrong dataset type
#11877 Combine zio caches if possible
#11881 FreeBSD: use vnlru_free_vfsops if available
#11883 FreeBSD: add support for lockless symlink lookup
#11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr
#11896 Fix crash in zio_done error reporting
#11905 zfs-send(8): Restore sorting of flags
#11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir
#11930 vdev_mirror: don't scrub/resilver devices that can't be read
#11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines
#11955 zfs get: don't lookup mount options when using "-s local"
#11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl
#11959 vdev_id: variable not getting expanded under map_slot()
#11966 Scale worker threads and taskqs with number of CPUs
#11994 Clean up use of zfs_log_create in zfs_dir
#11997 FreeBSD: Don't force xattr mount option
#11997 FreeBSD: Implement xattr=sa
#11997 FreeBSD: Use SET_ERROR to trace xattr name errors
#11998 Simplify/fix dnode_move() for dn_zfetch
#12003 FreeBSD: Initialize/destroy zp->z_lock
#12010 Fix dRAID self-healing short columns
#12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots"
#12040 Reinstate the old zpool read label logic as a fallback
#12046 Improve scrub maxinflight_bytes math
#12049 FreeBSD: avoid memory allocation in arc_prune_async
#12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI
#12061 Fix dRAID sequential resilver silent damage handling
#12072 Let zfs diff be more permissive
#12077 FreeBSD: Retry OCF ENOMEM errors.
#12088 Propagate vdev state due to invalid label corruption
#12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat
#12097 FreeBSD: Update dataset_kstats for zvols in dev mode
#12104 FreeBSD boot code reminder after zpool upgrade
#12114 Introduce write-mostly sums

Obtained from: OpenZFS
OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3


# 6db169e9 13-Apr-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@3522f57b6 (master)

Notable upstream pull request merges:
#11742 When specifying raidz vdev name, parity count should match
#11744 Use a helper function to clarify gang block size
#11771 Support running FreeBSD buildworld on Arm-based macOS hosts

This is the last update that will be MFCed into stable/13.

From now on, the tracking of OpenZFS branches will be different:
- main continues tracking openzfs/zfs/master
- stable/13 is going to track openzfs/zfs/zfs-2.1-release

Obtained from: OpenZFS
MFC after: 1 week


# ba27dd8b 21-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9312e0fd1

Notable upstream changes:
778869fa1 Fix reporting of mount progress
e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD
03e02e5b5 Fix checksum errors not being counted on repeated repair
64e0fe14f Restore FreeBSD resource usage accounting
11f2e9a49 Fix panic if scrubbing after removing a slog device

MFC after: 2 weeks


# 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


# 5dce0384 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: Avoid updating the L2ARC device header unnecessarily

From openzfs-master 0ae184a6b commit message:
If we do not write any buffers to the cache device and the evict hand
has not advanced do not update the cache device header.

Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58
Patch Author: George Amanakis <gamanakis@gmail.com>

MFC after: 3 days
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D28682

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

OpenZFS: Fix issues caused by reversed commits + rebase

# 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
...

# 5596f836 14-Nov-2020 Mateusz Guzik <mjg@FreeBSD.org>

zfs: disable periodic arc updates

They are only there to provide less innacurate statistics for debuggers.
However, this is quite heavy-weight and instead it would be better to
teach debuggers how to obtain the necessary information.

# 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


# 2c48331d 18-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

MFV 2.0-rc2

- Fixes divide by zero for unusual hz
- remove cryptodev dependency


# eac7052f 04-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-gfd20a8

- fixes jail delegation
- fixes raw kstat unsupported complaints
- exposes dbgmsg, dbuf, and checksum benchmark stats
- restore rename -u support


# ac0bf12e 28-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-ga00c61


# 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


# 0d8fe237 20-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12054 Avoid deadlock when removing L2ARC devices under I/O
#12172 Use wmsum for arc, abd, dbuf and zfetch statistics
#12221 vdev_draid_min_asize() ignores reserved space

Obtained from: OpenZFS
OpenZFS commit: c4c162c1e8ff9ce8833014711875d18df520096c


# 3ff01b23 12-Jun-2021 Martin Matuska <mm@FreeBSD.org>

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

Notable upstream pull request merges:
#12149: Multiple man-pages: Move to appropriate section
#12158: Re-embed multilist_t storage
#12191: Convert non-libzpool libraries to -fvisibility=hidden
#12196: Unify manpage makefiles, move pages to better sexions, ...
#12210: libzutil: import filtering optimisation
#12212: Remove pool io kstats

Obtained from: OpenZFS
OpenZFS commit: afa7b3484556d3ae610a34582ce5ebd2c3e27bba


# 16038816 08-Jun-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@75b4cbf62 (master) into main

Notable upstream pull request merges:
#11710 Allow zfs to send replication streams with missing snapshots
#11751 Avoid taking global lock to destroy zfsdev state
#11786 Ratelimit deadman zevents as with delay zevents
#11803 ZFS traverse_visitbp optimization to limit prefetch
#11813 Allow pool names that look like Solaris disk names
#11822 Atomically check and set dropped zevent count
#11822 Don't scale zfs_zevent_len_max by CPU count
#11833 Refactor zfsdev state init/destroy to share common code
#11837 zfs get -p only outputs 3 columns if "clones" property is empty
#11843 libzutil: zfs_isnumber(): return false if input empty
#11849 Use dsl_scan_setup_check() to setup a scrub
#11861 Improvements to the 'compatibility' property
#11862 cmd/zfs receive: allow dry-run (-n) to check property args
#11864 receive: don't fail inheriting (-x) properties on wrong dataset type
#11877 Combine zio caches if possible
#11881 FreeBSD: use vnlru_free_vfsops if available
#11883 FreeBSD: add support for lockless symlink lookup
#11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr
#11896 Fix crash in zio_done error reporting
#11905 zfs-send(8): Restore sorting of flags
#11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir
#11930 vdev_mirror: don't scrub/resilver devices that can't be read
#11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines
#11955 zfs get: don't lookup mount options when using "-s local"
#11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl
#11959 vdev_id: variable not getting expanded under map_slot()
#11966 Scale worker threads and taskqs with number of CPUs
#11994 Clean up use of zfs_log_create in zfs_dir
#11997 FreeBSD: Don't force xattr mount option
#11997 FreeBSD: Implement xattr=sa
#11997 FreeBSD: Use SET_ERROR to trace xattr name errors
#11998 Simplify/fix dnode_move() for dn_zfetch
#12003 FreeBSD: Initialize/destroy zp->z_lock
#12010 Fix dRAID self-healing short columns
#12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots"
#12040 Reinstate the old zpool read label logic as a fallback
#12046 Improve scrub maxinflight_bytes math
#12049 FreeBSD: avoid memory allocation in arc_prune_async
#12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI
#12061 Fix dRAID sequential resilver silent damage handling
#12072 Let zfs diff be more permissive
#12077 FreeBSD: Retry OCF ENOMEM errors.
#12088 Propagate vdev state due to invalid label corruption
#12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat
#12097 FreeBSD: Update dataset_kstats for zvols in dev mode
#12104 FreeBSD boot code reminder after zpool upgrade
#12114 Introduce write-mostly sums

Obtained from: OpenZFS
OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3


# 6db169e9 13-Apr-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@3522f57b6 (master)

Notable upstream pull request merges:
#11742 When specifying raidz vdev name, parity count should match
#11744 Use a helper function to clarify gang block size
#11771 Support running FreeBSD buildworld on Arm-based macOS hosts

This is the last update that will be MFCed into stable/13.

From now on, the tracking of OpenZFS branches will be different:
- main continues tracking openzfs/zfs/master
- stable/13 is going to track openzfs/zfs/zfs-2.1-release

Obtained from: OpenZFS
MFC after: 1 week


# ba27dd8b 21-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-9312e0fd1

Notable upstream changes:
778869fa1 Fix reporting of mount progress
e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD
03e02e5b5 Fix checksum errors not being counted on repeated repair
64e0fe14f Restore FreeBSD resource usage accounting
11f2e9a49 Fix panic if scrubbing after removing a slog device

MFC after: 2 weeks


# 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


# 5dce0384 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: Avoid updating the L2ARC device header unnecessarily

From openzfs-master 0ae184a6b commit message:
If we do not write any buffers to the cache device and the evict hand
has not advanced do not update the cache device header.

Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58
Patch Author: George Amanakis <gamanakis@gmail.com>

MFC after: 3 days
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D28682

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

OpenZFS: Fix issues caused by reversed commits + rebase

# 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
...

# 5596f836 14-Nov-2020 Mateusz Guzik <mjg@FreeBSD.org>

zfs: disable periodic arc updates

They are only there to provide less innacurate statistics for debuggers.
However, this is quite heavy-weight and instead it would be better to
teach debuggers how to obtain the necessary information.

# 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


# 2c48331d 18-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

MFV 2.0-rc2

- Fixes divide by zero for unusual hz
- remove cryptodev dependency


# eac7052f 04-Sep-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-gfd20a8

- fixes jail delegation
- fixes raw kstat unsupported complaints
- exposes dbgmsg, dbuf, and checksum benchmark stats
- restore rename -u support


# ac0bf12e 28-Aug-2020 Matt Macy <mmacy@FreeBSD.org>

ZFS: MFV 2.0-rc1-ga00c61


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

Initial import from vendor-sys branch of openzfs


# 5dce0384 15-Feb-2021 Martin Matuska <mm@FreeBSD.org>

zfs: Avoid updating the L2ARC device header unnecessarily

From openzfs-master 0ae184a6b commit message:
If we do not write any buffers to the cache device and the evict hand
has not advanced do not update the cache device header.

Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58
Patch Author: George Amanakis <gamanakis@gmail.com>

MFC after: 3 days
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D28682


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

OpenZFS: Fix issues caused by reversed commits + rebase


# 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
...


# 5596f836 14-Nov-2020 Mateusz Guzik <mjg@FreeBSD.org>

zfs: disable periodic arc updates

They are only there to provide less innacurate statistics for debuggers.
However, this is quite heavy-weight and instead it would be better to
teach debuggers how to obtain the necessary information.