-
Notifications
You must be signed in to change notification settings - Fork 214
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
nydusd: fix race window in copen handler #623
Conversation
@kevinXYin , a new test job has been submitted. Please wait in patience. The test job url: None |
@kevinXYin , The CI test is completed, please check result:
Congratulations, your test job passed! |
Could you help elaborate further about the race window this PR is closing? |
let barrier = Arc::new(Barrier::new(2)); | ||
Self::init_blobcache(fsblob, Arc::clone(&barrier)); | ||
// make sure blob cache init thread get wlock before get first ondemand req | ||
barrier.wait(); |
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.
Nit:
Some grammar mistakes with this comment sentence 😹
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.
fixed ~
If the blobcache init thread was not scheduled immediately after creation, and an ondemand request arrived. The fscache handler may not wait for blobcache to be created and resault in eio. We should make sure the blobcache init thread gets wlock before user daemon receives first ondemand request. Fixes: 82f6712 ("nydusd: make copen always return right file size") Suggested-by: Jiang Liu <[email protected]> Signed-off-by: Xin Yin <[email protected]>
02ccfa0
to
5b7494c
Compare
@kevinXYin , the code has been updated, so a new test job has been submitted. Please wait in patience. The test job url: None |
updated in commit message |
@kevinXYin , The CI test is completed, please check result:
Congratulations, your test job passed! |
we should make sure blob cache init thread get wlock before user daemon
get first ondemand req.
Fixes: 82f6712 ("nydusd: make copen always return right file size")
Suggested-by: Jiang Liu [email protected]
Signed-off-by: Xin Yin [email protected]