Re: [gamin] gamin (inotify?) and KDE issue



On Sat, Sep 18, 2004 at 03:18:56AM -0500, Stephen Anderson wrote:
> Hi,
> 
> I'm testing gamin with the inotify backed end of 2.6.8.1 using inotify 
> 0.0.9.2.  I'm using KDE 3.3 which was previously using FAM.
[...]
> Now with a command prompt I issue the following commands and get the 
> following results:
> 
> rm -r /var/abs/local/gamin/src
> * src directory disappears *
> rm -r /var/abs/local/gamin/pkg
> * ! no konqueror update *
> F5 in konqueror
> * pkg directory disappears *
> mkdir /var/abs/local/gamin/pkg
> * pkg directory appears *
> mkdir /var/abs/local/gamin/src
> * src directoty appears *
> rm -r /var/abs/local/gamin/src
> * ! no konqueror update *
> rm -r /var/abs/local/gamin/pkg
> * BOTH src and pkg disappear *
> 
> I tested more extensively with about 7 directories, and the pattern holds.  
> Konqueror only gets updated with every OTHER directory removal from the 
> directory it is watching.
> 
> A furhter odd surprise was that when it updated automatically to show me 
> removing "pkg" and then didn't update when I removed "src", (so now no 
> subdirectories), and then I mkdir "test", konqueror automatically updated 
> to show test AND src disappeared.
> 
> I tested and this behavior is not seen when using FAM.

  if using the dnotify back-end there is a problem in the sense that
if you are monitoring a directory, that the directory is empty and 
unlinked, you do not get a dnotify event. this is one more dnotify_sucks++
reason, the solutions would be to either:
   - switch empty directories to polling, which sucks because monitoring
     an empty dir might be relatively common and generating burden for
     something which does not change is bad
   - use dnotify on the parent directory to check the removal, but
     if the parent directory is fully populated (for example if you
     want to survey a directory under the user home or under /tmp)
     then all changes can generate a lot of dnotify event or force to
     consume a lot of CPU time to check the parent dir list.
I'm still unsure what's the worse solution in general, so I didn't
yet implemented a fix for this limitation in gamin yet.
The inotify back-end might work better on this and if possible be fixed
to catch that.

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]