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

Delete all empty parent directories if they are empty #181

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

sosthene-nitrokey
Copy link
Contributor

This saves a lot of memory since each directory takes at least one block We are starting to see this as an issue because the filesystems are now much deeper due to the SE050

Copy link
Member

@robin-nitrokey robin-nitrokey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would break existing code that relies on the fact that the parent directory always exists if a file was deleted successfully, for example:

https://github.com/Nitrokey/fido-authenticator/blob/63a14793877f49e0bd6a99d28834a0013fdb9d64/src/ctap2.rs#L1856

Edit: On second read, it looks like this function should work as it uses try_syscall but there could be other code sites that are affected by this. Maybe limit this to the VFS?

@sosthene-nitrokey
Copy link
Contributor Author

I'll limit this to the VFS for now. In the future we can make a test release with it enabled for all filesystem.

@sosthene-nitrokey sosthene-nitrokey force-pushed the remove-store-intermediate-upstream branch 2 times, most recently from 4e68921 to c2caa1a Compare December 12, 2024 10:54
@sosthene-nitrokey sosthene-nitrokey force-pushed the remove-store-intermediate-upstream branch from c2caa1a to b711d95 Compare December 12, 2024 13:56
This saves a lot of memory since each directory takes at least one block
We are starting to see this as an issue because the filesystems are now
much deeper due to the SE050
@sosthene-nitrokey sosthene-nitrokey force-pushed the remove-store-intermediate-upstream branch from b711d95 to 89f037b Compare December 16, 2024 10:13
@sosthene-nitrokey sosthene-nitrokey merged commit 1b62220 into main Dec 16, 2024
2 checks passed
@sosthene-nitrokey sosthene-nitrokey deleted the remove-store-intermediate-upstream branch December 16, 2024 11:00
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 this pull request may close these issues.

3 participants