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

zfs: merge openzfs/zfs@8f1b7a6fa

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

Obtained from: OpenZFS
OpenZFS commit: 8f1b7a6fa6762ea4c89198ceb11c521f80b92ddc


# 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


# 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


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

zfs: merge openzfs/zfs@804414aad

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

Obtained from: OpenZFS
OpenZFS commit: 804414aad224b432590afe3f9ec114ffb49e0f13


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

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

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

Obtained from: OpenZFS
OpenZFS commit: 59493b63c18ea223857066218d6a58b67eb88159


# 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


# 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


# 81b22a98 10-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@6c8f03232 (master) into main

Notable upstream pull request merges:
#12333: Creating gang ABDs for Raidz optional IOs
#12668: FreeBSD: Catch up with recent VFS changes
#12687: Skip spacemaps reading in case of pool readonly import
#12704: Fix some FreeBSD VOPs to synchronize properly with teardown
#12724: Fix lseek(SEEK_DATA/SEEK_HOLE) mmap consistency

Obtained from: OpenZFS
OpenZFS commit: 6c8f03232aa98e950bfe187f9ff53d3541687b50


# 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


# f9693bef 20-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-891568c99

Notable upstream pull request merges:
#11652 Split dmu_zfetch() speculation and execution parts
#11682 Fix zfs_get_data access to files with wrong generation
#11735 Clean up RAIDZ/DRAID ereport code
#11737 Initialize metaslab range trees in metaslab_init
#11739 FreeBSD: make seqc asserts conditional on replay
#11763 Allow setting bootfs property on pools with indirect vdevs
#11767 FreeBSD: Fix memory leaks in kstats

Obtained from: OpenZFS
MFC after: 2 weeks


# 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


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

zfs: fix RAIDZ2/3 not healing parity with 2+ bad disks

From openzfs-master 62d4287f2 commit message:
When scrubbing, (non-sequential) resilvering, or correcting a checksum
error using RAIDZ parity, ZFS should heal any incorrect RAIDZ parity by
overwriting it. For example, if P disks are silently corrupted (P being
the number of failures tolerated; e.g. RAIDZ2 has P=2), `zpool scrub`
should detect and heal all the bad state on these disks, including
parity. This way if there is a subsequent failure we are fully
protected.

With RAIDZ2 or RAIDZ3, a block can have silent damage to a parity
sector, and also damage (silent or known) to a data sector. In this
case the parity should be healed but it is not.

Cherry-picked from openzfs 62d4287f279a0d184f8f332475f27af58b7aa87e
Patch Author: Matthew Ahrens <matthew.ahrens@delphix.com>

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

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

# 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


# 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


# 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


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

zfs: merge openzfs/zfs@804414aad

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

Obtained from: OpenZFS
OpenZFS commit: 804414aad224b432590afe3f9ec114ffb49e0f13


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

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

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

Obtained from: OpenZFS
OpenZFS commit: 59493b63c18ea223857066218d6a58b67eb88159


# 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


# 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


# 81b22a98 10-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@6c8f03232 (master) into main

Notable upstream pull request merges:
#12333: Creating gang ABDs for Raidz optional IOs
#12668: FreeBSD: Catch up with recent VFS changes
#12687: Skip spacemaps reading in case of pool readonly import
#12704: Fix some FreeBSD VOPs to synchronize properly with teardown
#12724: Fix lseek(SEEK_DATA/SEEK_HOLE) mmap consistency

Obtained from: OpenZFS
OpenZFS commit: 6c8f03232aa98e950bfe187f9ff53d3541687b50


# 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


# f9693bef 20-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-891568c99

Notable upstream pull request merges:
#11652 Split dmu_zfetch() speculation and execution parts
#11682 Fix zfs_get_data access to files with wrong generation
#11735 Clean up RAIDZ/DRAID ereport code
#11737 Initialize metaslab range trees in metaslab_init
#11739 FreeBSD: make seqc asserts conditional on replay
#11763 Allow setting bootfs property on pools with indirect vdevs
#11767 FreeBSD: Fix memory leaks in kstats

