[systemd-devel] [PATCH 2/2] path: do not watch IN_ATTRIB for parent directories

Lennart Poettering lennart at poettering.net
Sat Dec 25 10:02:47 PST 2010


On Wed, 01.12.10 15:39, Michal Schmidt (mschmidt at redhat.com) wrote:

> IN_ATTRIB was added in commit 782195a3c31a79428874a32e0264c0aa97a664f7:
>   Author: Lennart Poettering <lennart at poettering.net>
>   Date:   Mon Nov 15 00:47:29 2010 +0100
> 
>     path: always look for IN_ATTRIB since deletion is signalled that way
> 
> But I do not understand what deletion is the description referring to.

when a file is deleted its link count drops to zero. That's how inotify
tells us about deletion. 

given that it is not possible to delete a dir without emptying it first
it is probably safe to set IN_ATTRIB only for the last component of the
path that exists and leave it unset for all its prefixes.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list