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

Get rid of BlobIoChunk::V5 #656

Merged
merged 3 commits into from
Aug 9, 2022
Merged

Conversation

changweige
Copy link
Contributor

@changweige changweige commented Aug 9, 2022

Methods like file_offset() are not required in the storage layer. So we early fill the io vec with BlobChunkInfo directly to
get rid of the chunk conversion. User IO file offset and in-chunk offset mapping is provided in io vec control block. This is the first step in trying to reduce storage layer complications by simplify essential IO structures and remove everywhere as_base

Signed-off-by: Changwei Ge <gechangwei@bytedance.com>
Add a new structure V5IoChunk to reprepent backend io
chunk addresses. This helps to get rid of enum
BlobIoChunk::V5

Signed-off-by: Changwei Ge <gechangwei@bytedance.com>
Methods like file_offset() is not required in storage layer.
So we early fill the io vec with BlobChunkInfo directly to
get rid of the chunk conversion.

Signed-off-by: Changwei Ge <gechangwei@bytedance.com>
@anolis-bot
Copy link
Collaborator

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

@anolis-bot
Copy link
Collaborator

@changweige , the title 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/17822

@anolis-bot
Copy link
Collaborator

@changweige , the title 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/17823

@anolis-bot
Copy link
Collaborator

@changweige , 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

@changweige , 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

@changweige , 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!

}

impl BlobIoChunk {
/// Convert a [BlobIoChunk] to a reference to [BlobChunkInfo] trait object.
pub fn as_base(&self) -> &(dyn BlobChunkInfo) {
match self {
BlobIoChunk::Base(v) => &**v,
BlobIoChunk::V5(v) => v.as_base(),
// BlobIoChunk::V5(v) => v.as_base(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about removing the above line?

@jiangliu jiangliu merged commit b9670b3 into dragonflyoss:master Aug 9, 2022
@changweige changweige deleted the no-v5-chunkinfo branch August 12, 2022 03:59
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