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/spa_misc.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/spa_misc.c')
-rw-r--r-- | module/zfs/spa_misc.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/module/zfs/spa_misc.c b/module/zfs/spa_misc.c index ef59d2255..50c3b9afd 100644 --- a/module/zfs/spa_misc.c +++ b/module/zfs/spa_misc.c @@ -1096,15 +1096,17 @@ spa_vdev_state_exit(spa_t *spa, vdev_t *vd, int error) void spa_activate_mos_feature(spa_t *spa, const char *feature) { - (void) nvlist_add_boolean(spa->spa_label_features, feature); - vdev_config_dirty(spa->spa_root_vdev); + if (!nvlist_exists(spa->spa_label_features, feature)) { + fnvlist_add_boolean(spa->spa_label_features, feature); + vdev_config_dirty(spa->spa_root_vdev); + } } void spa_deactivate_mos_feature(spa_t *spa, const char *feature) { - (void) nvlist_remove_all(spa->spa_label_features, feature); - vdev_config_dirty(spa->spa_root_vdev); + if (nvlist_remove_all(spa->spa_label_features, feature) == 0) + vdev_config_dirty(spa->spa_root_vdev); } /* |