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

[WIP]Support CRC32 validation for both RAFS V5 and V6. #1670

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

BraveY
Copy link

@BraveY BraveY commented Feb 24, 2025

Relevant Issue (if applicable)

If there are Issues related to this PullRequest, please list it.

Details

Please describe the details of PullRequest.

In P2P transmission, errors in the pulled Chunk information may occur due to network issues or other reasons. To address this, CRC32 has been introduced to verify the integrity of Chunk data. Compared to the case without enabling verification, using CRC32 increases the processing time by approximately 5.6%, which is an acceptable overhead.

Types of changes

What types of changes does your PullRequest introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation Update (if none of the other choices apply)

Checklist

Go over all the following points, and put an x in all the boxes that apply.

  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

Yang Kaiyong added 5 commits February 13, 2025 16:28
Add method and flag to indicate whether chunk has CRC.

Signed-off-by: Yang Kaiyong <[email protected]>
- Add crc32 chceker field to BlobInfo.
- Add crc32 method to BlbChunkInfo.
- Add crc32 algorithm implementation wiht crc-rs crate.
- Add get crc32 checker method to BlobCache trait.

Signed-off-by: Yang Kaiyong <[email protected]>
Add crc32 validation for chunks that include a CRC32 field

Signed-off-by: Yang Kaiyong <[email protected]>
- Introduced a crc_enable option to the nydus builder.
- Added support for generating CRC checksums when building images.

Signed-off-by: Yang Kaiyong <[email protected]>
To enable CRC checksum validation for the V6 version, the following changes were made:
- Removed the `HAS_CRC` flag from `BlobFeature`, as it is no longer needed.
- Added support for setting the crc32 field in `BlobChunkInfoV2Ondisk`.

Signed-off-by: Yang Kaiyong <[email protected]>
@BraveY BraveY requested a review from a team as a code owner February 24, 2025 03:28
@BraveY BraveY requested review from gaius-qi, hsiangkao and power-more and removed request for a team February 24, 2025 03:28
Yang Kaiyong added 2 commits February 24, 2025 11:29
Add image crc checksum test in integration case to smoke test.

Signed-off-by: Yang Kaiyong <[email protected]>
@BraveY BraveY changed the title Support CRC32 validation for both RAFS V5 and V6. [WIP]Support CRC32 validation for both RAFS V5 and V6. Feb 24, 2025
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.

1 participant