diff options
author | Matthew Ahrens <[email protected]> | 2013-10-08 09:13:05 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2014-07-25 16:40:07 -0700 |
commit | fa86b5dbb6d33371df344efb2adb0aba026d097c (patch) | |
tree | 1a512e0af9bff65a349468b30881e4cfa26641d5 /module/zfs/dsl_scan.c | |
parent | 62b693930876ba8d929632e1ba0ae5dc48a85001 (diff) |
Illumos 4171, 4172
4171 clean up spa_feature_*() interfaces
4172 implement extensible_dataset feature for use by other zpool features
Reviewed by: Max Grossman <[email protected]>
Reviewed by: Christopher Siden <[email protected]>
Reviewed by: George Wilson <[email protected]>
Reviewed by: Jerry Jelinek <[email protected]>
Approved by: Garrett D'Amore <[email protected]>a
References:
https://www.illumos.org/issues/4171
https://www.illumos.org/issues/4172
https://github.com/illumos/illumos-gate/commit/2acef22
Ported-by: Tim Chase <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #2528
Diffstat (limited to 'module/zfs/dsl_scan.c')
-rw-r--r-- | module/zfs/dsl_scan.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/module/zfs/dsl_scan.c b/module/zfs/dsl_scan.c index 7807f8485..22b68d685 100644 --- a/module/zfs/dsl_scan.c +++ b/module/zfs/dsl_scan.c @@ -98,7 +98,7 @@ dsl_scan_init(dsl_pool_t *dp, uint64_t txg) */ ASSERT(!scn->scn_async_destroying); scn->scn_async_destroying = spa_feature_is_active(dp->dp_spa, - &spa_feature_table[SPA_FEATURE_ASYNC_DESTROY]); + SPA_FEATURE_ASYNC_DESTROY); err = zap_lookup(dp->dp_meta_objset, DMU_POOL_DIRECTORY_OBJECT, "scrub_func", sizeof (uint64_t), 1, &f); @@ -1415,7 +1415,6 @@ dsl_scan_active(dsl_scan_t *scn) return (B_FALSE); if (spa_shutting_down(spa)) return (B_FALSE); - if (scn->scn_phys.scn_state == DSS_SCANNING || scn->scn_async_destroying) return (B_TRUE); @@ -1474,7 +1473,7 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t *tx) VERIFY3U(0, ==, zio_wait(scn->scn_zio_root)); if (err == 0 && spa_feature_is_active(spa, - &spa_feature_table[SPA_FEATURE_ASYNC_DESTROY])) { + SPA_FEATURE_ASYNC_DESTROY)) { ASSERT(scn->scn_async_destroying); scn->scn_is_bptree = B_TRUE; scn->scn_zio_root = zio_root(dp->dp_spa, NULL, @@ -1485,11 +1484,11 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t *tx) VERIFY0(zio_wait(scn->scn_zio_root)); if (err == 0) { - zfeature_info_t *feat = &spa_feature_table - [SPA_FEATURE_ASYNC_DESTROY]; /* finished; deactivate async destroy feature */ - spa_feature_decr(spa, feat, tx); - ASSERT(!spa_feature_is_active(spa, feat)); + spa_feature_decr(spa, SPA_FEATURE_ASYNC_DESTROY, + tx); + ASSERT(!spa_feature_is_active(spa, + SPA_FEATURE_ASYNC_DESTROY)); VERIFY0(zap_remove(dp->dp_meta_objset, DMU_POOL_DIRECTORY_OBJECT, DMU_POOL_BPTREE_OBJ, tx)); |