From: Goswin v. B. <gos...@we...> - 2010-02-24 14:26:58
|
Mohit Aron <ext...@gm...> writes: > On Tue, Feb 23, 2010 at 11:59 PM, Stef Bon <st...@gm...> wrote: >> Oh, sorry, I got a litlle bit irritated when one is saying my >> sollution does not work, but do not tell me what does. I really want >> to understand how fuse and inotify work together, and I cannot find >> anything about that. The webpage about inotify is too general to >> provide me any clue. >> >> Again my fs is an overlay fs. So somehowe my fs (and nothing else) >> needs to detect the changes in the underlying fs (local fs or cifs, >> which also supports inotify) >> > > The inotify related processing is handled by the generic filesystem > code in the kernel - your own filesystem code running at userlevel > doesn't need to do anything. For example, when you write to your fuse > filesystem, the existing code in the kernel passes this write to > anyone doing an inotify. This is the reason I asked you whether you > have some working code that uses inotify on a non-fuse filesystem. If > you have such code, you'll notice that it'll work verbatim on your > fuse filesystem. But he has a overlay FS. That means the files in the fuse filesytem are actually files in another real filesystem somewhere else. Now I guessing that any change of the real file should also trigger any inotify of the virtual file in fuse. That means the fuse filesystem has to somehow notice someone is running inotify on the virtual file and then itself run inotify on the real file and pass any change along. So the question is: How do you write a overlay or networking filesystems so that inotify detects changes made in the real FS or by other hosts? MfG Goswin |