[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20071128125359.GB11350@duck.suse.cz>
Date: Wed, 28 Nov 2007 13:53:59 +0100
From: Jan Kara <jack@...e.cz>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org, mwelinder@...il.com, rlove@...ve.org,
John McCutchan <ttb@...tacle.dhs.org>
Subject: Re: [PATCH] Send IN_ATTRIB events when link count changes
On Tue 27-11-07 12:46:40, Andrew Morton wrote:
> On Mon, 26 Nov 2007 17:27:58 +0100
> Jan Kara <jack@...e.cz> wrote:
>
> > Hi Andrew,
> >
> > would you pick up this patch for testing in -mm? Thanks.
> >
> > Honza
> >
> > --
> > Jan Kara <jack@...e.cz>
> > SUSE Labs, CR
> >
> > ---
> >
> > Send inotify events to the inode itself when its link count has changed.
>
> Could we have a better changelog please? What is the reason for making
> this change? What are the before-and-after effects upon inotify clients,
> etc?
OK, hopefully a better change log:
Currently, no notification event has been sent when inode's link count
changed. This is inconvenient for the application in some cases:
Suppose you have the following directory structure
foo/test
bar/
and you watch test. If someone does "mv foo/test bar/", you get event
IN_MOVE_SELF and you know something has happened with the file "test".
However if someone does "ln foo/test bar/test" and "rm foo/test" you get no
inotify event for the file "test" (only directories "foo" and "bar" receive
events).
Furthermore it could be argued that link count belongs to file's metadata
and thus IN_ATTRIB should be sent when it changes.
The following patch implements sending of IN_ATTRIB inotify events when
link count of the inode changes, i.e., when a hardlink to the inode is
created or when it is removed. This event is sent in addition to all the
events sent so far. In particular, when a last link to a file is removed,
IN_ATTRIB event is sent in addition to IN_DELETE_SELF event.
Honza
--
Jan Kara <jack@...e.cz>
SUSE Labs, CR
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists