Ameer Hamza
b8610c3d93
L2ARC: Reorder header destruction for in-flight L2 writes
...
With multiple L2ARC devices, headers can be destroyed asynchronously
(e.g., during zpool sync) while L2_WRITING is set. The original code
destroyed L2HDR before L1HDR, causing ABDs to lose their device
association (b_l2hdr.b_dev) when arc_hdr_free_abd() is called.
This caused ABDs to be added to the global free-on-write list without
device information. When any L2ARC device completed its write and
attempted to free these orphaned ABDs, it would panic on
ASSERT(!list_link_active(&abd->abd_gang_link)) because the ABD was
still part of another device's vdev_queue I/O aggregation gang.
Fix by extending l2ad_mtx lock scope to cover L1HDR destruction and
reordering to destroy L1HDR before L2HDR when L2_WRITING is set. This
ensures arc_hdr_free_abd() can access b_l2hdr.b_dev to properly tag
ABDs with their device for deferred cleanup.
Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com >
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov >
Signed-off-by: Ameer Hamza <ahamza@ixsystems.com >
Closes #18093
2026-02-04 10:06:51 -08:00
..
2025-12-09 09:12:16 -08:00
2025-03-13 17:56:27 -07:00
2026-02-04 10:06:51 -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-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
2025-08-07 11:41:42 -07:00
2025-08-08 16:43:26 -07:00
2025-03-13 17:56:27 -07:00
2026-01-26 21:32:16 -05:00
2025-12-15 09:17:04 -08:00
2025-03-13 17:56:27 -07:00
2025-12-15 14:52:44 -08:00
2026-01-13 15:07:15 -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
2025-12-01 14:43:42 -08:00
2026-01-07 16:47:12 -08:00
2025-10-29 11:17:51 -07:00
2025-08-07 11:41:42 -07:00
2025-08-06 10:36:07 -07:00
2025-08-07 11:40:59 -07:00
2025-09-08 10:03:01 -07:00
2025-11-10 16:16:22 -08:00
2025-08-07 11:41:42 -07:00
2025-11-04 13:12:17 -08:00
2025-08-07 11:41:42 -07:00
2025-08-07 11:41:42 -07:00
2026-01-06 09:36:20 -08:00
2025-08-13 15:56:25 -04:00
2025-08-07 11:40:59 -07: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
2025-12-18 10:22:11 -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
2025-10-29 11:17:51 -07:00
2025-11-10 14:23:39 -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
2025-09-29 16:38:52 -07:00
2025-05-02 15:32:18 -07: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
2025-03-13 17:56:27 -07:00
2025-12-18 10:22:11 -08:00
2025-08-07 11:40:59 -07:00
2026-01-26 21:33:21 -05: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
2025-09-10 15:25:03 -07:00
2025-09-10 11:13:55 -07: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
2025-10-30 16:29:48 -07:00
2025-08-06 10:36:07 -07:00
2025-05-02 15:32:18 -07:00
2025-09-08 10:03:01 -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-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
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
2025-03-13 17:56:27 -07:00
2025-05-28 16:50:22 -07:00
2025-12-17 14:00:01 -08:00
2025-11-10 14:23:39 -08:00
2025-11-10 14:23:39 -08:00
2025-05-02 15:32:18 -07:00
2025-11-10 14:23:39 -08:00
2026-01-14 17:02:41 -08: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
2025-11-12 10:01:48 -08:00
2025-03-13 17:56:27 -07:00
2026-01-14 14:51:51 -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
2025-08-08 16:43:09 -07:00
2025-04-03 10:35:22 -07:00
2025-08-14 08:50:17 -07:00
2025-08-07 11:40:59 -07:00
2025-08-06 17:10:03 -07:00
2025-11-10 14:23:39 -08:00
2025-12-15 09:17:04 -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
2025-11-10 14:23:39 -08:00