Skip to content

Commit

Permalink
Defer resilver only when progress is above a threshold v3
Browse files Browse the repository at this point in the history
  • Loading branch information
snajpa committed Jan 25, 2024
1 parent b60ccd2 commit fd66064
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions module/zfs/dsl_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -4286,7 +4286,6 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t *tx)
*/
restart_early = (spa_sync_pass(spa) == 1) &&
spa->spa_resilver_deferred &&
!dsl_scan_restarting(scn, tx) &&
(issued < (to_issue * zfs_resilver_defer_percent / 100));

/*
Expand All @@ -4302,8 +4301,9 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t *tx)
dsl_scan_done(scn, B_FALSE, tx);
if (vdev_resilver_needed(spa->spa_root_vdev, NULL, NULL))
func = POOL_SCAN_RESILVER;
zfs_dbgmsg("restarting scan func=%u on %s txg=%llu",
func, dp->dp_spa->spa_name, (longlong_t)tx->tx_txg);
zfs_dbgmsg("restarting scan func=%u on %s txg=%llu early=%d",
func, dp->dp_spa->spa_name, (longlong_t)tx->tx_txg,
restart_early);
dsl_scan_setup_sync(&func, tx);
}

Expand Down

0 comments on commit fd66064

Please sign in to comment.