Re: [PATCH v5 17/22] fsnotify: send MOVE_SELF event with parent/name info

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

 



On Thu, Jul 16, 2020 at 5:10 PM Amir Goldstein <amir73il@xxxxxxxxx> wrote:
>
> On Thu, Jul 16, 2020 at 4:59 PM Amir Goldstein <amir73il@xxxxxxxxx> wrote:
> >
> > On Thu, Jul 16, 2020 at 4:45 PM Jan Kara <jack@xxxxxxx> wrote:
> > >
> > > On Thu 16-07-20 11:42:25, Amir Goldstein wrote:
> > > > MOVE_SELF event does not get reported to a parent watching children
> > > > when a child is moved, but it can be reported to sb/mount mark or to
> > > > the moved inode itself with parent/name info if group is interested
> > > > in parent/name info.
> > > >
> > > > Use the fsnotify_parent() helper to send a MOVE_SELF event and adjust
> > > > fsnotify() to handle the case of an event "on child" that should not
> > > > be sent to the watching parent's inode mark.
> > > >
> > > > Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx>
> > >
> > > What I find strange about this is that the MOVE_SELF event will be reported
> > > to the new parent under the new name (just due to the way how dentry
> > > handling in vfs_rename() works). That seems rather arbitrary and I'm not
> > > sure it would be useful? I guess anybody needing dir info with renames
> > > will rather use FS_MOVED_FROM / FS_MOVED_TO where it is well defined?
> > >
> > > So can we leave FS_MOVE_SELF as one of those cases that doesn't report
> > > parent + name info?
> > >
> >
> > I can live with that.
> > I didn't have a use case for it.
> > This patch may be dropped from the series without affecting the rest.
> >
>
> BTW, I checked my man page and it doesn't say anything about whether
> parent fid and child fid can be reported together with MOVE_SELF.
> The language is generic enough on that part.
>

FYI, I pushed a commit to the LTP branch that adapts the test to MOVE_SELF
that does not report name and tested with this patch reverted.

The test now has less special cases when setting expected values,
which is generally a good sign ;-)

Thanks,
Amir.



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

  Powered by Linux