Skip to contentSkip to conversation

mount options and dnotify

DISCUSSION Steve French 2 participants 3 messages Apr 28, 2004 VFS

lore
Share & tools
lore
#0 lore raw

Since two of the linux specific fcntls
F_NOTIFY
and
F_SETLEASE

could have performance implications if allowed over the network, yet in at least the case of directory change notification can be quite important (e.g. for KDE and GNOME to auto refresh their file manager GUIs as new files appear) - is there a precedent for a filesystem specific mount option to disable (or enable) directory change (and/or file change) notification?

I was thinking of adding parsing for "notify=no" (or perhaps better to call it dnotify=no) or "lease=no" on the cifs specific mount options to allow control over whether these notification events only work locally (or work for both local and remote changes) in case there are servers out which contribute to "dnotify storms" (lots of directory change notifications in a short period).

And on a loosely related subject, I noticed that kernel.org has gz snapshots of the mount utility and man page (e.g.in
http://www.kernel.org/pub/linux/utils/util-linux/) but I did not see the name of a maintainer of the mount(8) man page in the page. I wanted to send them suggested additional text pointing to the mount.cifs(8) man page for cifs mounts (similar to what they do for a few others including smbfs).

#1 lore raw
Quoted 6 lines · Steve French

I was thinking of adding parsing for "notify=no" (or perhaps better to call it dnotify=no) or "lease=no" on the cifs specific mount options to allow control over whether these notification events only work locally (or work for both local and remote changes) in case there are servers out which contribute to "dnotify storms" (lots of directory change notifications in a short period).

What is the point in adding those options now? Last time I looked (kernel 2.6.5) notifications and leases only apply to local operations
- there is no interaction with the server.

If notifications and leases are eventually extended to communicate with the server, then you probably want an option to restrict them to local operations only, rather than disable altogether -- as your text says. In which case, "dnotify=local" and "lease=local" makes sense, no?

-- Jamie

#2 lore raw
Quoted 3 lines · Jamie Lokier

What is the point in adding those options now? Last time I looked (kernel 2.6.5) notifications and leases only apply to local operations
- there is no interaction with the server.

Changes were made recently to fs/fcntl.c about line 360 to make it an optional file_operation (nfs apparently needed to hook one of the other fcntls now that they have directio) but this helps cifs vfs solve problems like the bugzilla bug someone opened about new files not showing up automitically in some GUI filemanager. The required function dnotify parent was already exported so the fcntl file op was the only other thing that was needed.

Quoted 2 lines

If notifications and leases are eventually extended to communicate with the server,

The cifs code for this is not complete (it is #ifdeffed out in 2.6.6) but it should be reasonably easy since Samba and Windows servers support the function already.