Defer resilver only when progress is above a threshold v3
This commit is contained in:
parent
42cc3904aa
commit
94e4a29191
|
@ -4286,7 +4286,6 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t *tx)
|
||||||
*/
|
*/
|
||||||
restart_early = (spa_sync_pass(spa) == 1) &&
|
restart_early = (spa_sync_pass(spa) == 1) &&
|
||||||
spa->spa_resilver_deferred &&
|
spa->spa_resilver_deferred &&
|
||||||
!dsl_scan_restarting(scn, tx) &&
|
|
||||||
(issued < (to_issue * zfs_resilver_defer_percent / 100));
|
(issued < (to_issue * zfs_resilver_defer_percent / 100));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -4302,8 +4301,9 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t *tx)
|
||||||
dsl_scan_done(scn, B_FALSE, tx);
|
dsl_scan_done(scn, B_FALSE, tx);
|
||||||
if (vdev_resilver_needed(spa->spa_root_vdev, NULL, NULL))
|
if (vdev_resilver_needed(spa->spa_root_vdev, NULL, NULL))
|
||||||
func = POOL_SCAN_RESILVER;
|
func = POOL_SCAN_RESILVER;
|
||||||
zfs_dbgmsg("restarting scan func=%u on %s txg=%llu",
|
zfs_dbgmsg("restarting scan func=%u on %s txg=%llu early=%d",
|
||||||
func, dp->dp_spa->spa_name, (longlong_t)tx->tx_txg);
|
func, dp->dp_spa->spa_name, (longlong_t)tx->tx_txg,
|
||||||
|
restart_early);
|
||||||
dsl_scan_setup_sync(&func, tx);
|
dsl_scan_setup_sync(&func, tx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue