-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Fix zdb_read_block using zio after it is destroyed. #9657
Conversation
ff5e97c
to
88ffe5f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good after fixing the cstyle warning.
./cmd/zdb/zdb.c: 6612: line > 80 characters
Makefile:1593: recipe for target 'cstyle' failed
The checksum display code of zdb_read_block uses a zio to read in the block and then calls zio_checksum_compute. Use a new zio in the call to zio_checksum_compute not the zio from the read which has been destroyed by zio_wait. Signed-off-by: Paul Zuchowski <pzuchowski@datto.com> Fixes openzfs#9644
88ffe5f
to
de552e5
Compare
Wasn't sure if you fixed the style issue so just pushed that change. |
Codecov Report
@@ Coverage Diff @@
## master #9657 +/- ##
==========================================
+ Coverage 79.32% 79.47% +0.15%
==========================================
Files 418 418
Lines 123544 123549 +5
==========================================
+ Hits 98003 98194 +191
+ Misses 25541 25355 -186
Continue to review full report at Codecov.
|
Looks good. Let's just hold off until @ikozhukhov can verify the fix on dilos. |
confirm: new update fixed my problem, thanks!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed, thanks
The checksum display code of zdb_read_block uses a zio to read in the block and then calls zio_checksum_compute. Use a new zio in the call to zio_checksum_compute not the zio from the read which has been destroyed by zio_wait. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Igor Kozhukhov <igor@dilos.org> Signed-off-by: Paul Zuchowski <pzuchowski@datto.com> Closes openzfs#9644 Closes openzfs#9657
The checksum display code of zdb_read_block uses a zio to read in the block and then calls zio_checksum_compute. Use a new zio in the call to zio_checksum_compute not the zio from the read which has been destroyed by zio_wait. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Igor Kozhukhov <igor@dilos.org> Signed-off-by: Paul Zuchowski <pzuchowski@datto.com> Closes openzfs#9644 Closes openzfs#9657
The checksum display code of zdb_read_block uses a zio to read in the block and then calls zio_checksum_compute. Use a new zio in the call to zio_checksum_compute not the zio from the read which has been destroyed by zio_wait. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Igor Kozhukhov <igor@dilos.org> Signed-off-by: Paul Zuchowski <pzuchowski@datto.com> Closes #9644 Closes #9657
The checksum display code of zdb_read_block uses a zio
to read in the block and then calls zio_checksum_compute.
Use a new zio in the call to zio_checksum_compute not the zio
from the read which has been destroyed by zio_wait.
Signed-off-by: Paul Zuchowski pzuchowski@datto.com
Fixes #9644
Motivation and Context
Test failure on DilOS - using a freed zio.
Description
When calling zio_checksum_compute, use a statically declared zio with io_bp and io_offset and io_spa set properly.
How Has This Been Tested?
Ran zfstest zdb section.
Types of changes
Checklist:
Signed-off-by
.