Defer resilver only when progress is above a threshold v2
Fix the restart_early condition to avoid restart loop on pool export.
This commit is contained in:
parent
f8b3efbf30
commit
8100df022b
|
@ -4284,7 +4284,8 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t *tx)
|
||||||
/*
|
/*
|
||||||
* Make sure we're not in a restart loop and check the threshold
|
* Make sure we're not in a restart loop and check the threshold
|
||||||
*/
|
*/
|
||||||
restart_early = spa->spa_resilver_deferred &&
|
restart_early = (spa_sync_pass(spa) == 1) &&
|
||||||
|
spa->spa_resilver_deferred &&
|
||||||
!dsl_scan_restarting(scn, tx) &&
|
!dsl_scan_restarting(scn, tx) &&
|
||||||
(issued < (to_issue * zfs_resilver_defer_percent / 100));
|
(issued < (to_issue * zfs_resilver_defer_percent / 100));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue