diff mbox series

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

Message ID 20250417031208.1852171-29-david@fromorbit.com (mailing list archive)
State New
Headers show
Series check-parallel: Running tests without check | expand

Commit Message

Dave Chinner April 17, 2025, 3:01 a.m. UTC
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@redhat.com>
---
 tests/xfs/259 | 1 -
 1 file changed, 1 deletion(-)
diff mbox series

Patch

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