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
..
2025-12-09 09:12:16 -08:00
2025-03-13 17:56:27 -07:00
2026-03-10 11:00:23 -07:00
2025-03-13 17:56:27 -07:00
2025-03-13 17:56:27 -07:00
2025-03-13 17:56:27 -07:00
2025-10-29 11:17:51 -07:00
2025-10-29 11:17:51 -07:00
2025-03-13 17:56:27 -07:00
2025-11-10 16:16:22 -08:00
2026-02-22 11:43:51 -08:00
2026-02-19 10:15:41 -08:00
2025-03-13 17:56:27 -07:00
2026-03-23 18:34:19 -07:00
2026-02-19 10:15:41 -08:00
2026-02-25 09:41:38 -05:00
2025-12-15 14:52:44 -08:00
2026-02-19 10:15:41 -08:00
2025-08-06 10:36:07 -07:00
2025-08-07 11:41:42 -07:00
2025-08-07 11:41:42 -07:00
2026-02-09 10:17:56 -08:00
2026-02-05 15:48:03 -08:00
2026-03-03 09:08:23 -08:00
2025-08-07 11:41:42 -07:00
2025-08-06 10:36:07 -07:00
2026-02-04 10:12:32 -08:00
2025-09-08 10:03:01 -07:00
2026-02-16 10:33:21 -05:00
2026-03-23 18:34:19 -07:00
2026-03-23 18:34:19 -07:00
2026-03-03 09:08:23 -08:00
2026-03-03 09:08:23 -08:00
2026-01-06 09:36:20 -08:00
2026-03-03 09:08:23 -08:00
2026-03-03 09:08:23 -08:00
2025-08-07 11:41:42 -07:00
2025-08-07 11:40:59 -07:00
2025-08-07 11:41:37 -07:00
2025-08-07 11:40:59 -07:00
2026-03-03 09:08:23 -08:00
2025-05-28 10:28:59 -07:00
2025-08-07 11:40:59 -07:00
2025-03-13 17:56:27 -07:00
2025-08-07 11:40:59 -07:00
2025-03-13 17:56:27 -07:00
2025-03-13 17:56:27 -07:00
2025-03-13 17:56:46 -07:00
2025-03-13 17:56:46 -07:00
2025-03-13 17:56:27 -07:00
2026-03-02 15:50:23 -08:00
2026-02-09 09:36:01 -08:00
2025-08-12 13:36:03 -07:00
2025-03-13 17:56:27 -07:00
2025-03-13 17:56:27 -07:00
2026-02-25 11:26:10 -08:00
2026-03-03 09:08:23 -08:00
2025-08-07 11:41:37 -07:00
2026-01-26 21:32:16 -05:00
2025-03-13 17:56:27 -07:00
2025-03-13 17:56:27 -07:00
2025-10-29 11:17:51 -07:00
2025-11-10 14:23:39 -08:00
2025-08-06 10:36:07 -07:00
2025-10-29 11:17:51 -07:00
2026-02-19 10:36:35 -08:00
2026-03-11 14:54:20 -07:00
2025-08-07 11:40:59 -07:00
2026-03-02 15:50:23 -08:00
2025-10-29 11:17:51 -07:00
2025-08-07 11:40:59 -07:00
2018-06-06 09:35:59 -07:00
2018-06-06 09:35:59 -07:00
2025-05-28 10:27:46 -07:00
2025-12-22 14:58:36 -08:00
2025-03-13 17:56:27 -07:00
2025-03-13 17:56:27 -07:00
2025-03-13 17:57:31 -07:00
2026-03-11 14:54:20 -07:00
2026-02-23 09:34:33 -08:00
2025-10-29 11:17:51 -07:00
2025-10-29 11:17:51 -07:00
2025-08-07 11:41:42 -07:00
2025-11-10 14:23:39 -08:00
2026-02-09 09:36:01 -08:00
2025-08-06 10:36:07 -07:00
2025-05-02 15:32:18 -07:00
2026-03-03 09:08:23 -08:00
2025-03-13 17:56:27 -07:00
2025-03-13 17:56:27 -07:00
2025-03-13 17:56:27 -07:00
2026-03-05 15:01:37 -08:00
2026-03-05 15:01:37 -08:00
2026-03-05 15:01:37 -08:00
2025-03-13 17:56:27 -07:00
2025-03-13 17:56:27 -07:00
2025-03-13 17:56:27 -07:00
2025-03-13 17:56:27 -07:00
2026-03-05 15:01:37 -08:00
2026-03-05 15:01:37 -08:00
2026-03-05 15:01:37 -08:00
2025-12-17 14:00:01 -08:00
2026-03-11 14:54:20 -07:00
2026-03-04 09:12:14 -05:00
2025-05-02 15:32:18 -07:00
2025-11-10 14:23:39 -08:00
2026-03-11 14:54:20 -07:00
2025-03-13 17:56:27 -07:00
2025-12-15 14:38:34 -08:00
2025-12-15 14:38:34 -08:00
2026-01-06 09:36:20 -08:00
2025-03-13 17:56:27 -07:00
2025-03-13 17:56:27 -07:00
2025-03-13 17:56:27 -07:00
2025-06-10 14:53:10 -07:00
2025-08-07 11:41:42 -07:00
2025-08-22 16:35:58 -07:00
2025-03-13 17:56:27 -07:00
2025-12-01 10:14:52 -08:00
2025-09-12 16:33:36 -07:00
2025-04-18 09:22:16 -04:00
2025-12-01 14:43:42 -08:00
2026-03-03 09:08:23 -08:00
2025-03-13 17:56:27 -07:00
2026-02-11 10:30:26 -08:00
2025-08-08 16:43:20 -07:00
2025-03-13 17:56:27 -07:00
2025-12-17 21:59:47 -05:00
2025-03-13 17:56:27 -07:00
2025-03-18 16:04:22 -07:00
2025-08-07 11:41:25 -07:00
2025-08-08 16:43:09 -07:00
2026-02-10 09:53:24 -08:00
2025-04-03 10:35:22 -07:00
2026-03-04 09:12:14 -05:00
2025-08-07 11:40:59 -07:00
2026-02-19 10:15:41 -08:00
2025-11-10 14:23:39 -08:00
2026-03-03 09:08:23 -08:00
2025-03-13 17:56:27 -07:00
2025-08-07 11:41:42 -07:00
2025-08-07 11:41:42 -07:00
2026-03-12 18:30:58 -07:00