Fix: RAFS v5 chunkdict bootstrap metadata#1952
Open
shu-pei wants to merge 2 commits into
Open
Conversation
Signed-off-by: shu-pei <linshupei2003@gmail.com>
Signed-off-by: shu-pei <linshupei2003@gmail.com>
1a39d45 to
046d264
Compare
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.
Overview
When generating a RAFS v5 chunkdict bootstrap with chunkdict, several fields in the generated chunk metadata are incorrect.
1.
The original code calculates the chunkdict file offset with the compressed chunk size:
file_offsetis the logical offset inside the file, so it should be calculated from the uncompressed data size.2.
When generating chunkdict chunk metadata, the original code does not set the
COMPRESSEDflag.3.
The generated chunkdict entry is a regular file in the RAFS v5 bootstrap, but its inode digest is not set.
This breaks RAFS v5 inode digest validation. In
rafs/src/metadata/layout/v5.rs,rafsv5_validate_inode()4.
The original filecache logic forces chunkdict-generated blobs to load
blob.meta:However, RAFS v5 blob table entries do not have valid
meta_ci_*information for chunkdict blobs.Related Issues
Please link to the relevant issue. For example:
Fix #123orRelated #456.Change Details
Please describe your changes in detail:
Test Results
If you have any relevant screenshots or videos that can help illustrate your changes, please add them here.
Change Type
Please select the type of change your pull request relates to:
Self-Checklist
Before submitting a pull request, please ensure you have completed the following: