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. Thanks, Amir.