diff options
author | delphij <delphij@FreeBSD.org> | 2014-03-19 23:36:12 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2014-03-19 23:36:12 +0000 |
commit | 5b9b9ced5021655cfea1938e478c1a00a7301d5d (patch) | |
tree | fd61225d2df2d7a6be396c0d8f12265aed4a6e87 /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c | |
parent | b7ccc923c2cefa127943f10a6c5634b75c980a79 (diff) | |
download | FreeBSD-src-5b9b9ced5021655cfea1938e478c1a00a7301d5d.zip FreeBSD-src-5b9b9ced5021655cfea1938e478c1a00a7301d5d.tar.gz |
MFC r259813 + r259813: MFV r258374:
4171 clean up spa_feature_*() interfaces
4172 implement extensible_dataset feature for use by other zpool
features
illumos/illumos-gate@2acef22db7808606888f8f92715629ff3ba555b9
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c index 41aebca..606fe7c 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c @@ -1195,15 +1195,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); } /* |