On Thu, Jul 14, 2016 at 11:42 AM, Andrey Melnikov <temnota.am@xxxxxxxxx> wrote: > 2016-07-14 12:23 GMT+03:00 Miklos Szeredi <miklos@xxxxxxxxxx>: >> On Tue, Jul 12, 2016 at 11:01 PM, Andrey Melnikov <temnota.am@xxxxxxxxx> wrote: >>> Ping. >>> >>> 2016-06-30 14:04 GMT+03:00 Andrey Jr. Melnikov <temnota.am@xxxxxxxxx>: >>>> Fix overlayfs inotify interaction - use d_real_inode() helper >>>> to resolve real (underlying) inode. Without this inotify is not functional on >>>> overlayfs. >> >> Have you tried the alternative patch from Aihua Zhang: >> https://lkml.org/lkml/2016/7/7/83 > > No. My patch add small overhead, lookup inode once when add inotify > watch, this patch - lookup inode on each operation. For what? I'm afraid that your patch won't work for all notifications (like directory modification). Thanks, Miklos > >>>> >>>> Signed-off-by: Andrey Jr. Melnikov <temnota.am@xxxxxxxxx> >>>> >>>> --- >>>> Runtime tested with inotifywait in monitor mode to confirm event generation. >>>> >>>> cd /tmp/ && mkdir dest upper lower work >>>> mount -t overlay none dest -o upperdir=upper/,lowerdir=lower/,workdir=work/ >>>> while /bin/true; do echo test >>/tmp/dest/lower-data; sleep 5; done & >>>> inotifywait -m /tmp/dest/lower-data >>>> >>>> fs/notify/inotify/inotify_user.c | 2 +- >>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>> >>>> diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c >>>> index b8d08d0..592ce16 100644 >>>> --- a/fs/notify/inotify/inotify_user.c >>>> +++ b/fs/notify/inotify/inotify_user.c >>>> @@ -742,7 +742,7 @@ SYSCALL_DEFINE3(inotify_add_watch, int, fd, const char __user *, pathname, >>>> goto fput_and_out; >>>> >>>> /* inode held in place by reference to path; group by fget on fd */ >>>> - inode = path.dentry->d_inode; >>>> + inode = d_real_inode(path.dentry); >>>> group = f.file->private_data; >>>> >>>> /* create/update an inode mark */ >>>> -- >>>> 2.8.1 >>>> -- To unsubscribe from this list: send the line "unsubscribe linux-unionfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html