Skip to content

Commit

Permalink
always make sure the feature is active
Browse files Browse the repository at this point in the history
as I can't reproduce the zfeature.c assert I'm going to take a blind guess
and see if this is what is making it unhappy

Signed-off-by: Pavel Snajdr <[email protected]>
  • Loading branch information
snajpa committed Jan 28, 2024
1 parent b424e22 commit 6e82fa2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions module/zfs/dsl_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -4266,6 +4266,10 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t *tx)
uint64_t to_issue, issued;
int restart_early;

if (spa->spa_resilver_deferred &&
!spa_feature_is_active(dp->dp_spa, SPA_FEATURE_RESILVER_DEFER))
spa_feature_incr(spa, SPA_FEATURE_RESILVER_DEFER, tx);

/*
* Only process scans in sync pass 1.
*/
Expand Down Expand Up @@ -4297,10 +4301,6 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t *tx)
zfs_resilver_disable_defer ||
(issued < (to_issue * zfs_resilver_defer_percent / 100)));

if (spa->spa_resilver_deferred &&
!spa_feature_is_active(dp->dp_spa, SPA_FEATURE_RESILVER_DEFER))
spa_feature_incr(spa, SPA_FEATURE_RESILVER_DEFER, tx);

/*
* Check for scn_restart_txg before checking spa_load_state, so
* that we can restart an old-style scan while the pool is being
Expand Down

0 comments on commit 6e82fa2

Please sign in to comment.