Project

General

Profile

Bug #1679

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

Added by Martin Matuška almost 8 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
zfs - Zettabyte File System
Start date:
2011-10-23
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

dp_free_bpobj should be accessed only if pool version is >= SPA_VERSION_DEADLISTS

Author: Andriy Gapon <>

diff -r 86d96517d461 usr/src/cmd/zdb/zdb.c
--- a/usr/src/cmd/zdb/zdb.c    Fri Oct 21 11:44:31 2011 -0400
+++ b/usr/src/cmd/zdb/zdb.c    Sun Oct 23 11:29:22 2011 +0200
@@ -2190,8 +2190,10 @@
      */
     (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;

Also available in: Atom PDF