Several tests check that index dir is empty after upper entries have
been unlinked. With nfs_export=on, index will contain a whiteout
index entry in that case so, allow chardevs when checking for clean
index dir.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
Overlayfs hardlink test are expected to fail if overlayfs does not
support the inodes index feature, so don't un them if kernel does
not support the feature.
If the feature is supported, enable it with the index=on mount option
for the hardlink tests, regardless of the build time default determined
by kernel config option CONFIG_OVERLAY_FS_INDEX.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
nlink of overlay inode should account for the union of lower
and upper hardlinks.
persistent overlay union nlink is stored in an extended attribute
on the upper inode.
In order to test persistent overlay nlink accounting, the test is
repeated with both warm and cold dentry/inode cache.
[eguan: add comments on what fields report_nlink prints]
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>