[Nepomuk] Bugs, Patches and Scripts. - StrigiService & KInotify

Sebastian Trüg trueg at kde.org
Tue May 11 16:07:20 CEST 2010


Sorry for being complicated but in KInotify all folders are explicitly
watched. In order to be able to track file moves in all folders we
install one inotify watch for each folder in the tree. Thus the high IO
load on startup.

Cheers,
Sebastian

On 05/11/2010 03:17 PM, Vishesh Handa wrote:
> No! This is confusing. I'll explain with an example -
> 
> Explicitly Watched = A folder on whom an addWatch(...) has been performed.
> Implicitly Watched = A sub folder of an explicitly watched folder.
> 
> If an explicitly watched folder is deleted/moved/renamed a MoveSelf
> Event is triggered. No matter what! It does not matter if the parent is
> watched or not. A MoveSelf event is NOT triggered for an implicitly
> shared folder.
> 
> This is exactly how it should be. Even if we get a MoveSelf event when
> the parent is being watched, it does not matter. The folder would be
> removed from being explicitly watched. But it would still be implicitly
> watched as its parent is still being watched.
> 
> So, to summarize, this patch clears up useless watches!
> 
> Vishesh Handa
> 
> On Tue, May 11, 2010 at 11:18 AM, Sebastian Trüg <trueg at kde.org
> <mailto:trueg at kde.org>> wrote:
> 
>     Hi Vishesh,
> 
>     so we only get a moveself if the parent folder is NOT watched. If that
>     is the case, please commit.
> 
>     Cheers,
>     Sebastian
> 
>     On 05/11/2010 01:15 AM, Vishesh Handa wrote:
>     > Hey Sebastian
>     >
>     >     > I've tested it out. If a directory and its parent are being
>     >     watched, and
>     >     > the directory is moved the moveSelf event does *not* occur.
>     The normal
>     >     > move does occur. :-)
>     >
>     >     OK, if that is the case then I suppose your patch is correct.
>     But better
>     >     add a lengthy comment to the code explaining why we treat
>     moveself as a
>     >     delete.
>     >
>     >
>     > I refrained from committing as I thought I hadn't tested it out
>     > properly. It turns out that I hadn't. Long story shot. The
>     EventMoveSelf
>     > event is called in both the cases.
>     >
>     > 1. If a folder A is being watched and A is moved.
>     > 2. If a folder B/A is being watched and so is its parent B.
>     >
>     > Here "being watched" means explicitly adding a watch. It does NOT
>     apply
>     > to sub folders of the watched folder, even though they are also being
>     > watched. (watches are recursive)
>     >
>     > I've tested it out properly this time. And it works perfectly. (Try it
>     > out if you have the time)
>     >
>     > - Vishesh Handa
>     >
> 
> 


More information about the Nepomuk mailing list