[PATCH] generic/042: add sleep before shutdown

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



On some server machines, the memory was so big that we
don't have enough time to submit file.  After umoumt,
hexdump will report no such file or directory on ext4.
memory:128G
swap:8G
fail as below:
-------------------------------------------
  falloc -k
  wrote 65536/65536 bytes at offset 0
 -XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 +64 KiB, 16 ops; 0.0002 sec (282.805 MiB/sec and 72398.1900 ops/sec)
 +hexdump: /mnt/xfstests/scratch/042.mnt/file: No such file or directory
 +hexdump: all input file arguments failed
-------------------------------------------

I think we should reserve a short time, so umount will not lose file.

Signed-off-by: Yang Xu <xuyang2018.jy@xxxxxxxxxxxxxx>
---
 tests/generic/042 | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/generic/042 b/tests/generic/042
index 6c62eb63..e1453114 100755
--- a/tests/generic/042
+++ b/tests/generic/042
@@ -56,6 +56,10 @@ _crashtest()
 	# write, run the test command and shutdown the fs
 	$XFS_IO_PROG -f -c "pwrite -S 1 0 64k" -c "$cmd 60k 4k" $file | \
 		_filter_xfs_io
+
+	# keep file not lose when umount even on server machine
+	sleep 10
+
 	./src/godown -f $mnt
 
 	$UMOUNT_PROG $mnt
-- 
2.18.1






[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux