# Create lower hardlinks
create_hardlinks()
{
- lowerdir=$OVL_BASE_SCRATCH_MNT/$OVL_LOWER
mkdir -p $lowerdir
touch $lowerdir/0
ln $lowerdir/0 $lowerdir/1
rm $SCRATCH_MNT/2
# Verify that orphan index is cleaned when dropping nlink to zero
- ls $OVL_BASE_SCRATCH_MNT/$OVL_WORK/index
+ # With nfs_export=on index will contain a whiteout index entry, so allow
+ # chardev entries in index dir.
+ find $workdir/index -mindepth 1 -type c -o -print
}
+lowerdir=$OVL_BASE_SCRATCH_MNT/$OVL_LOWER
+workdir=$OVL_BASE_SCRATCH_MNT/$OVL_WORK
+
# Remove all files from previous tests
_scratch_mkfs
# Without overlay index feature hardlinks are broken on copy up
_require_scratch_feature index
+lowerdir=$OVL_BASE_SCRATCH_MNT/$OVL_LOWER
+workdir=$OVL_BASE_SCRATCH_MNT/$OVL_WORK
+
# Remove all files from previous tests
_scratch_mkfs
# Create lower hardlink
-lowerdir=$OVL_BASE_SCRATCH_MNT/$OVL_LOWER
mkdir -p $lowerdir
touch $lowerdir/0
ln $lowerdir/0 $lowerdir/1
# Verify that orphan index is cleaned on mount
_scratch_cycle_mount index=on
-ls $OVL_BASE_SCRATCH_MNT/$OVL_WORK/index
+# With nfs_export=on index will contain a whiteout index entry, so allow
+# chardev entries in index dir.
+find $workdir/index -mindepth 1 -type c -o -print
echo "Silence is golden"
status=0
report_nlink "unlink last lower"
# Verify that orphan index is cleaned when dropping nlink to zero
- ls $workdir/index
+ # With nfs_export=on index will contain a whiteout index entry, so allow
+ # chardev entries in index dir.
+ find $workdir/index -mindepth 1 -type c -o -print
}
lowerdir=$OVL_BASE_SCRATCH_MNT/$OVL_LOWER