1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-12 14:29:28 +00:00

zdb: access dp_free_bpobj only if pool version is >= SPA_VERSION_DEADLISTS

Submitted by:	avg
MFC after:	3 days
This commit is contained in:
Pawel Jakub Dawidek 2011-10-21 13:56:17 +00:00
parent 7149ddc1d3
commit 2128d22f17
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=226616

View File

@ -2190,8 +2190,10 @@ dump_block_stats(spa_t *spa)
*/ */
(void) bpobj_iterate_nofree(&spa->spa_deferred_bpobj, (void) bpobj_iterate_nofree(&spa->spa_deferred_bpobj,
count_block_cb, &zcb, NULL); count_block_cb, &zcb, NULL);
if (spa_version(spa) >= SPA_VERSION_DEADLISTS) {
(void) bpobj_iterate_nofree(&spa->spa_dsl_pool->dp_free_bpobj, (void) bpobj_iterate_nofree(&spa->spa_dsl_pool->dp_free_bpobj,
count_block_cb, &zcb, NULL); count_block_cb, &zcb, NULL);
}
if (dump_opt['c'] > 1) if (dump_opt['c'] > 1)
flags |= TRAVERSE_PREFETCH_DATA; flags |= TRAVERSE_PREFETCH_DATA;