aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/spa.c
diff options
context:
space:
mode:
authorMatthew Ahrens <[email protected]>2013-10-08 09:13:05 -0800
committerBrian Behlendorf <[email protected]>2014-07-25 16:40:07 -0700
commitfa86b5dbb6d33371df344efb2adb0aba026d097c (patch)
tree1a512e0af9bff65a349468b30881e4cfa26641d5 /module/zfs/spa.c
parent62b693930876ba8d929632e1ba0ae5dc48a85001 (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/spa.c')
-rw-r--r--module/zfs/spa.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/module/zfs/spa.c b/module/zfs/spa.c
index 397e9e627..fabf16169 100644
--- a/module/zfs/spa.c
+++ b/module/zfs/spa.c
@@ -2347,14 +2347,12 @@ spa_load_impl(spa_t *spa, uint64_t pool_guid, nvlist_t *config,
enabled_feat = fnvlist_alloc();
unsup_feat = fnvlist_alloc();
- if (!feature_is_supported(spa->spa_meta_objset,
- spa->spa_feat_for_read_obj, spa->spa_feat_desc_obj,
+ if (!spa_features_check(spa, B_FALSE,
unsup_feat, enabled_feat))
missing_feat_read = B_TRUE;
if (spa_writeable(spa) || state == SPA_LOAD_TRYIMPORT) {
- if (!feature_is_supported(spa->spa_meta_objset,
- spa->spa_feat_for_write_obj, spa->spa_feat_desc_obj,
+ if (!spa_features_check(spa, B_TRUE,
unsup_feat, enabled_feat)) {
missing_feat_write = B_TRUE;
}
@@ -5957,7 +5955,7 @@ spa_sync_props(void *arg, dmu_tx_t *tx)
zpool_prop_t prop;
const char *propname;
zprop_type_t proptype;
- zfeature_info_t *feature;
+ spa_feature_t fid;
prop = zpool_name_to_prop(nvpair_name(elem));
switch ((int)prop) {
@@ -5968,9 +5966,9 @@ spa_sync_props(void *arg, dmu_tx_t *tx)
ASSERT(zpool_prop_feature(nvpair_name(elem)));
fname = strchr(nvpair_name(elem), '@') + 1;
- VERIFY0(zfeature_lookup_name(fname, &feature));
+ VERIFY0(zfeature_lookup_name(fname, &fid));
- spa_feature_enable(spa, feature, tx);
+ spa_feature_enable(spa, fid, tx);
spa_history_log_internal(spa, "set", tx,
"%s=enabled", nvpair_name(elem));
break;