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

Split RafsInode into RafsInode and RafsInodeExt #774

Merged
merged 7 commits into from
Oct 8, 2022

Conversation

jiangliu
Copy link
Collaborator

@jiangliu jiangliu commented Oct 2, 2022

The RafsInode is designed according to Rafs v5, which causes some problems when enabling Rafs v6.
So split it into RafsInode and RafsInodeExt. Among those, RafsInodeis used to provide methods which are generic to v5/v6 and runtime/builder,RafsInodeExt` provides version specific methods or methods for builder.

Along the way also do:

  1. clean up some unused code
  2. rename RAFS_ROOT_INODE to RAFS_V5_ROOT_INODE
  3. add more unit test cases
  4. add some helpers function related to v5 to simplify implementation

@anolis-bot
Copy link
Collaborator

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

@anolis-bot
Copy link
Collaborator

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

Test CaseTest Result
merge-target-branch✅ SUCCESS
build-docker-image✅ SUCCESS
compile-nydus❌ FAIL

Sorry, your test job failed. Please get the details in the link.

@anolis-bot
Copy link
Collaborator

@jiangliu , the code has been updated, so a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/25088

@anolis-bot
Copy link
Collaborator

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

Test CaseTest Result
merge-target-branch✅ SUCCESS
build-docker-image✅ SUCCESS
compile-nydus❌ FAIL

Sorry, your test job failed. Please get the details in the link.

@anolis-bot
Copy link
Collaborator

@jiangliu , the code has been updated, so a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/25092

@anolis-bot
Copy link
Collaborator

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

Test CaseTest Result
merge-target-branch✅ SUCCESS
build-docker-image✅ SUCCESS
compile-nydus❌ FAIL

Sorry, your test job failed. Please get the details in the link.

@anolis-bot
Copy link
Collaborator

@jiangliu , the code has been updated, so a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/25093

@anolis-bot
Copy link
Collaborator

@jiangliu , the code has been updated, so a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/25094

@anolis-bot
Copy link
Collaborator

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

Test CaseTest Result
merge-target-branch✅ SUCCESS
build-docker-image✅ SUCCESS
compile-nydus❌ FAIL

Sorry, your test job failed. Please get the details in the link.

@anolis-bot
Copy link
Collaborator

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

Test CaseTest Result
merge-target-branch✅ SUCCESS
build-docker-image✅ SUCCESS
compile-nydus✅ SUCCESS
compile-ctr-remote✅ SUCCESS
compile-nydus-snapshotter✅ SUCCESS
start-nydus-snapshotter-config-containerd✅ SUCCESS
run-container-with-nydus-image✅ SUCCESS

Congratulations, your test job passed!

@anolis-bot
Copy link
Collaborator

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

Test CaseTest Result
merge-target-branch✅ SUCCESS
build-docker-image✅ SUCCESS
compile-nydus✅ SUCCESS
compile-ctr-remote✅ SUCCESS
compile-nydus-snapshotter✅ SUCCESS
start-nydus-snapshotter-config-containerd✅ SUCCESS
run-container-with-nydus-image✅ SUCCESS

Congratulations, your test job passed!

@anolis-bot
Copy link
Collaborator

@jiangliu , the code has been updated, so a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/25167

@anolis-bot
Copy link
Collaborator

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

Test CaseTest Result
merge-target-branch✅ SUCCESS
build-docker-image✅ SUCCESS
compile-nydus✅ SUCCESS
compile-ctr-remote✅ SUCCESS
compile-nydus-snapshotter✅ SUCCESS
start-nydus-snapshotter-config-containerd✅ SUCCESS
run-container-with-nydus-image✅ SUCCESS

Congratulations, your test job passed!

src/bin/nydusd/fusedev.rs Outdated Show resolved Hide resolved
src/bin/nydusd/fusedev.rs Show resolved Hide resolved
rafs/src/metadata/direct_v6.rs Outdated Show resolved Hide resolved
Do not print error message when exiting, that's expected instead of
error.

Signed-off-by: Jiang Liu <[email protected]>
The RAFS v6 metadata has different designs with RAFS v5, which breaks
some interfaces defined by RafsInode. So split RafsInodeExt out of
RafsInode, then we could provide better implementation for RAFS v6.

Signed-off-by: Jiang Liu <[email protected]>
Add unit test cases for compression/digest algorithm conversion.

Signed-off-by: Jiang Liu <[email protected]>
Remove unused dead code from rafs crate.

Signed-off-by: Jiang Liu <[email protected]>
RAFS_ROOT_INODE is for v5 only, so rename it.

Signed-off-by: Jiang Liu <[email protected]>
The documentation from ArcSwap states:
Previous version implemented Clone, but it turned out to be very
confusing to people, since it created fully independent ArcSwap.
Users expected the instances to be tied to each other, that store
in one would change the result of future load of the other.
To emulate the original behaviour, one can do something like this:
let new = ArcSwap::new(old.load_full());

We do expect instances to be tied to each other, so use another Arc
over ArcSwap.

Signed-off-by: Jiang Liu <[email protected]>
Simplify rafs v5 implementation by introducing helper functins.

Signed-off-by: Jiang Liu <[email protected]>
@anolis-bot
Copy link
Collaborator

@jiangliu , the code has been updated, so a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/25344

@jiangliu jiangliu requested a review from imeoer October 8, 2022 06:07
@jiangliu jiangliu merged commit bb3c493 into dragonflyoss:master Oct 8, 2022
@anolis-bot
Copy link
Collaborator

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

Test CaseTest Result
merge-target-branch✅ SUCCESS
build-docker-image✅ SUCCESS
compile-nydus✅ SUCCESS
compile-ctr-remote✅ SUCCESS
compile-nydus-snapshotter✅ SUCCESS
start-nydus-snapshotter-config-containerd✅ SUCCESS
run-container-with-nydus-image✅ SUCCESS

Congratulations, your test job passed!

@jiangliu jiangliu deleted the inode-ext branch March 28, 2023 01:51
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.

3 participants