Obtained from: OpenZFS
MFC after: 2 weeks


# 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


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

zfs: fix RAIDZ2/3 not healing parity with 2+ bad disks

From openzfs-master 62d4287f2 commit message:
When scrubbing, (non-sequential) resilvering, or correcting a checksum
error using RAIDZ parity, ZFS should heal any incorrect RAIDZ parity by
overwriting it. For example, if P disks are silently corrupted (P being
the number of failures tolerated; e.g. RAIDZ2 has P=2), `zpool scrub`
should detect and heal all the bad state on these disks, including
parity. This way if there is a subsequent failure we are fully
protected.

With RAIDZ2 or RAIDZ3, a block can have silent damage to a parity
sector, and also damage (silent or known) to a data sector. In this
case the parity should be healed but it is not.

Cherry-picked from openzfs 62d4287f279a0d184f8f332475f27af58b7aa87e
Patch Author: Matthew Ahrens <matthew.ahrens@delphix.com>

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

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

# 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


# 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


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

zfs: merge openzfs/zfs@804414aad

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

Obtained from: OpenZFS
OpenZFS commit: 804414aad224b432590afe3f9ec114ffb49e0f13


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

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

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

Obtained from: OpenZFS
OpenZFS commit: 59493b63c18ea223857066218d6a58b67eb88159


# 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


# 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


# 81b22a98 10-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@6c8f03232 (master) into main

Notable upstream pull request merges:
#12333: Creating gang ABDs for Raidz optional IOs
#12668: FreeBSD: Catch up with recent VFS changes
#12687: Skip spacemaps reading in case of pool readonly import
#12704: Fix some FreeBSD VOPs to synchronize properly with teardown
#12724: Fix lseek(SEEK_DATA/SEEK_HOLE) mmap consistency

Obtained from: OpenZFS
OpenZFS commit: 6c8f03232aa98e950bfe187f9ff53d3541687b50


# 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


# f9693bef 20-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-891568c99

Notable upstream pull request merges:
#11652 Split dmu_zfetch() speculation and execution parts
#11682 Fix zfs_get_data access to files with wrong generation
#11735 Clean up RAIDZ/DRAID ereport code
#11737 Initialize metaslab range trees in metaslab_init
#11739 FreeBSD: make seqc asserts conditional on replay
#11763 Allow setting bootfs property on pools with indirect vdevs
#11767 FreeBSD: Fix memory leaks in kstats

Obtained from: OpenZFS
MFC after: 2 weeks


# 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


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

zfs: fix RAIDZ2/3 not healing parity with 2+ bad disks

From openzfs-master 62d4287f2 commit message:
When scrubbing, (non-sequential) resilvering, or correcting a checksum
error using RAIDZ parity, ZFS should heal any incorrect RAIDZ parity by
overwriting it. For example, if P disks are silently corrupted (P being
the number of failures tolerated; e.g. RAIDZ2 has P=2), `zpool scrub`
should detect and heal all the bad state on these disks, including
parity. This way if there is a subsequent failure we are fully
protected.

With RAIDZ2 or RAIDZ3, a block can have silent damage to a parity
sector, and also damage (silent or known) to a data sector. In this
case the parity should be healed but it is not.

Cherry-picked from openzfs 62d4287f279a0d184f8f332475f27af58b7aa87e
Patch Author: Matthew Ahrens <matthew.ahrens@delphix.com>

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

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

# 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


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

Initial import from vendor-sys branch of openzfs


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

zfs: merge openzfs/zfs@804414aad

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

Obtained from: OpenZFS
OpenZFS commit: 804414aad224b432590afe3f9ec114ffb49e0f13


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

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

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

Obtained from: OpenZFS
OpenZFS commit: 59493b63c18ea223857066218d6a58b67eb88159


# 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


# 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


# 81b22a98 10-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@6c8f03232 (master) into main

