diff options
author | Don Brady <[email protected]> | 2015-06-24 22:05:32 -0600 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2015-06-26 14:10:31 -0700 |
commit | 784652c1f034bf5bf25d22b5b4056a6955331734 (patch) | |
tree | 78338f0641efec05756b7ed263443651b6b7958a /cmd | |
parent | 16421a1dc837eae4cc0b353e7f6616bc6202c013 (diff) |
zdb -d has false positive warning when feature@large_blocks=disabled
Skip large blocks feature refcount checking if feature is disabled.
Signed-off-by: Don Brady <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #3468
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/zdb/zdb.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c index 8572dae2e..800d49867 100644 --- a/cmd/zdb/zdb.c +++ b/cmd/zdb/zdb.c @@ -22,6 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2015, Intel Corporation. */ #include <stdio.h> @@ -3086,6 +3087,7 @@ dump_zpool(spa_t *spa) if (dump_opt['d'] || dump_opt['i']) { uint64_t refcount; + dump_dir(dp->dp_meta_objset); if (dump_opt['d'] >= 3) { dump_full_bpobj(&spa->spa_deferred_bpobj, @@ -3107,17 +3109,20 @@ dump_zpool(spa_t *spa) (void) dmu_objset_find(spa_name(spa), dump_one_dir, NULL, DS_FIND_SNAPSHOTS | DS_FIND_CHILDREN); - (void) feature_get_refcount(spa, - &spa_feature_table[SPA_FEATURE_LARGE_BLOCKS], &refcount); - if (num_large_blocks != refcount) { - (void) printf("large_blocks feature refcount mismatch: " - "expected %lld != actual %lld\n", - (longlong_t)num_large_blocks, - (longlong_t)refcount); - rc = 2; - } else { - (void) printf("Verified large_blocks feature refcount " - "is correct (%llu)\n", (longlong_t)refcount); + if (feature_get_refcount(spa, + &spa_feature_table[SPA_FEATURE_LARGE_BLOCKS], + &refcount) != ENOTSUP) { + if (num_large_blocks != refcount) { + (void) printf("large_blocks feature refcount " + "mismatch: expected %lld != actual %lld\n", + (longlong_t)num_large_blocks, + (longlong_t)refcount); + rc = 2; + } else { + (void) printf("Verified large_blocks feature " + "refcount is correct (%llu)\n", + (longlong_t)refcount); + } } } if (rc == 0 && (dump_opt['b'] || dump_opt['c'])) |