Re: [PATCH 2/2] fsnotify: consistent behavior for parent not watching children

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed 11-05-22 16:37:36, Amir Goldstein wrote:
> On Wed, May 11, 2022 at 4:09 PM Jan Kara <jack@xxxxxxx> wrote:
> >
> > On Wed 11-05-22 12:29:14, Amir Goldstein wrote:
> > > The logic for handling events on child in groups that have a mark on
> > > the parent inode, but without FS_EVENT_ON_CHILD flag in the mask is
> > > duplicated in several places and inconsistent.
> > >
> > > Move the logic into the preparation of mark type iterator, so that the
> > > parent mark type will be excluded from all mark type iterations in that
> > > case.
> > >
> > > This results in several subtle changes of behavior, hopefully all
> > > desired changes of behavior, for example:
> > >
> > > - Group A has a mount mark with FS_MODIFY in mask
> > > - Group A has a mark with ignore mask that does not survive FS_MODIFY
> > >   and does not watch children on directory D.
> > > - Group B has a mark with FS_MODIFY in mask that does watch children
> > >   on directory D.
> > > - FS_MODIFY event on file D/foo should not clear the ignore mask of
> > >   group A, but before this change it does
> >
> > Since FS_MODIFY of directory never happens I guess the ignore mask is never
> > cleared? Am I missing something?
> 
> According to the code in send_to_group()
> If D has FS_EVENT_ON_CHILD in mask then
> The the inode mask on D would get events on D/foo
> therefore
> The ignore mask on D should ignore events (e.g. from mount mark) on D/foo
> therefore
> A MODIFY event on D/foo should clear the ignore mask on D
> 
> This is expected. The bug is that the ignore mask is cleared also
> when D does not have FS_EVENT_ON_CHILD in the mask.

Ah, now I understand. Thanks for explanation.

								Honza
-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux