Illumos #2762: zpool command should have better support for feature flags

2762 zpool command should have better support for feature flags
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Eric Schrock <Eric.Schrock@delphix.com>

References:
  illumos/illumos-gate@57221772c3
  https://www.illumos.org/issues/2762

Ported-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
Christopher Siden
2012-12-14 15:00:45 -08:00
committed by Brian Behlendorf
parent 3bc7e0fb0f
commit b9b24bb4ca
9 changed files with 389 additions and 100 deletions
+7 -2
View File
@@ -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;
@@ -191,11 +191,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 = "";
if (zap_lookup(os, desc_obj, za->za_name,