-
Notifications
You must be signed in to change notification settings - Fork 230
rafs: optimize entry search in rafs v6 #683
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
rafs: optimize entry search in rafs v6 #683
Conversation
@yixiaojie0x , a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/18555 |
@yixiaojie0x , The CI test is completed, please check result:
Congratulations, your test job passed! |
This PR is for #667 |
rafs/src/metadata/direct_v6.rs
Outdated
let nid = 'outer: for i in 0..blocks_count { | ||
let head_entry = self.get_entry(i as usize, 0).map_err(err_invalidate_data)?; | ||
// `e_nameoff` is offset from each single block? | ||
// find target block |
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 extracting this as a helper function?
And seems it may simplify by using usize instead of i32?
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.
Done.
8e2f307
to
981567b
Compare
@yixiaojie0x , 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/18633 |
@yixiaojie0x , The CI test is completed, please check result:
Congratulations, your test job passed! |
Implement binary search in rafs/src/metadata/direct_v6.rs get_child_by_name() to accelerate entry search. Signed-off-by: yixiaojie <[email protected]>
cabad56
to
50ca1a1
Compare
@yixiaojie0x , 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/18641 |
@yixiaojie0x , The CI test is completed, please check result:
Congratulations, your test job passed! |
Implement binary search in rafs/src/metadata/direct_v6.rs
get_child_by_name() to accelerate entry search.
Signed-off-by: yixiaojie [email protected]