mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 19:04:45 +03:00
Fix rare cksum errors after rebuild
Currently, after rebuild (aka sequential resilver), checksum errors can be seen sometimes on the spare vdev or draid spare. On my laptop, it happens from 2 to 4 times of running redundancy_draid_spare1 test in a loop for 100 times. It looks like there's a race in vdev_rebuild_thread() when the rebuild of space map ranges is finished and we re-enable allocations from the metaslab too soon: a new allocations may happen from that metaslab before txg with the rebuilt ranges is sync-ed, causing undesirable interference. Solution: wait for the txg to be sync-ed before enabling metaslab. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Akash B <akash-b@hpe.com> Signed-off-by: Andriy Tkachuk <atkachuk@wasabi.com> Closes #18307 Closes #18319 Closes #18473
This commit is contained in:
committed by
Tony Hutter
parent
b0c1dcb531
commit
76fd64ac9f
@@ -70,6 +70,7 @@ typedef struct vdev_rebuild {
|
||||
zfs_range_tree_t *vr_scan_tree;
|
||||
kmutex_t vr_io_lock; /* inflight IO lock */
|
||||
kcondvar_t vr_io_cv; /* inflight IO cv */
|
||||
uint64_t vr_last_txg; /* last used txg */
|
||||
|
||||
/* In-core state and progress */
|
||||
uint64_t vr_scan_offset[TXG_SIZE];
|
||||
|
||||
Reference in New Issue
Block a user