Notable upstream pull request merges:
#12333: Creating gang ABDs for Raidz optional IOs
#12668: FreeBSD: Catch up with recent VFS changes
#12687: Skip spacemaps reading in case of pool readonly import
#12704: Fix some FreeBSD VOPs to synchronize properly with teardown
#12724: Fix lseek(SEEK_DATA/SEEK_HOLE) mmap consistency

Obtained from: OpenZFS
OpenZFS commit: 6c8f03232aa98e950bfe187f9ff53d3541687b50


# 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


# f9693bef 20-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-891568c99

Notable upstream pull request merges:
#11652 Split dmu_zfetch() speculation and execution parts
#11682 Fix zfs_get_data access to files with wrong generation
#11735 Clean up RAIDZ/DRAID ereport code
#11737 Initialize metaslab range trees in metaslab_init
#11739 FreeBSD: make seqc asserts conditional on replay
#11763 Allow setting bootfs property on pools with indirect vdevs
#11767 FreeBSD: Fix memory leaks in kstats

Obtained from: OpenZFS
MFC after: 2 weeks


# 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


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

zfs: fix RAIDZ2/3 not healing parity with 2+ bad disks

From openzfs-master 62d4287f2 commit message:
When scrubbing, (non-sequential) resilvering, or correcting a checksum
error using RAIDZ parity, ZFS should heal any incorrect RAIDZ parity by
overwriting it. For example, if P disks are silently corrupted (P being
the number of failures tolerated; e.g. RAIDZ2 has P=2), `zpool scrub`
should detect and heal all the bad state on these disks, including
parity. This way if there is a subsequent failure we are fully
protected.

With RAIDZ2 or RAIDZ3, a block can have silent damage to a parity
sector, and also damage (silent or known) to a data sector. In this
case the parity should be healed but it is not.

Cherry-picked from openzfs 62d4287f279a0d184f8f332475f27af58b7aa87e
Patch Author: Matthew Ahrens <matthew.ahrens@delphix.com>

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

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

# 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


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

Initial import from vendor-sys branch of openzfs


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

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

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

Obtained from: OpenZFS
OpenZFS commit: 59493b63c18ea223857066218d6a58b67eb88159


# 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


# 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


# 81b22a98 10-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@6c8f03232 (master) into main

Notable upstream pull request merges:
#12333: Creating gang ABDs for Raidz optional IOs
#12668: FreeBSD: Catch up with recent VFS changes
#12687: Skip spacemaps reading in case of pool readonly import
#12704: Fix some FreeBSD VOPs to synchronize properly with teardown
#12724: Fix lseek(SEEK_DATA/SEEK_HOLE) mmap consistency

Obtained from: OpenZFS
OpenZFS commit: 6c8f03232aa98e950bfe187f9ff53d3541687b50


# 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


# f9693bef 20-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-891568c99

Notable upstream pull request merges:
#11652 Split dmu_zfetch() speculation and execution parts
#11682 Fix zfs_get_data access to files with wrong generation
#11735 Clean up RAIDZ/DRAID ereport code
#11737 Initialize metaslab range trees in metaslab_init
#11739 FreeBSD: make seqc asserts conditional on replay
#11763 Allow setting bootfs property on pools with indirect vdevs
#11767 FreeBSD: Fix memory leaks in kstats

Obtained from: OpenZFS
MFC after: 2 weeks


# 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


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

zfs: fix RAIDZ2/3 not healing parity with 2+ bad disks

From openzfs-master 62d4287f2 commit message:
When scrubbing, (non-sequential) resilvering, or correcting a checksum
error using RAIDZ parity, ZFS should heal any incorrect RAIDZ parity by
overwriting it. For example, if P disks are silently corrupted (P being
the number of failures tolerated; e.g. RAIDZ2 has P=2), `zpool scrub`
should detect and heal all the bad state on these disks, including
parity. This way if there is a subsequent failure we are fully
protected.

With RAIDZ2 or RAIDZ3, a block can have silent damage to a parity
sector, and also damage (silent or known) to a data sector. In this
case the parity should be healed but it is not.

Cherry-picked from openzfs 62d4287f279a0d184f8f332475f27af58b7aa87e
Patch Author: Matthew Ahrens <matthew.ahrens@delphix.com>

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

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

# 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


# 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


# 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


# 81b22a98 10-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@6c8f03232 (master) into main

Notable upstream pull request merges:
#12333: Creating gang ABDs for Raidz optional IOs
#12668: FreeBSD: Catch up with recent VFS changes
#12687: Skip spacemaps reading in case of pool readonly import
#12704: Fix some FreeBSD VOPs to synchronize properly with teardown
#12724: Fix lseek(SEEK_DATA/SEEK_HOLE) mmap consistency

Obtained from: OpenZFS
OpenZFS commit: 6c8f03232aa98e950bfe187f9ff53d3541687b50


# 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


# f9693bef 20-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-891568c99

Notable upstream pull request merges:
#11652 Split dmu_zfetch() speculation and execution parts
#11682 Fix zfs_get_data access to files with wrong generation
#11735 Clean up RAIDZ/DRAID ereport code
#11737 Initialize metaslab range trees in metaslab_init
#11739 FreeBSD: make seqc asserts conditional on replay
#11763 Allow setting bootfs property on pools with indirect vdevs
#11767 FreeBSD: Fix memory leaks in kstats

Obtained from: OpenZFS
MFC after: 2 weeks


# 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


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

zfs: fix RAIDZ2/3 not healing parity with 2+ bad disks

From openzfs-master 62d4287f2 commit message:
When scrubbing, (non-sequential) resilvering, or correcting a checksum
error using RAIDZ parity, ZFS should heal any incorrect RAIDZ parity by
overwriting it. For example, if P disks are silently corrupted (P being
the number of failures tolerated; e.g. RAIDZ2 has P=2), `zpool scrub`
should detect and heal all the bad state on these disks, including
parity. This way if there is a subsequent failure we are fully
protected.

With RAIDZ2 or RAIDZ3, a block can have silent damage to a parity
sector, and also damage (silent or known) to a data sector. In this
case the parity should be healed but it is not.

Cherry-picked from openzfs 62d4287f279a0d184f8f332475f27af58b7aa87e
Patch Author: Matthew Ahrens <matthew.ahrens@delphix.com>

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

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

# 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


# 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


# 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


# 81b22a98 10-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@6c8f03232 (master) into main

Notable upstream pull request merges:
#12333: Creating gang ABDs for Raidz optional IOs
#12668: FreeBSD: Catch up with recent VFS changes
#12687: Skip spacemaps reading in case of pool readonly import
#12704: Fix some FreeBSD VOPs to synchronize properly with teardown
#12724: Fix lseek(SEEK_DATA/SEEK_HOLE) mmap consistency

Obtained from: OpenZFS
OpenZFS commit: 6c8f03232aa98e950bfe187f9ff53d3541687b50


# 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


# f9693bef 20-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-891568c99

Notable upstream pull request merges:
#11652 Split dmu_zfetch() speculation and execution parts
#11682 Fix zfs_get_data access to files with wrong generation
#11735 Clean up RAIDZ/DRAID ereport code
#11737 Initialize metaslab range trees in metaslab_init
#11739 FreeBSD: make seqc asserts conditional on replay
#11763 Allow setting bootfs property on pools with indirect vdevs
#11767 FreeBSD: Fix memory leaks in kstats

Obtained from: OpenZFS
MFC after: 2 weeks


# 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


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

zfs: fix RAIDZ2/3 not healing parity with 2+ bad disks

From openzfs-master 62d4287f2 commit message:
When scrubbing, (non-sequential) resilvering, or correcting a checksum
error using RAIDZ parity, ZFS should heal any incorrect RAIDZ parity by
overwriting it. For example, if P disks are silently corrupted (P being
the number of failures tolerated; e.g. RAIDZ2 has P=2), `zpool scrub`
should detect and heal all the bad state on these disks, including
parity. This way if there is a subsequent failure we are fully
protected.

