range_tree: Provide more debug details upon unexpected add/remove

Sponsored-by: Klara, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
Signed-off-by: Igor Ostapenko <igor.ostapenko@klarasystems.com>
Closes #17581
This commit is contained in:
Igor Ostapenko
2025-07-31 17:44:42 +03:00
committed by GitHub
parent 2957eabbef
commit cb5e7e097d
13 changed files with 227 additions and 87 deletions
+3 -2
View File
@@ -787,8 +787,9 @@ vdev_rebuild_thread(void *arg)
vdev_rebuild_phys_t *vrp = &vr->vr_rebuild_phys;
vr->vr_top_vdev = vd;
vr->vr_scan_msp = NULL;
vr->vr_scan_tree = zfs_range_tree_create(NULL, ZFS_RANGE_SEG64, NULL,
0, 0);
vr->vr_scan_tree = zfs_range_tree_create_flags(
NULL, ZFS_RANGE_SEG64, NULL, 0, 0,
ZFS_RT_F_DYN_NAME, vdev_rt_name(vd, "vr_scan_tree"));
mutex_init(&vr->vr_io_lock, NULL, MUTEX_DEFAULT, NULL);
cv_init(&vr->vr_io_cv, NULL, CV_DEFAULT, NULL);