After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 333582 - Monitoring remote mounts with fam when inotify is enabled
Monitoring remote mounts with fam when inotify is enabled
Status: RESOLVED FIXED
Product: gnome-vfs
Classification: Deprecated
Component: Monitoring (inotify)
2.12.x
Other Linux
: Normal normal
: ---
Assigned To: John McCutchan
gnome-vfs maintainers
Depends on:
Blocks:
 
 
Reported: 2006-03-06 09:35 UTC by Josselin Mouette
Modified: 2006-06-13 16:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed fix for gnome-vfs 2.13.92 (940 bytes, patch)
2006-03-06 09:36 UTC, Josselin Mouette
none Details | Review
Proposed fix for gnome-vfs 2.13.92 (1.09 KB, patch)
2006-03-07 22:19 UTC, Josselin Mouette
none Details | Review
Updated patch for 2.14.1 (1.23 KB, patch)
2006-06-12 20:20 UTC, Josselin Mouette
none Details | Review

Description Josselin Mouette 2006-03-06 09:35:20 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.
Comment 1 Josselin Mouette 2006-03-06 09:36:02 UTC
Created attachment 60746 [details] [review]
Proposed fix for gnome-vfs 2.13.92
Comment 2 John McCutchan 2006-03-06 17:05:31 UTC
other than,
 typedef struct {
-	FAMRequest request;
 	GnomeVFSURI *uri;
+	FAMRequest request;
 	gboolean     cancelled;
 } FileMonitorHandle;

the patch looks good.
Comment 3 Josselin Mouette 2006-03-06 17:28:42 UTC
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.
Comment 4 John McCutchan 2006-03-07 22:00:00 UTC
makes sense, maybe a comment would help?
Comment 5 Josselin Mouette 2006-03-07 22:19:37 UTC
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.
Comment 6 Josselin Mouette 2006-05-14 15:47:02 UTC
Any news on inclusion of this patch? Do you need other improvements?
Comment 7 John McCutchan 2006-06-12 18:53:40 UTC
Sorry for the lag. I'd like to see a comment next to the structure definition warning future developers that order matters.
Comment 8 Josselin Mouette 2006-06-12 20:20:48 UTC
Created attachment 67212 [details] [review]
Updated patch for 2.14.1

Here it is, also updated for 2.14.1.
Comment 9 John McCutchan 2006-06-13 16:48:04 UTC
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.