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

spoof events on libfuse hidden files, or use top-level hidden directory #78

Open
chrisd8088 opened this issue Jul 2, 2019 · 0 comments

Comments

@chrisd8088
Copy link
Collaborator

Because we do not, at present, enable the hard_remove libfuse option, when a file is renamed or deleted while a process has an open file descriptor for it, the file is actually just renamed as .fuse_hidden... until the handle is removed.

This has two consequences -- one is that we deliver PROJFS_MOVE* and PROJFS_DELETE* events on the hidden filename, and the other is that the hidden file then prevents further actions, such as deletion of the parent directory.

We should consider spoofing events such that we do not deliver them for .fuse_hidden... files, and instead report PROJFS_DELETE* events from the rename() file op when the file is being renamed to a hidden filename, while noting this is insufficient to allow further operations such as deletion of the parent directory -- which may manifest in directories "left over" after a git checkout while using VFSForGit.

An alternative would be to investigate how to make libfuse instead place the hidden file in a directory at the top of the filesystem, e.g., in <mount point>/.fuse_hidden/. We could also deliberately hide that directory from the clients, if desired.

@chrisd8088 chrisd8088 changed the title spoof events on libfuse hidden files, or handle them directly spoof events on libfuse hidden files, or use top-level hidden directory Jul 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant