[PATCH 28/28] xfs/259: no need to call sync

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



xfs/259 runs sync every time through it's loop.
It takes a ridiculously long time to run under
check-parallel:

xfs/259        461s

When running check-parallel, sync can take a -long- time to
run as there can be dozens of filesystems that need to be synced,
not to mention sync getting hung up behind all the mount and
unmounts that are also being run.

sync is used at the end of the loop before destroying the loop
device, but the contents of the loop device is completely discarded
at the start of the next loop. i.e. the image file is unlinked and
recreated. Hence the sync call does nothing useful and only slows
down the test. Removing it runs the test much faster:

xfs/259        23s

Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
---
 tests/xfs/259 | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tests/xfs/259 b/tests/xfs/259
index c2d26381a..c40ba3a0e 100755
--- a/tests/xfs/259
+++ b/tests/xfs/259
@@ -52,7 +52,6 @@ for del in $sizes_to_check; do
 		$MKFS_XFS_PROG -l size=32m -b size=$bs $loop_dev |  _filter_mkfs \
 			>/dev/null 2> $tmp.mkfs || echo "mkfs failed!"
 		. $tmp.mkfs
-		sync
 		_destroy_loop_device $loop_dev
 		unset loop_dev
 	done
-- 
2.45.2





[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