From 2128d22f1748194344000d8e6b75c0fb548f9dde Mon Sep 17 00:00:00 2001 From: Pawel Jakub Dawidek Date: Fri, 21 Oct 2011 13:56:17 +0000 Subject: [PATCH] zdb: access dp_free_bpobj only if pool version is >= SPA_VERSION_DEADLISTS Submitted by: avg MFC after: 3 days --- cddl/contrib/opensolaris/cmd/zdb/zdb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cddl/contrib/opensolaris/cmd/zdb/zdb.c b/cddl/contrib/opensolaris/cmd/zdb/zdb.c index c6e219df9e1d..bf710009d539 100644 --- a/cddl/contrib/opensolaris/cmd/zdb/zdb.c +++ b/cddl/contrib/opensolaris/cmd/zdb/zdb.c @@ -2190,8 +2190,10 @@ dump_block_stats(spa_t *spa) */ (void) bpobj_iterate_nofree(&spa->spa_deferred_bpobj, count_block_cb, &zcb, NULL); - (void) bpobj_iterate_nofree(&spa->spa_dsl_pool->dp_free_bpobj, - count_block_cb, &zcb, NULL); + if (spa_version(spa) >= SPA_VERSION_DEADLISTS) { + (void) bpobj_iterate_nofree(&spa->spa_dsl_pool->dp_free_bpobj, + count_block_cb, &zcb, NULL); + } if (dump_opt['c'] > 1) flags |= TRAVERSE_PREFETCH_DATA;