overlay: test overlay file handle of dir with ancestor under lower redirect
authorAmir Goldstein <amir73il@gmail.com>
Wed, 31 Jan 2018 11:44:55 +0000 (13:44 +0200)
committerEryu Guan <eguan@redhat.com>
Fri, 2 Feb 2018 16:33:51 +0000 (00:33 +0800)
commit27f7ed634816fb4748bacbf5f00adb21ef10b0cb
treefaccd75ac2d2e2b99bd1654224559f7e99bf48fd
parentce9707ccd0892df40a2f972b316bdbaf35fa46dd
overlay: test overlay file handle of dir with ancestor under lower redirect

Overlayfs with nfs_export enabled, indexes all directories on copy
up.  Directory index is requires for decoding lower directory file
handles in case ancestors have been renamed.

When enabling nfs_export on an overlay that has merge dirs with
lower layer redirects, the possibility of ancestor rename requires
special handling when encoding lower directory file handles from
layer > 1.

- Check decode of lower dir with parent under lower redirect
- Check decode of lower dir with grandparent under lower redirect
- Check decode of lower dir after rename of lower redirected parent
- Check decode of lower dir after rename of lower redirected grandparent

This test requires and enables overlayfs NFS export support and
merge dir rename support (redirect_dir).
NFS export support depends on and requires overlayfs index feature.

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