KDirLister keeps mounted devices in use

Lubos Lunak l.lunak at suse.cz
Mon Jan 6 16:13:26 GMT 2003


 Hello,

 try this: Put a floppy or CDROM device icon if you don't already have one 
(not the devices:// ones). Mount the device and start Konqy by executing it. 
Click on the Home toolbar icon in Konqy. Try to unmount the device by the 
icon popup menu option -> it will complain about the device being used, it 
though it is not (from the user's point of view).

 If you think this example is made up, and it won't in reality happen often, 
try enabling Konqy preloading, and instead of using the Home icon simply 
close the Konqy window. As the process won't really quit, it will be the 
same. It can also happen when reusing processes for local browsing.

 The problem is that KDirLister keeps old directories in a cache, and keeps 
them also in KDirWatch. And KDirWatch, when using DNOTIFY, has to keep an 
open file descriptor for the watched directory, and that's the thing that 
keeps the device busy (and if you're not having the problem, you're not using 
DNOTIFY). It also happens with FAM for me, but it may be because SuSE (and at 
least RH too IIRC) has famd patched to use DNOTIFY.

 Could somebody have a look at it, please? I have no clue about KDirLister, so 
I don't know how difficult could this be to fix. Perhaps KDirWatcher should 
remove from its cache all (sub)dirs of the mounted device, if the current 
entry is not also on the same device.

 I've also noticed that it happens with the devices:// icons, but only if you 
hit Reload (and also, before hitting the Reload button, autoupdating doesn't 
work if I e.g. delete some file in Konsole). It looks like KDirWatch starts 
watching the directory before it's mounted.

-- 
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o.  e-mail: l.lunak at suse.cz , l.lunak at kde.org
Drahobejlova 27  tel: +420 2 9654 2373
190 00 Praha 9   fax: +420 2 9654 2374
Czech Republic   http://www.suse.cz/





More information about the kfm-devel mailing list