With RAIDZ2 or RAIDZ3, a block can have silent damage to a parity
sector, and also damage (silent or known) to a data sector. In this
case the parity should be healed but it is not.

Cherry-picked from openzfs 62d4287f279a0d184f8f332475f27af58b7aa87e
Patch Author: Matthew Ahrens <matthew.ahrens@delphix.com>

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

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

# 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


# 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


# 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


# 81b22a98 10-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@6c8f03232 (master) into main

Notable upstream pull request merges:
#12333: Creating gang ABDs for Raidz optional IOs
#12668: FreeBSD: Catch up with recent VFS changes
#12687: Skip spacemaps reading in case of pool readonly import
#12704: Fix some FreeBSD VOPs to synchronize properly with teardown
#12724: Fix lseek(SEEK_DATA/SEEK_HOLE) mmap consistency

Obtained from: OpenZFS
OpenZFS commit: 6c8f03232aa98e950bfe187f9ff53d3541687b50


# 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


# f9693bef 20-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-891568c99

Notable upstream pull request merges:
#11652 Split dmu_zfetch() speculation and execution parts
#11682 Fix zfs_get_data access to files with wrong generation
#11735 Clean up RAIDZ/DRAID ereport code
#11737 Initialize metaslab range trees in metaslab_init
#11739 FreeBSD: make seqc asserts conditional on replay
#11763 Allow setting bootfs property on pools with indirect vdevs
#11767 FreeBSD: Fix memory leaks in kstats

Obtained from: OpenZFS
MFC after: 2 weeks


# 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


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

zfs: fix RAIDZ2/3 not healing parity with 2+ bad disks

From openzfs-master 62d4287f2 commit message:
When scrubbing, (non-sequential) resilvering, or correcting a checksum
error using RAIDZ parity, ZFS should heal any incorrect RAIDZ parity by
overwriting it. For example, if P disks are silently corrupted (P being
the number of failures tolerated; e.g. RAIDZ2 has P=2), `zpool scrub`
should detect and heal all the bad state on these disks, including
parity. This way if there is a subsequent failure we are fully
protected.

With RAIDZ2 or RAIDZ3, a block can have silent damage to a parity
sector, and also damage (silent or known) to a data sector. In this
case the parity should be healed but it is not.

Cherry-picked from openzfs 62d4287f279a0d184f8f332475f27af58b7aa87e
Patch Author: Matthew Ahrens <matthew.ahrens@delphix.com>

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

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

# 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


# 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


# 81b22a98 10-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@6c8f03232 (master) into main

Notable upstream pull request merges:
#12333: Creating gang ABDs for Raidz optional IOs
#12668: FreeBSD: Catch up with recent VFS changes
#12687: Skip spacemaps reading in case of pool readonly import
#12704: Fix some FreeBSD VOPs to synchronize properly with teardown
#12724: Fix lseek(SEEK_DATA/SEEK_HOLE) mmap consistency

Obtained from: OpenZFS
OpenZFS commit: 6c8f03232aa98e950bfe187f9ff53d3541687b50


# 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


# f9693bef 20-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-891568c99

Notable upstream pull request merges:
#11652 Split dmu_zfetch() speculation and execution parts
#11682 Fix zfs_get_data access to files with wrong generation
#11735 Clean up RAIDZ/DRAID ereport code
#11737 Initialize metaslab range trees in metaslab_init
#11739 FreeBSD: make seqc asserts conditional on replay
#11763 Allow setting bootfs property on pools with indirect vdevs
#11767 FreeBSD: Fix memory leaks in kstats

Obtained from: OpenZFS
MFC after: 2 weeks


# 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


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

zfs: fix RAIDZ2/3 not healing parity with 2+ bad disks

