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

[backport] rafs: avoid a debug_assert related to v5 amplify io #1372

Merged
merged 1 commit into from
Jul 14, 2023

Conversation

bergwolf
Copy link
Member

backport master commit

commit 251730990ebc4a008b231d46c2315e1fc372f889
Author: Jiang Liu <gerry@linux.alibaba.com>
Date:   Sun Apr 30 17:10:00 2023 +0800

    rafs: avoid a debug_assert related to v5 amplify io

    In function RafsSuper::amplify_io(), is the next inode `ni` is
    zero-sized, the debug assertion in function calculate_bio_chunk_index()
    (rafs/src/metadata/layout/v5.rs) will get triggered. So zero-sized
    file should be skipped by amplify_io().

    Signed-off-by: Jiang Liu <gerry@linux.alibaba.com>

Relevant Issue (if applicable)

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

Details

Please describe the details of PullRequest.

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.

In function RafsSuper::amplify_io(), is the next inode `ni` is
zero-sized, the debug assertion in function calculate_bio_chunk_index()
(rafs/src/metadata/layout/v5.rs) will get triggered. So zero-sized
file should be skipped by amplify_io().

Signed-off-by: Jiang Liu <gerry@linux.alibaba.com>
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
@bergwolf bergwolf requested a review from a team as a code owner July 13, 2023 02:28
@bergwolf bergwolf requested review from liubogithub, imeoer and hsiangkao and removed request for a team July 13, 2023 02:28
@anolis-bot
Copy link
Collaborator

@bergwolf , a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/84399

@anolis-bot
Copy link
Collaborator

@bergwolf , The CI test is completed, please check result:

Test CaseTest Result
build rust golang image✅ SUCCESS
compile nydusd✅ SUCCESS
compile ctr remote✅ SUCCESS
compile nydus snapshotter✅ SUCCESS
run container with rafs✅ SUCCESS
run container with zran✅ SUCCESS
run container with rafs and compile linux✅ SUCCESS

Congratulations, your test job passed!

@jiangliu jiangliu merged commit 3181b31 into dragonflyoss:stable/v2.2 Jul 14, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants