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

Potential bug in the truncate list #20

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

Potential bug in the truncate list #20

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

Comments

@paulwedeck
Copy link

Hello,
I discovered a potential bug in the truncate mechanism.
If the system crashes while an entry is in the truncate list, the operation is repeated during recovery.
During this repeated truncate operation, the inode timestamps are set to the current time and not the time when the operation occurred.
Therefore, the "recovered" state is neither the original nor the intended final state which imo is invalid behavior for a file system and should be addressed.

One fix would be to add the new mtime and ctime of the inode to the truncate list which is then recovered.
My implementation also uses a marker field to distinguish between the old and new version of the truncate list entries.

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