]> git.baikalelectronics.ru Git - kernel.git/commit
fsnotify: support overlayfs
authorAihua Zhang <zhangaihua1@huawei.com>
Thu, 7 Jul 2016 07:37:53 +0000 (15:37 +0800)
committerMiklos Szeredi <mszeredi@redhat.com>
Fri, 16 Sep 2016 10:44:20 +0000 (12:44 +0200)
commit7b306dd6bb79e9e47e3232a2dbe8af93c7080a1a
treeb34bc4b61e6993806773e4fa57ca26c2db63d9dc
parent1581932fa4101dcbc59436298efb4c3a64a06ad4
fsnotify: support overlayfs

When an event occurs direct it to the overlay inode instead of the real
underlying inode.

This will work even if the file was first on the lower layer and then
copied up, while the watch is there.  This is because the watch is on the
overlay inode, which stays the same through the copy-up.

For filesystems other than overlayfs this is a no-op, except for the
performance impact of an extra pointer dereferece.

Verified to work correctly with the inotify/fanotify tests in LTP.

Signed-off-by: Aihua Zhang <zhangaihua1@huawei.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Eric Paris <eparis@redhat.com>
include/linux/fsnotify.h