-
Notifications
You must be signed in to change notification settings - Fork 203
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
Conversation
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>
@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 |
@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 |
@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 |
@changweige , The CI test is completed, please check result:
Congratulations, your test job passed! |
@changweige , The CI test is completed, please check result:
Congratulations, your test job passed! |
@changweige , The CI test is completed, please check result:
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(), |
There was a problem hiding this comment.
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?
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