linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Again:request for integration inotify in FUSE and fs like CIFS.
@ 2011-03-19  8:56 Stef Bon
  2011-03-19  9:49 ` Al Viro
  0 siblings, 1 reply; 5+ messages in thread
From: Stef Bon @ 2011-03-19  8:56 UTC (permalink / raw)
  To: linux-fsdevel

Hi,

some days ago I posted this request. I had no reaction so far, so I
decided to post it again here. Maybe not the best place, if so let me
know.

I'm working on a construction using where a FUSE fs plays an important
role, and it's basically an overlay fs. See:

http://linux.bononline.nl/wiki/index.php/Mount.md5key

and for a screenshot:

http://linux.bononline.nl/wiki/index.php/Introduction_and_motivation#Preview_of_what_my_construction_offers

Now I would like to ask for an interface between the Inotfy subsystem
in VFS and the mounted fs. For example:

the fusexmp FUSE fs takes as backend the root /, so when mounting you
see a mirror of the root at the mountpoint.

No user a mounts it like:

mkdir ~/mount
fusexmp /home/a/mount

When user a (or any other user ) has an app which has set a watch at
the directory /home/a/mount/tmp, watching for changes
here, it will see a change if user a does:

cd ~/mount/tmp
touch testfile


Now when the same user a does:

cd /tmp
rm testfile

this will not be notified by the watch set at /home/a/mount/tmp

This logical: the VFS does not and cannot know the directories
/home/a/mount/tmp and /tmp
are related, and it should not. What my suggestion is to add some
communication between
the VFS and the driver (in this case FUSE) about inotify watches being
set and removed, and additional
tha ability for the driver to notify VFS when something has changed.

So for the example of above it goes like:

the FUSE fs gets a signal there is a watch set at /home/a/mount/tmp
(=tmp under the mountpoint). The fuse fs sets a simular
inotify watch on the backend, in this case /tmp, and will listen for
changes on the inode. When it recieves
some data(inotify events), it will push them forward to the inotify
watch on /home/a/mount/tmp. This is upto the developer
of the FUSE fs to implement this, but required to make this work is:

a. when there is a notify watch set on a mounted FUSE fs, the VFS
should send the FUSE fs a signal a watch (with a mask) is set on a
particular inode. (and also when it's removed)

b. the VFS should be able to listen to notify events coming from the FUSE fs.

Actually the VFS is signalling to the FUSE fs that it wants to have an
inode to be up to date, and to be informed when changes occur.

This example is about FUSE, but it also counts for a fs like cifs.
There the backend is a SMB share, and the SMB server has to support
inotify
to make this work.

I hope you get the picture,

Stef Bon
Voorburg
the Netherlands

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-03-20 15:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-19  8:56 Again:request for integration inotify in FUSE and fs like CIFS Stef Bon
2011-03-19  9:49 ` Al Viro
2011-03-19 10:39   ` Stef Bon
2011-03-20 14:02   ` Jeff Layton
2011-03-20 15:55     ` Stef Bon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).