From openzfs-master 62d4287f2 commit message:
When scrubbing, (non-sequential) resilvering, or correcting a checksum
error using RAIDZ parity, ZFS should heal any incorrect RAIDZ parity by
overwriting it. For example, if P disks are silently corrupted (P being
the number of failures tolerated; e.g. RAIDZ2 has P=2), `zpool scrub`
should detect and heal all the bad state on these disks, including
parity. This way if there is a subsequent failure we are fully
protected.

With RAIDZ2 or RAIDZ3, a block can have silent damage to a parity
sector, and also damage (silent or known) to a data sector. In this
case the parity should be healed but it is not.

Cherry-picked from openzfs 62d4287f279a0d184f8f332475f27af58b7aa87e
Patch Author: Matthew Ahrens <matthew.ahrens@delphix.com>

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

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

# 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


# 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


# 81b22a98 10-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@6c8f03232 (master) into main

Notable upstream pull request merges:
#12333: Creating gang ABDs for Raidz optional IOs
#12668: FreeBSD: Catch up with recent VFS changes
#12687: Skip spacemaps reading in case of pool readonly import
#12704: Fix some FreeBSD VOPs to synchronize properly with teardown
#12724: Fix lseek(SEEK_DATA/SEEK_HOLE) mmap consistency

Obtained from: OpenZFS
OpenZFS commit: 6c8f03232aa98e950bfe187f9ff53d3541687b50


# 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


# f9693bef 20-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-891568c99

Notable upstream pull request merges:
#11652 Split dmu_zfetch() speculation and execution parts
#11682 Fix zfs_get_data access to files with wrong generation
#11735 Clean up RAIDZ/DRAID ereport code
#11737 Initialize metaslab range trees in metaslab_init
#11739 FreeBSD: make seqc asserts conditional on replay
#11763 Allow setting bootfs property on pools with indirect vdevs
#11767 FreeBSD: Fix memory leaks in kstats

Obtained from: OpenZFS
MFC after: 2 weeks


# 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


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

zfs: fix RAIDZ2/3 not healing parity with 2+ bad disks

From openzfs-master 62d4287f2 commit message:
When scrubbing, (non-sequential) resilvering, or correcting a checksum
error using RAIDZ parity, ZFS should heal any incorrect RAIDZ parity by
overwriting it. For example, if P disks are silently corrupted (P being
the number of failures tolerated; e.g. RAIDZ2 has P=2), `zpool scrub`
should detect and heal all the bad state on these disks, including
parity. This way if there is a subsequent failure we are fully
protected.

With RAIDZ2 or RAIDZ3, a block can have silent damage to a parity
sector, and also damage (silent or known) to a data sector. In this
case the parity should be healed but it is not.

Cherry-picked from openzfs 62d4287f279a0d184f8f332475f27af58b7aa87e
Patch Author: Matthew Ahrens <matthew.ahrens@delphix.com>

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

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

# 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


# 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


# 81b22a98 10-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@6c8f03232 (master) into main

Notable upstream pull request merges:
#12333: Creating gang ABDs for Raidz optional IOs
#12668: FreeBSD: Catch up with recent VFS changes
#12687: Skip spacemaps reading in case of pool readonly import
#12704: Fix some FreeBSD VOPs to synchronize properly with teardown
#12724: Fix lseek(SEEK_DATA/SEEK_HOLE) mmap consistency

Obtained from: OpenZFS
OpenZFS commit: 6c8f03232aa98e950bfe187f9ff53d3541687b50


# 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


# f9693bef 20-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-891568c99

Notable upstream pull request merges:
#11652 Split dmu_zfetch() speculation and execution parts
#11682 Fix zfs_get_data access to files with wrong generation
#11735 Clean up RAIDZ/DRAID ereport code
#11737 Initialize metaslab range trees in metaslab_init
#11739 FreeBSD: make seqc asserts conditional on replay
#11763 Allow setting bootfs property on pools with indirect vdevs
#11767 FreeBSD: Fix memory leaks in kstats

Obtained from: OpenZFS
MFC after: 2 weeks


# 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


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

zfs: fix RAIDZ2/3 not healing parity with 2+ bad disks

From openzfs-master 62d4287f2 commit message:
When scrubbing, (non-sequential) resilvering, or correcting a checksum
error using RAIDZ parity, ZFS should heal any incorrect RAIDZ parity by
overwriting it. For example, if P disks are silently corrupted (P being
the number of failures tolerated; e.g. RAIDZ2 has P=2), `zpool scrub`
should detect and heal all the bad state on these disks, including
parity. This way if there is a subsequent failure we are fully
protected.

With RAIDZ2 or RAIDZ3, a block can have silent damage to a parity
sector, and also damage (silent or known) to a data sector. In this
case the parity should be healed but it is not.

Cherry-picked from openzfs 62d4287f279a0d184f8f332475f27af58b7aa87e
Patch Author: Matthew Ahrens <matthew.ahrens@delphix.com>

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

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

# 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


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

Initial import from vendor-sys branch of openzfs


# 81b22a98 10-Nov-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge openzfs/zfs@6c8f03232 (master) into main

Notable upstream pull request merges:
#12333: Creating gang ABDs for Raidz optional IOs
#12668: FreeBSD: Catch up with recent VFS changes
#12687: Skip spacemaps reading in case of pool readonly import
#12704: Fix some FreeBSD VOPs to synchronize properly with teardown
#12724: Fix lseek(SEEK_DATA/SEEK_HOLE) mmap consistency

Obtained from: OpenZFS
OpenZFS commit: 6c8f03232aa98e950bfe187f9ff53d3541687b50


# 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


# f9693bef 20-Mar-2021 Martin Matuska <mm@FreeBSD.org>

zfs: merge OpenZFS master-891568c99

Notable upstream pull request merges:
#11652 Split dmu_zfetch() speculation and execution parts
#11682 Fix zfs_get_data access to files with wrong generation
#11735 Clean up RAIDZ/DRAID ereport code
#11737 Initialize metaslab range trees in metaslab_init
#11739 FreeBSD: make seqc asserts conditional on replay
#11763 Allow setting bootfs property on pools with indirect vdevs
#11767 FreeBSD: Fix memory leaks in kstats

Obtained from: OpenZFS
MFC after: 2 weeks


# 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


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

zfs: fix RAIDZ2/3 not healing parity with 2+ bad disks

From openzfs-master 62d4287f2 commit message:
When scrubbing, (non-sequential) resilvering, or correcting a checksum
error using RAIDZ parity, ZFS should heal any incorrect RAIDZ parity by
overwriting it. For example, if P disks are silently corrupted (P being
the number of failures tolerated; e.g. RAIDZ2 has P=2), `zpool scrub`
should detect and heal all the bad state on these disks, including
parity. This way if there is a subsequent failure we are fully
protected.

With RAIDZ2 or RAIDZ3, a block can have silent damage to a parity
sector, and also damage (silent or known) to a data sector. In this
case the parity should be healed but it is not.

Cherry-picked from openzfs 62d4287f279a0d184f8f332475f27af58b7aa87e
Patch Author: Matthew Ahrens <matthew.ahrens@delphix.com>

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

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

# 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


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

Initial import from vendor-sys branch of openzfs


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

zfs: fix RAIDZ2/3 not healing parity with 2+ bad disks

From openzfs-master 62d4287f2 commit message:
When scrubbing, (non-sequential) resilvering, or correcting a checksum
error using RAIDZ parity, ZFS should heal any incorrect RAIDZ parity by
overwriting it. For example, if P disks are silently corrupted (P being
the number of failures tolerated; e.g. RAIDZ2 has P=2), `zpool scrub`
should detect and heal all the bad state on these disks, including
parity. This way if there is a subsequent failure we are fully
protected.

With RAIDZ2 or RAIDZ3, a block can have silent damage to a parity
sector, and also damage (silent or known) to a data sector. In this
case the parity should be healed but it is not.

Cherry-picked from openzfs 62d4287f279a0d184f8f332475f27af58b7aa87e
Patch Author: Matthew Ahrens <matthew.ahrens@delphix.com>

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


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