mirror_zfs/module
Alan Somers fa2cdaa604 More aggressively assert that db_mtx protects db.db_data
db.db_mtx must be held any time that db.db_data is accessed.  All of
these functions do have the lock held by a parent; add assertions to
ensure that it stays that way.

See https://github.com/openzfs/zfs/discussions/17118

* Refactor dbuf_read_bonus to make it obvious why db_rwlock isn't
required.

* Refactor dbuf_hold_copy to eliminate the db_rwlock
Copy data into the newly allocated buffer before assigning it to the db.
That way, there will be no need to take db->db_rwlock.

* Refactor dbuf_read_hole
In the case of an indirect hole, initialize the newly allocated buffer
before assigning it to the dmu_buf_impl_t.

Sponsored by:	ConnectWise
Signed-off-by: Alan Somers <asomers@gmail.com>
Closes #17209
(cherry picked from commit c17bdc4914)
2025-05-28 16:00:28 -07:00
..
avl SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
icp gcm_avx_init: zero the ghash state after hashing the IV 2025-04-16 09:59:45 -07:00
lua SPDX: license tags: MIT 2025-04-16 09:59:44 -07:00
nvpair SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
os FreeBSD: Use new SYSCTL_SIZEOF() 2025-05-28 16:00:28 -07:00
unicode [2.3.2] uconv: add SPDX license tag 2025-04-16 09:59:45 -07:00
zcommon GCC 15: Fix unterminated-string-initialization (#17244) 2025-04-16 09:59:45 -07:00
zfs More aggressively assert that db_mtx protects db.db_data 2025-05-28 16:00:28 -07:00
zstd SPDX: license tags: BSD-3-Clause OR GPL-2.0-only 2025-04-16 09:59:44 -07:00
.gitignore FreeBSD: Ignore symlink to i386 includes 2022-08-02 16:34:23 -07:00
Kbuild.in vdev_file: unify FreeBSD and Linux implementations (#17046) 2025-02-28 00:42:29 +05:00
Makefile.bsd freebsd: unbreak module/Makefile.bsd build on 15-CURRENT-arm64 2025-04-16 09:59:45 -07:00
Makefile.in Fix "make install" with DESTDIR set (#16995) 2025-02-28 00:42:29 +05:00