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

Possible crash consistency bug in the fast write path #16

Open
paulwedeck opened this issue Oct 11, 2023 · 0 comments · May be fixed by #17
Open

Possible crash consistency bug in the fast write path #16

paulwedeck opened this issue Oct 11, 2023 · 0 comments · May be fixed by #17

Comments

@paulwedeck
Copy link

Hello,
there is another place where cmpxchg is used to "atomically" set 16 bytes (see #9).
This is in the fast write path when appending a file.
In this case, the file length and file timestamps are updated together.
Crash states are possible where the file data has been updated but not the timestamps.
This is obviously just a minor bug but should still be addressed.

Currently, this cannot be realized atomically.
For the strict mode, I propose to just disable this half of the fast write path.
For the relaxed mode, I propose to swap the order, so that the timestamp might be updated without the new file length/data but not vice-versa.

paulwedeck added a commit to paulwedeck/WineFS that referenced this issue Oct 11, 2023
@paulwedeck paulwedeck linked a pull request Oct 11, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant