linux/fs/overlayfs
Amir Goldstein b7bf9908e1 ovl: fix corner case of non-constant st_dev;st_ino
On non-samefs overlay without xino, non pure upper inodes should use a
pseudo_dev assigned to each unique lower fs, but if lower layer is on the
same fs and upper layer, it has no pseudo_dev assigned.

In this overlay layers setup:
 - two filesystems, A and B
 - upper layer is on A
 - lower layer 1 is also on A
 - lower layer 2 is on B

Non pure upper overlay inode, whose origin is in layer 1 will have the
st_dev;st_ino values of the real lower inode before copy up and the
st_dev;st_ino values of the real upper inode after copy up.

Fix this inconsitency by assigning a unique pseudo_dev also for upper fs,
that will be used as st_dev value along with the lower inode st_dev for
overlay inodes in the case above.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2020-01-24 09:46:45 +01:00
..
copy_up.c ovl: improving copy-up efficiency for big sparse file 2020-01-22 20:11:41 +01:00
dir.c ovl: use pr_fmt auto generate prefix 2020-01-22 20:11:41 +01:00
export.c ovl: generalize the lower_layers[] array 2020-01-22 20:11:41 +01:00
file.c ovl: use ovl_inode_lock in ovl_llseek() 2020-01-22 20:11:41 +01:00
inode.c ovl: fix corner case of non-constant st_dev;st_ino 2020-01-24 09:46:45 +01:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
namei.c ovl: generalize the lower_layers[] array 2020-01-22 20:11:41 +01:00
overlayfs.h ovl: simplify ovl_same_sb() helper 2020-01-24 09:46:45 +01:00
ovl_entry.h ovl: fix corner case of conflicting lower layer uuid 2020-01-24 09:46:45 +01:00
readdir.c ovl: simplify ovl_same_sb() helper 2020-01-24 09:46:45 +01:00
super.c ovl: fix corner case of non-constant st_dev;st_ino 2020-01-24 09:46:45 +01:00
util.c ovl: simplify ovl_same_sb() helper 2020-01-24 09:46:45 +01:00