This way we can avoid making assumptions about the SDT probe
implementation. No functional change intended.
This was submitted upstream as https://github.com/openzfs/zfs/pull/16284
MFC after: 1 week
Upstream added the libspl_gettid implementation for macOS and when
merging back to FreeBSD this resulted in two copies of the same code.
Delete this second copy, restoring the file to be the same as upstream.
Fixes: aca928a50a ("zfs: merge openzfs/zfs@e2357561b")
Notable upstream pull request merges:
#1594041ae864b6 Replace P2ALIGN with P2ALIGN_TYPED and delete P2ALIGN
#161285137c132a zpool import output is not formated properly
#16138efbef9e6c FreeBSD: Add zfs_link_create() error handling
#1614604bae5ec9 Disable high priority ZIO threads on FreeBSD and Linux
#16151cc3869153 zfs_ioc_send: use a dedicated taskq thread for send
#16151adda768e3 spa: remove spa_taskq_dispatch_sync()
#16151515c4dd21 spa: flatten spa_taskq_dispatch_ent()
#161510a543db37 spa_taskq_dispatch_ent: simplify arguments
#16153975a13259 Add support for parallel pool exports
#1615389acef992 Simplified the scope of the namespace lock
#16159136c05321 ZAP: Fix leaf references on zap_expand_leaf() errors
#16162af5dbed31 Fix scn_queue races on very old pools
#161653400127a7 Fix ZIL clone records for legacy holes
#16167414acbd37 Unbreak FreeBSD cross-build on MacOS broken in 051460b8b#16172eced2e2f1 libzfs: Fix mounting datasets under thread limit pressure
#16178b64afa41d Better control the thread pool size when mounting datasets
#16181fa99d9cd9 zfs_dbgmsg_print: make FreeBSD and Linux consistent
#16191e675852bc dbuf: separate refcount calls for dbuf and dbuf_user
#16198a043b60f1 Correct level handling in zstream recompress
#1620434906f8bb zap: reuse zap_leaf_t on dbuf reuse after shrink
#16206d0aa9dbcc Use memset to zero stack allocations containing unions
#162078865dfbca Fix assertion in Persistent L2ARC
#1620808648cf0d Allow block cloning to be interrupted by a signal
#16210e2357561b FreeBSD: Add const qualifier to members of struct
opensolaris_utsname
#16214800d59d57 Some improvements to metaslabs eviction
#1621602c5aa9b0 Destroy ARC buffer in case of fill error
#1622501c8efdd5 Simplify issig()
Obtained from: OpenZFS
OpenZFS commit: e2357561b9
da76d34 repurposed the use of UMA_MD_SMALL_ALLOC in a way that breaks
arc_available_memory on -CURRENT. This change ensures that
arc_available_memory uses the new symbol while maintaining compatibility
with older FreeBSD releases. This change was submitted to upstream
as well.
Approved by: markj (mentor)
Fixes: da76d34
Code for pools before version 11 uses dmu_objset_find_dp() to scan
for children datasets/clones. It calls enqueue_clones_cb() and
enqueue_cb() callbacks in parallel from multiple taskq threads.
It ends up bad for scan_ds_queue_insert(), corrupting scn_queue
AVL-tree. Fix it by introducing a mutex to protect those two
scan_ds_queue_insert() calls. All other calls are done from the
sync thread and so serialized.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #16162
PR: 278414
On 32-bit platforms long long is generally 64-bits. Sufficiently modern
versions of gcc (13 in my testing) complains when casting a pointer to
an integer of a different width so cast to uintptr_t first to avoid the
warning.
Fix i386 gcc builds while we wait for this to be merged to OpenZFS.
Sponsored by: DARPA, AFRL
Pull Request: https://github.com/openzfs/zfs/pull/16203
Notable upstream pull request merges:
#15839c3f2f1aa2 vdev probe to slow disk can stall mmp write checker
#158885044c4e3f Fast Dedup: ZAP Shrinking
#15996db499e68f Overflowing refreservation is bad
#1611867d13998b Make more taskq parameters writable
#1612821bc066ec Fix updating the zvol_htable when renaming a zvol
#16130645b83307 Improve write issue taskqs utilization
#161318fd3a5d02 Slightly improve dnode hash
#16134a6edc0adb zio: try to execute TYPE_NULL ZIOs on the current task
#16141b28461b7c Fix arcstats for FreeBSD after zfetch support
Obtained from: OpenZFS
OpenZFS commit: 8f1b7a6fa6
Notable upstream pull request merges:
#15793401c3563d libzfs: use zfs_strerror() in place of strerror()
#15793692f0daba libzfs: make userquota_propname_decode threadsafe
#157980cbf13529 libnvpair.c: replace strstr() with strchr() for a single
character
#1581278e8c1f84 Remove list_size struct member from list implementation
#15816aeb33776f Update vdev devid and physpath if changed between imports
#158188161b7327 Don't assert mg_initialized due to device addition race
#15823c3fd7a521 Update man pages to time(1) from time(2)
#15825884a48d99 zpool wait: print timestamp before the header
Obtained from: OpenZFS
OpenZFS commit: 2e6b3c4d94
Notable upstream pull request merges:
#1566066670ba9f fix(mount): do not truncate shares not zfs mount
#157193bddc4dae spa: Fix FreeBSD sysctl handlers (already merged)
#157195a703d136 spa: Let spa_taskq_param_get()'s addition of a newline
be optional
#157216138af86b Stop wasting time on malloc in snprintf_zstd_header
#157231f5bf9600 Make zdb -R a little more sane.
#1572620dd16d9f Make zdb -R scale less poorly
#15737d9885b377 fix: Uber block label not always found for aux vdevs
#157372df2a58dc Extend aux label to add path information
#15737b64be1624 Add path handling for aux vdevs in `label_path`
#15747a1771d243 Fix "out of memory" error
#157521a11ad9d2 Fix a potential use-after-free in zfs_setsecattr()
#15772f45dd90f3 Fix cloning into mmaped and cached file
#157811494e8fba Autotrim High Load Average Fix
Obtained from: OpenZFS
OpenZFS commit: a0b2a93c41
sbuf_cpy() resets the sbuf state, which is wrong for sbufs allocated by
sbuf_new_for_sysctl(). In particular, this code triggers an assertion
failure in sbuf_clear().
Simplify by just using sysctl_handle_string() for both reading and
setting the tunable.
Apply to FreeBSD directly since this bug causes "sysctl -a" to crash the
kernel.
PR: 276039
Reported by: pho
Reviewed by: mav
Pull Request: https://github.com/openzfs/zfs/pull/15719
Notable upstream pull request merges:
#15643a9b937e06 For db_marker inherit the db pointer for AVL comparision
#15644e53e60c0b DMU: Fix lock leak on dbuf_hold() error
#1565386063d903 dbuf: Handle arcbuf assignment after block cloning
#1565686e115e21 dbuf: Set dr_data when unoverriding after clone
Obtained from: OpenZFS
OpenZFS commit: 86e115e21e
#15539687e4d7f9 Extend import_progress kstat with a notes field
#15544c7b611926 Allow block cloning across encrypted datasets
#15553adcea23cb ZIO: Add overflow checks for linear buffers
#155935f2700eee zpool: flush output before sleeping
#156093e4bef52b Only provide execvpe(3) when needed
#15610735ba3a7b Use uint64_t instead of u_int64_t
#15612bcd83ccd2 ZIL: Remove TX_CLONE_RANGE replay for ZVOLs
#1561755b764e06 ZIL: Do not clone blocks from the future
#15623727497ccd module/icp/asm-arm/sha2: enable non-SIMD asm kernels
on armv5/6
#156259743d0963 BRT: Limit brt_vdev_dump() to only one vdev
#15629f9765b182 zdb: Dump encrypted write and clone ZIL records
#156342aa3a482a ZIL: Remove 128K into 2x68K LWB split optimization
#1563911656234b FreeBSD: Ensure that zfs_getattr() initializes the
va_rdev field
#156474836d293c zfs_refcount_remove: explictly ignore returns
#15649f0cb6482e setproctitle: fix ununitialised variable
#15650450f2d0b0 import: ignore return on hostid lookups
Obtained from: OpenZFS
OpenZFS commit: 450f2d0b08
32-bit builds are broken. fix that by using PRIu64 instead of a
bare '%lu.'
Feel free to revert when upstream has this fixed. I'm agnostic as to the
proper fix, but don't have the time to fight upstreaming this on top of
everything else.
Notable upstream pull request merges:
#15532c1a47de86 zdb: Fix zdb '-O|-r' options with -e/exported zpool
#15535cf3316633 ZVOL: Minor code cleanup
#15541803a9c12c brt: lift internal definitions into _impl header
#15541213d68296 zdb: show BRT statistics and dump its contents
#15543a49087510 ZIL: Refactor TX_WRITE encryption similar to
TX_CLONE_RANGE
#1554327d8c23c5 ZIL: Do not encrypt block pointers in lr_clone_range_t
#1554967894a597 unnecessary alloc/free in dsl_scan_visitbp()
#15551126efb588 FreeBSD: Fix the build on FreeBSD 12
#15563acb33ee1c FreeBSD: Fix ZFS so that snapshots under .zfs/snapshot are
NFS visible
#155647bbd42ef4 Don't allow attach to a raidz child vdev
#15566688514e47 dmu_buf_will_clone: fix race in transition back to NOFILL
#1557130d581121 dnode_is_dirty: check dnode and its data for dirtiness
Obtained from: OpenZFS
OpenZFS commit: 688514e470
Notable upstream pull request merges:
#15366c3773de1 ZIL: Cleanup sync and commit handling
#15409dbe839a9 zvol: Cleanup set property
#1540960387fac zvol: Implement zvol threading as a Property
#154099ccdb8be zvol: fix delayed update to block device ro entry
#1544805a7348a RAIDZ: Use cache blocking during parity math
#15452514d661c Tune zio buffer caches and their alignments
#15456799e09f7 Unify arc_prune_async() code
#15465763ca47f Fix block cloning between unencrypted and encrypted
datasets
To make the module version better comparable, the module version number
now includes the commit count since last tag.
Obtained from: OpenZFS
OpenZFS commit: 41e55b476b
Notable upstream pull request merges:
#14378c0e58995e Large sync writes perform worse with slog
#14721797f55ef1 Do not persist user/group/project quota zap objects
when unneeded
#15356380c25f64 FreeBSD: Improve taskq wrapper
#153904fbc52495 Remove lock from dsl_pool_need_dirty_delay()
#1539757b409856 Trust ARC_BUF_SHARED() more
#15402b29e98fa8 Properly pad struct tx_cpu to cache line
#15405ea30b5a9e Set spa_ccw_fail_time=0 when expanding a vdev
#15416b9384b949 FreeBSD: taskq: Remove unused declaration
Obtained from: OpenZFS
OpenZFS commit: 797f55ef12
Notable upstream pull request merges:
#15368008baa091 FreeBSD: Reduce divergence from in-tree sources
#153711b310dfb1 DMU: Do not pre-read holes during write
#153958a7407012 Zpool can start allocating from metaslab before
TRIMs have completed
Obtained from: OpenZFS
OpenZFS commit: 8a74070128
Notable upstream pull request merges:
#1529054b1b1d89 import: require force when cachefile hostid doesn't
match on-disk
#15319342357cd9 Reduce number of metaslab preload taskq threads
#153402a6c62109 ARC: Remove b_cv from struct l1arc_buf_hdr
#1534775a2eb7fa ARC: Drop different size headers for crypto
#1535096b9cf42e ARC: Remove b_bufcnt/b_ebufcnt from ARC headers
#1535366b81b349 ZIL: Reduce maximum size of WR_COPIED to 7.5K
#153625b8688e62 zfsconcepts: add description of block cloning
Obtained from: OpenZFS
OpenZFS commit: 66b81b3497
Notable upstream pull request merges:
#15240bbac1d297 Update the behavior of mountpoint property
#15240c63aabaf1 Improve the handling of sharesmb,sharenfs properties
#15248741c215ba Fix l2arc_apply_transforms ztest crash
#15274ee720ad7b Retire z_nr_znodes
#1527890149552b ZIL: Fix potential race on flush deferring
#15279e923bcd16 Update the MOS directory on spa_upgrade_errlog()
#15281529bec7d7 zed: Allow autoreplace and fault LEDs for removed vdevs
#152887228ba111 cmd: add 'help' subcommand to zpool and zfs
#152974647353c8 status: report pool suspension state under
failmode=continue
Obtained from: OpenZFS
OpenZFS commit: 4647353c8b
Notable upstream pull request merges:
#15018 Increase limit of redaction list by using spill block
#15161 Make zoned/jailed zfsprops(7) make more sense
#15216 Relax error reporting in zpool import and zpool split
#15218 Selectable block allocators
#15227 ZIL: Tune some assertions
#15228 ZIL: Revert zl_lock scope reduction
#15233 ZIL: Change ZIOs issue order
Obtained from: OpenZFS
OpenZFS commit: 95f71c019d
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: 804414aad2
Vendor PR:
#15103 Remove zl_issuer_lock from zil_suspend()
Obtained from: OpenZFS
OpenZFS commit: 2848de11e5
Note: full vendor imports will continue when stable/14 has been branched