mirror_zfs/include
Alek P 931deb290c
Prevent range tree corruption race by updating dnode_sync()
Switch to incremental range tree processing in dnode_sync() to avoid
unsafe lock dropping during zfs_range_tree_walk(). This also ensures
the free ranges remain visible to dnode_block_freed() throughout the
sync process, preventing potential stale data reads.

This patch:
 - Keeps the range tree attached during processing for visibility.
 - Processes segments one-by-one by restarting from the tree head.
 - Uses zfs_range_tree_clear() to safely handle ranges that may have
   been modified while the lock was dropped.
 - adds ASSERT()s to document that we don't expect dn_free_ranges
   modification outside of sync context.

Reviewed-by: Paul Dagnelie <paul.dagnelie@klarasystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alek Pinchuk <apinchuk@axcient.com>
Issue #18186
Closes #18235
2026-03-23 18:34:19 -07:00
..
os Convert all HAVE_<name> SIMD gates to HAVE_SIMD(<name>) 2026-03-05 15:01:37 -08:00
sys Prevent range tree corruption race by updating dnode_sync() 2026-03-23 18:34:19 -07:00
.gitignore OpenZFS restructuring - move platform specific sources 2019-09-06 11:26:26 -07:00
cityhash.h SPDX: license tags: MIT 2025-03-13 17:56:54 -07:00
libnvpair.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
libzdb.h libzdb: Initial breakout of libzdb 2024-02-05 10:00:41 -08:00
libzfs_core.h Implement lzc_send_progress 2026-03-06 11:05:58 -08:00
libzfs.h libzfs: teach zfs_create_ancestors() to accept properties 2026-03-09 14:49:52 -07:00
libzfsbootenv.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
libzpool.h zfs_context: move vn_dumpdir to libzpool 2025-11-12 10:01:28 -08:00
libzutil.h Make zpool status dedup table support raw bytes -p output 2026-03-13 09:53:56 -07:00
Makefile.am Add simd_config.h and HAVE_SIMD() selector 2026-03-05 15:01:42 -08:00
zfeature_common.h Implement physical rewrites 2025-08-06 10:36:56 -07:00
zfs_comutil.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zfs_crrd.h Add TXG timestamp database 2025-08-06 10:31:21 -07:00
zfs_deleg.h ZFS allow send:encrypted 2025-09-12 09:53:31 -07:00
zfs_fletcher.h Convert all HAVE_<name> SIMD gates to HAVE_SIMD(<name>) 2026-03-05 15:01:37 -08:00
zfs_namecheck.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zfs_prop.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zfs_valstr.h events: include zio type in IO error reports 2025-05-30 10:29:29 -04:00