Add HomeStore superblock decoder and validator#873
Open
xiaoxichen wants to merge 1 commit intoeBay:masterfrom
Open
Add HomeStore superblock decoder and validator#873xiaoxichen wants to merge 1 commit intoeBay:masterfrom
xiaoxichen wants to merge 1 commit intoeBay:masterfrom
Conversation
This tool decodes and validates HomeStore superblock structures from disk dumps.
It checks bitmap consistency, CRC integrity, and VDev allocation.
Usage:
# Quick validation summary
python3 decode_superblock.py <disk_dump>
# Detailed verbose output
python3 decode_superblock.py <disk_dump> --verbose
# Inspect specific chunk
python3 decode_superblock.py <disk_dump> chunk 512
# Inspect specific vdev
python3 decode_superblock.py <disk_dump> vdev 0
python3 decode_superblock.py <disk_dump> vdev meta
What it validates:
- First block magic number and metadata
- Bitmap vs chunk array consistency
- Chunk CRC checksums (detects corruption)
- VDev allocation and utilization
- Orphan chunks (corrupted vdev_id)
Exit codes:
0 = All validations passed
1 = Issues detected (CRC errors, bitmap inconsistencies, orphans)
Common issues detected:
- CRC mismatch: Chunk data corrupted on disk
- Bitmap inconsistency: Bitmap/chunk allocation out of sync
- Orphan chunks: Chunks with invalid/corrupted vdev_id
Signed-off-by: Xiaoxi Chen <xiaoxchen@ebay.com>
Collaborator
Author
|
This is a BORING code written by AI , lets focus more on functional |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #873 +/- ##
==========================================
- Coverage 56.51% 48.22% -8.30%
==========================================
Files 108 110 +2
Lines 10300 12894 +2594
Branches 1402 6198 +4796
==========================================
+ Hits 5821 6218 +397
+ Misses 3894 2561 -1333
- Partials 585 4115 +3530 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This tool decodes and validates HomeStore superblock structures from disk dumps.
It checks bitmap consistency, CRC integrity, and VDev allocation.
Usage:
# Quick validation summary
python3 decode_superblock.py <disk_dump>
What it validates:
Exit codes:
0 = All validations passed 1 = Issues detected (CRC errors, bitmap inconsistencies, orphans)
Common issues detected: