diff options
author | mm <mm@FreeBSD.org> | 2012-07-30 23:14:24 +0000 |
---|---|---|
committer | mm <mm@FreeBSD.org> | 2012-07-30 23:14:24 +0000 |
commit | cf6d705d5b2f458f6a07c3c33eac90bca667108a (patch) | |
tree | addacafc54e9b837dfab0af6ec0b6b7eff091cbb /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfeature.c | |
parent | 06da175461004ed723c6216f456b4ddbaa2fc997 (diff) | |
download | FreeBSD-src-cf6d705d5b2f458f6a07c3c33eac90bca667108a.zip FreeBSD-src-cf6d705d5b2f458f6a07c3c33eac90bca667108a.tar.gz |
Partial MFV (illumos-gate 13753:2aba784c276b)
2762 zpool command should have better support for feature flags
References:
https://www.illumos.org/issues/2762
MFC after: 2 weeks
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfeature.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfeature.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfeature.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfeature.c index ba72208..b9250df 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfeature.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfeature.c @@ -173,7 +173,7 @@ typedef enum { */ boolean_t feature_is_supported(objset_t *os, uint64_t obj, uint64_t desc_obj, - nvlist_t *unsup_feat) + nvlist_t *unsup_feat, nvlist_t *enabled_feat) { boolean_t supported; zap_cursor_t zc; @@ -186,11 +186,16 @@ feature_is_supported(objset_t *os, uint64_t obj, uint64_t desc_obj, ASSERT(za.za_integer_length == sizeof (uint64_t) && za.za_num_integers == 1); + if (NULL != enabled_feat) { + fnvlist_add_uint64(enabled_feat, za.za_name, + za.za_first_integer); + } + if (za.za_first_integer != 0 && !zfeature_is_supported(za.za_name)) { supported = B_FALSE; - if (unsup_feat != NULL) { + if (NULL != unsup_feat) { char *desc = ""; char buf[MAXPATHLEN]; |