GNOME Bugzilla – Bug 333582
Monitoring remote mounts with fam when inotify is enabled
Last modified: 2006-06-13 16:48:50 UTC
When inotify support is enabled, it always gets used if it's found in the kernel. However, it won't work on remote filesystems. As such, monitoring for NFS filesystems should still be done with FAM. Patch follows.
Created attachment 60746 [details] [review] Proposed fix for gnome-vfs 2.13.92
other than, typedef struct { - FAMRequest request; GnomeVFSURI *uri; + FAMRequest request; gboolean cancelled; } FileMonitorHandle; the patch looks good.
There's a reason why I changed that structure. The FileHandle, DirectoryHandle and ih_sub_t structures all start with the uri element. If the FileMonitorHandle structure doesn't, it leads to a segmentation fault when casting it to a FileHandle and calling file_handle->uri.
makes sense, maybe a comment would help?
Created attachment 60870 [details] [review] Proposed fix for gnome-vfs 2.13.92 Indeed, here's the patch with a comment expliciting what is done.
Any news on inclusion of this patch? Do you need other improvements?
Sorry for the lag. I'd like to see a comment next to the structure definition warning future developers that order matters.
Created attachment 67212 [details] [review] Updated patch for 2.14.1 Here it is, also updated for 2.14.1.
2006-06-13 John McCutchan <john@johnmccutchan.com> From Josselin Mouette <joss@debian.org>: * modules/file-method.c: (do_monitor_add), (do_monitor_cancel): When inotify support is enabled, it always gets used if it's found in the kernel. However, it won't work on remote filesystems. As such, monitoring for NFS filesystems should still be done with FAM.