mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
overlay/060: Use falloc to make sure a meta copy file got copied up
Overlayfs might copy up data of file on first write of file (and not necessarily upon open of file). So call falloc file opened with O_RDWR and after that data must have been copied up. [Eryu: add _require_xfs_io_command "falloc" to make sure underlying fs have fallocate(2) support] Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
+2
-1
@@ -36,6 +36,7 @@ _supported_os Linux
|
||||
# them explicity after test.
|
||||
_require_scratch_nocheck
|
||||
_require_scratch_overlay_features index redirect_dir metacopy
|
||||
_require_xfs_io_command "falloc"
|
||||
|
||||
# remove all files from previous tests
|
||||
_scratch_mkfs
|
||||
@@ -170,7 +171,7 @@ test_common()
|
||||
|
||||
# Trigger data copy up and check absence of metacopy xattr.
|
||||
mount_overlay $_lowerdir
|
||||
$XFS_IO_PROG -c "open -a $SCRATCH_MNT/$_target"
|
||||
$XFS_IO_PROG -c "falloc 0 1" $SCRATCH_MNT/$_target >> $seqres.full
|
||||
echo "check properties of data copied up file"
|
||||
check_file_size_contents $SCRATCH_MNT/$_target $_size "$_data"
|
||||
umount_overlay
|
||||
|
||||
Reference in New Issue
Block a user