[LTP] [PATCH v4] inotify13: check rename cookie pairing after adjacent moves

Petr Vorel pvorel@suse.cz
Fri Oct 30 18:48:55 CET 2026


> On Fri, Oct 30, 2026 at 6:06 PM Petr Vorel <pvorel@suse.cz> wrote:

> > > On Thu, Oct 29, 2026 at 10:07 PM Hungyu Lin <dennylin0707@gmail.com> wrote:

> > > > Queue an unpaired IN_MOVED_FROM event, followed by an IN_MOVED_FROM and
> > > > IN_MOVED_TO pair with the same source watch descriptor and name as the
> > > > first event. Watch only IN_MOVE so creation of the replacement entry
> > > > does not separate the two IN_MOVED_FROM events in the queue.

> > > > Affected kernels coalesce the second IN_MOVED_FROM into the first,
> > > > leaving the IN_MOVED_TO cookie without a matching IN_MOVED_FROM cookie.
> > > > Check that all three events are retained, the two moves have distinct
> > > > cookies, and the second IN_MOVED_FROM matches the IN_MOVED_TO cookie.
> > > > Cover both regular files and directories.

> > > > Suggested-by: Amir Goldstein <amir73il@gmail.com>
> > > > Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>

> > > Thank you for your patience with my review

> > > Reviewed-by: Amir Goldstein <amir73il@gmail.com>

> > Thank you!

> > Reviewed-by: Petr Vorel <pvorel@suse.cz>

> > I have no problem to fix very minor issues reported by agent before merge,
> > but what bothers me there is no kernel fix for the failure.  If I'm not
> > mistaken, the fix in kernel [1] was reviewed [2] but not yet merged (I looked to
> > next tree as well).
> > There are other fixes for 63c882a05416 ("inotify: reimplement inotify using
> > fsnotify") in stable, e.g. e422777fdd474 ("fsnotify: Fix stale object mask after
> > concurrent mark updates"), but I haven't found this one.

> > Merging test helps kernel developers to test if the problem was fixed but break
> > for it for anybody who uses master for regular testing without even explaining
> > fix is WIP. But I suppose it will be processed soon because stable was in Cc,
> > right?

> > We have runtest/staging, but that's for new functionality, not for tests which
> > reproduce problem which was not fixed.

> > @Jan @Amir is there a git kernel tree for fanotify and inotify? I found only
> > VFS. If yes, please update MAINTAINERS file.


> FSNOTIFY: FILESYSTEM NOTIFICATION INFRASTRUCTURE
> M:      Jan Kara <jack@suse.cz>
> R:      Amir Goldstein <amir73il@gmail.com>
> L:      linux-fsdevel@vger.kernel.org
> S:      Maintained
> T:      git git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs.git
> fsnotify
> F:      fs/notify/
> F:      include/linux/fsnotify*.h

Thanks a lot for pointing this doc, I overlooked because I noticed the earlier:

FANOTIFY
M:	Jan Kara <jack@suse.cz>
R:	Amir Goldstein <amir73il@gmail.com>
R:	Matt Bobrowski <matt@bobrowski.net>
L:	linux-fsdevel@vger.kernel.org
S:	Maintained
F:	fs/notify/fanotify/
F:	include/linux/fanotify.h
F:	include/uapi/linux/fanotify.h

INOTIFY
M:	Jan Kara <jack@suse.cz>
R:	Amir Goldstein <amir73il@gmail.com>
L:	linux-fsdevel@vger.kernel.org
S:	Maintained
F:	Documentation/filesystems/inotify.rst
F:	fs/notify/inotify/
F:	include/linux/inotify.h
F:	include/uapi/linux/inotify.h

> We could probably rename/move the fanotify/inotify entries to appear as
> sub entries mimicking the VFS entries:

> FILESYSTEM NOTIFICATION (fsnotify infrastructure)
> ...
> FILESYSTEM NOTIFICATION [INOTIFY]
> ...
> FILESYSTEM NOTIFICATION [FANOTIFY]

+1

Kind regards,
Petr

> Thanks,
> Amir.


More information about the ltp mailing list