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

Implement -A (ignore ASSERTs) for zdb #9610

Merged
merged 1 commit into from
Nov 27, 2019
Merged

Conversation

PaulZ-98
Copy link
Contributor

@PaulZ-98 PaulZ-98 commented Nov 22, 2019

Implement -A (ignore ASSERTs) for zdb

The command line switch -A (ignore ASSERTs) has always been available in zdb but was never connected up to the correct global variable.

Signed-off-by: Paul Zuchowski pzuchowski@datto.com

Motivation and Context

There are times when you need zdb to ignore asserts and keep dumping out whatever information it can get despite the ASSERT(s) failing. It was always intended to be part of zdb but was incomplete.

Description

Change the code so the global variable aok was correctly set, and that the ASSERT code would obey it.

How Has This Been Tested?

Here is the test run I did. There won't be a zfs test for this because the assert demonstrated here is going to be fixed.
# zdb -R tank 0:2a856400:600:id
Found vdev: /root/file1
Trying 00600 -> 00800 (inherit)
ret == 0 (0x16 == 0)
ASSERT at ../../module/zfs/zio_compress.c:162:zio_decompress_data()
#
# zdb -A -R tank 0:2a856400:600:id
DVA[0]=<0:2a850400:400> [L0 ZFS plain file] fletcher4 uncompressed unencrypted LE contiguous unique single size=400L/400P birth=277331L/277331P fill=1 cksum=4b20aef2a3:26cc1e35cd35:d2f34b21245fb:3595d44a25c6c4e
DVA[0]=<0:2a850800:400> [L0 ZFS plain file] fletcher4 uncompressed unencrypted LE contiguous unique single size=400L/400P birth=277331L/277331P fill=1 cksum=49959161
02:254bdc23fb93:ca43590452f0b:33a52770fdf8ed3
...

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:

Signed-off-by: Paul Zuchowski <pzuchowski@datto.com>
@codecov
Copy link

codecov bot commented Nov 23, 2019

Codecov Report

Merging #9610 into master will increase coverage by 0.03%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9610      +/-   ##
==========================================
+ Coverage   79.19%   79.22%   +0.03%     
==========================================
  Files         418      418              
  Lines      123531   123548      +17     
==========================================
+ Hits        97828    97880      +52     
+ Misses      25703    25668      -35
Flag Coverage Δ
#kernel 79.81% <ø> (-0.05%) ⬇️
#user 67.13% <0%> (+0.21%) ⬆️

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 0c46813...a000fd3. Read the comment docs.

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Nov 27, 2019
@behlendorf behlendorf merged commit 7c1bf0c into openzfs:master Nov 27, 2019
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Dec 26, 2019
The command line switch -A (ignore ASSERTs) has always been available
in zdb but was never connected up to the correct global variable.

There are times when you need zdb to ignore asserts and keep dumping
out whatever information it can get despite the ASSERT(s) failing.
It was always intended to be part of zdb but was incomplete.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Paul Zuchowski <pzuchowski@datto.com>
Closes openzfs#9610
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Dec 27, 2019
The command line switch -A (ignore ASSERTs) has always been available
in zdb but was never connected up to the correct global variable.

There are times when you need zdb to ignore asserts and keep dumping
out whatever information it can get despite the ASSERT(s) failing.
It was always intended to be part of zdb but was incomplete.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Paul Zuchowski <pzuchowski@datto.com>
Closes openzfs#9610
tonyhutter pushed a commit that referenced this pull request Jan 23, 2020
The command line switch -A (ignore ASSERTs) has always been available
in zdb but was never connected up to the correct global variable.

There are times when you need zdb to ignore asserts and keep dumping
out whatever information it can get despite the ASSERT(s) failing.
It was always intended to be part of zdb but was incomplete.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Paul Zuchowski <pzuchowski@datto.com>
Closes #9610
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants