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

bug in block cache open call #1580

Merged
merged 9 commits into from
Jan 15, 2025
Merged

bug in block cache open call #1580

merged 9 commits into from
Jan 15, 2025

Conversation

syeleti-msft
Copy link
Member

@syeleti-msft syeleti-msft commented Nov 28, 2024

✅ What

Current implementation of open file when opened in O_WRONLY mode truncates the file to zero.
While this mode - means we should have opened the file in read write mode, not truncate it.
So, This is incorrect behaviour.

👩‍🔬 How to validate

We don't see it in the normal scenario as write-back cache is on by default. All the open calls with O_WRONLY will be redirected to O_RDWR mode.
So, To simulate this issue, turn off the write-back cache while mounting with --disable-writeback-cache=true and then open file in O_WRONLY mode, you see that the file is truncated to size zero.

…cate the file to zero. This is incorrect behaviour.

We don't see it in the normal scenario as write-back cache is on by default. Hence all the open calls with O_WRONLY will be redirected O_RDWR.
To simulate this turn of the write-back cache and then open file in O_WRONLY.
@vibhansa-msft vibhansa-msft added this to the v2-2.4.1 milestone Nov 29, 2024
@vibhansa-msft vibhansa-msft changed the base branch from main to blobfuse/2.4.1 November 29, 2024 07:52
@syeleti-msft
Copy link
Member Author

@syeleti-msft Can you please add the steps to validate this flow?

Added in the description part of the PR

@vibhansa-msft vibhansa-msft merged commit cdd48de into blobfuse/2.4.1 Jan 15, 2025
8 checks passed
@vibhansa-msft vibhansa-msft deleted the syeleti/bc-fix branch January 15, 2025 16:54
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.

4 participants