Kyoshikus / macfuse

Automatically exported from code.google.com/p/macfuse
Other
0 stars 0 forks source link

Distributed notifications unreliable #51

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Launch daemon to track FUSE mounts via notifications
2. Mount a filesystem that takes over 5 seconds to init
3. Check daemon for known filesystems

What is the expected output? What do you see instead?
The timed-out filesystem is not registered as mounted, because the mount_fusefs 
binary only 
distributes the notification when INIT succeeds within 5 seconds.

What version of the product are you using? On what operating system?
MacFUSE 0.1.7, Mac OS X 10.4.8.

Please provide any additional information below.

The code in mount_fusefs.c currently only issues a notification when a FUSE 
filesystem 
successfully initializes within 5 seconds of being mounted.  For daemons that 
would like to track 
FUSE mounts (to prevent shutdown stalls), it would be useful to have either (a) 
two notifications 
or (b) the "mounted" notification sent after successful init or timeout.

I've included a patch against mount_fusefs.c to move the notification out of 
the wait loop, but 
still indicate timeout failures.  Similarly, DiskArbitration is pinged using 
the same logic, so that -
oping_diskarb guarantees the ping will go through, even for slow filesystems, 
just like the 
notification.

Original issue reported on code.google.com by shadowof...@gmail.com on 24 Jan 2007 at 8:45

Attachments:

GoogleCodeExporter commented 8 years ago
I'm leaning in favor of 2 notifications: one for "mounted" and another for 
"inited". Will that work for you?

Original comment by si...@gmail.com on 24 Jan 2007 at 9:43

GoogleCodeExporter commented 8 years ago
Yeah, it would.

For detecting active FUSE mounts, a better and simpler option is to snoop 
through the results of getmntinfo(); I'll 
post about that on the mailing list.

I still think distinguishing between "inited" and "mounted" would be good if 
anyone else wants to listen for 
notifications.  It's also possible that an "unmount" notification would be 
handy, but it's not critical.

Original comment by shadowof...@gmail.com on 24 Jan 2007 at 10:34

GoogleCodeExporter commented 8 years ago
I'm adding 3 notifications for now (will be in 0.1.9 -- we'll probably skip 
0.1.8 and go straight to 9):

* mounted - sent after a successful mount system call
* inited - sent after a successful init within the specified timeout period
* inittimedout - sent if couldn't init within the specified timeout period

The timeout period is by default 6 seconds, but can be specified through the 
new init_timeout option.

Original comment by si...@gmail.com on 25 Jan 2007 at 1:38

GoogleCodeExporter commented 8 years ago
Added notifications.

Original comment by si...@gmail.com on 25 Jan 2007 at 5:24

GoogleCodeExporter commented 8 years ago

Original comment by si...@gmail.com on 25 Jan 2007 at 6:40