summaryrefslogtreecommitdiffstats
path: root/cmd/zdb
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2018-07-10 21:23:17 -0700
committerGitHub <[email protected]>2018-07-10 21:23:17 -0700
commite2cc448b6013c9b9ac4e12167a1d5abb6b790202 (patch)
treea19de4d2044528a2f6cdbc16b30f740da5ee4a78 /cmd/zdb
parent00c405b4b5e89741731daa59e23b9a7dabd41c32 (diff)
Reduce zdb output when pool contains checkpoint
When running zdb without additional arguments against a pool containing a checkpoint the entire checkpoint spacemap should not be dumped. Make this behavior conditional upon passing the -mmmm option as described in the zdb(8) man page. -mmmm Display every spacemap record. Reviewed-by: Serapheim Dimitropoulos <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #7702
Diffstat (limited to 'cmd/zdb')
-rw-r--r--cmd/zdb/zdb.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c
index 0d2f3623b..142968d07 100644
--- a/cmd/zdb/zdb.c
+++ b/cmd/zdb/zdb.c
@@ -4738,7 +4738,8 @@ verify_checkpoint_vdev_spacemaps(spa_t *checkpoint, spa_t *current)
space_map_length(checkpoint_sm) / sizeof (uint64_t);
VERIFY0(space_map_iterate(checkpoint_sm,
verify_checkpoint_sm_entry_cb, &vcsec));
- dump_spacemap(current->spa_meta_objset, checkpoint_sm);
+ if (dump_opt['m'] > 3)
+ dump_spacemap(current->spa_meta_objset, checkpoint_sm);
space_map_close(checkpoint_sm);
}
@@ -4920,7 +4921,8 @@ verify_checkpoint(spa_t *spa)
*/
(void) printf("\nPartially discarded checkpoint "
"state found:\n");
- dump_leftover_checkpoint_blocks(spa);
+ if (dump_opt['m'] > 3)
+ dump_leftover_checkpoint_blocks(spa);
return (0);
} else if (error != 0) {
(void) printf("lookup error %d when looking for "