fuser icon indicating copy to clipboard operation
fuser copied to clipboard

How to wait for the mountpoint to be ready ?

Open FirelightFlagboy opened this issue 1 year ago • 2 comments

How should I wait for the mountpoint to be ready ?

When I create a mountpoint using Session::spawn, I consider it to be ready once the Filesystem::init method is called. To wait for that event, I'm using a Mutex<bool> and a Condvar to signal the event and set them at the end of the init method.

This work well enough on Linux, but on macOS I suspect this is causing some of my tests to be flaky because the mountpoint is not ready at that point.

Currently I don't see any other way to wait for the mountpoint to be ready, maybe It's something that could be added to Session/BackgroundSession.

FirelightFlagboy avatar Dec 18 '24 09:12 FirelightFlagboy

See https://github.com/zargony/fuse-rs/issues/9#issuecomment-32167809 And possibly https://github.com/libfuse/libfuse/discussions/1100 also.

vassilit avatar Feb 26 '25 22:02 vassilit

In my experience, the Kernel always calls getattr on inode 1 before it does anything else. Maybe that should be your signal that the Kernel is ready?

rarensu avatar Sep 15 '25 18:09 rarensu