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

Deal with source dir being deleted and recreated #8

Open
mpartel opened this issue Dec 20, 2013 · 1 comment
Open

Deal with source dir being deleted and recreated #8

mpartel opened this issue Dec 20, 2013 · 1 comment
Labels
feature New feature request/PR

Comments

@mpartel
Copy link
Owner

mpartel commented Dec 20, 2013

When the source dir is deleted, bindfs should watch for it being created again and update its cwd.

Could be implemented as follows:

  1. Add an inotify watch on the cwd path.
  2. Check that the dir wasn't already deleted.
  3. Wait for IN_DELETE_SELF or IN_MOVE_SELF.
  4. Periodically poll for the path to reappear, or make an inotify-based system, which takes volatile parent dirs into account (would probably be something like a recursive version of the present algorithm).
  5. When the path reappears, fchdir into it.

All this either in a new thread or use the low-level FUSE API and use async I/O with watches and the FUSE fd.

@mpartel
Copy link
Owner Author

mpartel commented Dec 20, 2013

Could also be implemented as a separate watcher script.

@mpartel mpartel added the feature New feature request/PR label May 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature request/PR
Projects
None yet
Development

No branches or pull requests

1 participant