Print this page
4171 clean up spa_feature_*() interfaces
4172 implement extensible_dataset feature for use by other zpool features
Reviewed by: Max Grossman <max.grossman@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
*** 2298,2315 ****
}
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,
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,
unsup_feat, enabled_feat)) {
missing_feat_write = B_TRUE;
}
}
--- 2298,2313 ----
}
enabled_feat = fnvlist_alloc();
unsup_feat = fnvlist_alloc();
! 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 (!spa_features_check(spa, B_TRUE,
unsup_feat, enabled_feat)) {
missing_feat_write = B_TRUE;
}
}
*** 5912,5934 ****
uint64_t intval;
char *strval, *fname;
zpool_prop_t prop;
const char *propname;
zprop_type_t proptype;
! zfeature_info_t *feature;
switch (prop = zpool_name_to_prop(nvpair_name(elem))) {
case ZPROP_INVAL:
/*
* We checked this earlier in spa_prop_validate().
*/
ASSERT(zpool_prop_feature(nvpair_name(elem)));
fname = strchr(nvpair_name(elem), '@') + 1;
! VERIFY0(zfeature_lookup_name(fname, &feature));
! spa_feature_enable(spa, feature, tx);
spa_history_log_internal(spa, "set", tx,
"%s=enabled", nvpair_name(elem));
break;
case ZPOOL_PROP_VERSION:
--- 5910,5932 ----
uint64_t intval;
char *strval, *fname;
zpool_prop_t prop;
const char *propname;
zprop_type_t proptype;
! spa_feature_t fid;
switch (prop = zpool_name_to_prop(nvpair_name(elem))) {
case ZPROP_INVAL:
/*
* We checked this earlier in spa_prop_validate().
*/
ASSERT(zpool_prop_feature(nvpair_name(elem)));
fname = strchr(nvpair_name(elem), '@') + 1;
! VERIFY0(zfeature_lookup_name(fname, &fid));
! spa_feature_enable(spa, fid, tx);
spa_history_log_internal(spa, "set", tx,
"%s=enabled", nvpair_name(elem));
break;
case ZPOOL_PROP_VERSION: