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 <serapheim.dimitro@delphix.com> Reviewed-by: Giuseppe Di Natale <guss80@gmail.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #7702
This commit is contained in:
parent
00c405b4b5
commit
e2cc448b60
@ -4738,6 +4738,7 @@ verify_checkpoint_vdev_spacemaps(spa_t *checkpoint, spa_t *current)
|
|||||||
space_map_length(checkpoint_sm) / sizeof (uint64_t);
|
space_map_length(checkpoint_sm) / sizeof (uint64_t);
|
||||||
VERIFY0(space_map_iterate(checkpoint_sm,
|
VERIFY0(space_map_iterate(checkpoint_sm,
|
||||||
verify_checkpoint_sm_entry_cb, &vcsec));
|
verify_checkpoint_sm_entry_cb, &vcsec));
|
||||||
|
if (dump_opt['m'] > 3)
|
||||||
dump_spacemap(current->spa_meta_objset, checkpoint_sm);
|
dump_spacemap(current->spa_meta_objset, checkpoint_sm);
|
||||||
space_map_close(checkpoint_sm);
|
space_map_close(checkpoint_sm);
|
||||||
}
|
}
|
||||||
@ -4920,6 +4921,7 @@ verify_checkpoint(spa_t *spa)
|
|||||||
*/
|
*/
|
||||||
(void) printf("\nPartially discarded checkpoint "
|
(void) printf("\nPartially discarded checkpoint "
|
||||||
"state found:\n");
|
"state found:\n");
|
||||||
|
if (dump_opt['m'] > 3)
|
||||||
dump_leftover_checkpoint_blocks(spa);
|
dump_leftover_checkpoint_blocks(spa);
|
||||||
return (0);
|
return (0);
|
||||||
} else if (error != 0) {
|
} else if (error != 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user