-
Notifications
You must be signed in to change notification settings - Fork 44
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
Non-blocking mounts are racy -- can return success prematurely #41
Comments
Unfortunately the way the fuse library creates a filesystem is through the blocking call Potential solutions:
I think solution 2 would be a good compromise. |
I'm going to implement a variation of #2 in my FS in the user layer. My FS lends itself well to this approach. But for the general implementation (if you choose to keep the non-blocking option), I don't think the "just once" stat would be sufficient since there's no way to predict how long it will take the FS to be mounted. I suspect you'll have to do a period check until it succeeds, fails, or a timeout is reached. Do you know how the "fusermount" binary knows when to return? |
Yes, it'll indeed need to fail after a timeout and return a false negative in such cases.
|
Non-Blocking mounts are mounted via a new thread and a 750ms sleep. It assumes that the thread will complete the mount operation within 750ms, but there's no guarantee of that.
Impact:
Can you suggest a work around for detecting whether a mount request has completed?
The text was updated successfully, but these errors were encountered: