overlay: Test consistent st_ino numbers for non-samefs scenario
authorChandan Rajendra <chandan@linux.vnet.ibm.com>
Sat, 18 Nov 2017 05:57:00 +0000 (11:27 +0530)
committerEryu Guan <eguan@redhat.com>
Mon, 20 Nov 2017 07:46:15 +0000 (15:46 +0800)
commite66fe3c8fc5a238ac6291cd2227536acea1c7e72
treefe847d34ed43f9926154fce570cdd0bb0c3c3478
parentfac0e790c810c51f8e9833d86b009d6ba77f075c
overlay: Test consistent st_ino numbers for non-samefs scenario

This commit adds a test to verify consistent st_ino feature when
the overlayfs instance is composed of two different underlying
filesystem instances.

For example,
$ mount -t xfs /dev/loop0 /mnt/test
$ mount -t xfs /dev/loop1 /mnt/scratch
$ mkdir /mnt/scratch/upper
$ mkdir /mnt/scratch/work
$ mount -t overlay overlay -o lowerdir=/mnt/test \
        -o upperdir=/mnt/scratch/upper \
        -o workdir=/mnt/scratch/work /mnt/merge

The goal of this test is to verify that overlayfs returns consistent
st_ino for the following scenarios,
- Copy-up of lowerdir files
- Rename files and drop dentry/inode cache
- Remount the overlayfs instance

Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
tests/overlay/043 [new file with mode: 0755]
tests/overlay/043.out [new file with mode: 0644]
tests/overlay/group