Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce zdb output when pool contains checkpoint #7702

Merged
merged 1 commit into from
Jul 11, 2018

Conversation

behlendorf
Copy link
Contributor

@behlendorf behlendorf commented Jul 10, 2018

Description

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.

Motivation and Context

Keep the size of the ZTS log files manageable so they're relatively easy to read.

How Has This Been Tested?

Manual testing to verify the log messages are only printed when passed -mmmm.

Reduced the size of the zpool_checkpoint logs from 25M to 748K.

$ du -h  /var/tmp/test_results/20180710T134551/pool_checkpoint | tail -1
25M     /var/tmp/test_results/20180710T134551/pool_checkpoint

$ du -h  /var/tmp/test_results/20180710T143330/pool_checkpoint | tail -1
748K    /var/tmp/test_results/20180710T143330/pool_checkpoint

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (a change to man pages or other documentation)

Checklist:

  • My code follows the ZFS on Linux code style requirements.
  • I have updated the documentation accordingly.
  • I have read the contributing document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • All commit messages are properly formatted and contain Signed-off-by.
  • Change has been approved by a ZFS on Linux member.

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.

Signed-off-by: Brian Behlendorf <[email protected]>
@behlendorf behlendorf requested a review from sdimitro July 10, 2018 21:51
Copy link
Contributor

@sdimitro sdimitro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
Thanks for fixing this Brian!

@behlendorf behlendorf merged commit e2cc448 into openzfs:master Jul 11, 2018
@codecov
Copy link

codecov bot commented Jul 11, 2018

Codecov Report

Merging #7702 into master will decrease coverage by 0.05%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7702      +/-   ##
==========================================
- Coverage   78.11%   78.06%   -0.06%     
==========================================
  Files         368      368              
  Lines      111830   111831       +1     
==========================================
- Hits        87354    87297      -57     
- Misses      24476    24534      +58
Flag Coverage Δ
#kernel 78.69% <ø> (-0.04%) ⬇️
#user 67.22% <50%> (+0.19%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 00c405b...4895b81. Read the comment docs.

@behlendorf behlendorf deleted the zdb-checkpoint-verbose branch April 19, 2021 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants