diff mbox series

[v6.4.1,09/13] xfs/104: use _scratch_mkfs_sized

Message ID 20250219191744.GR21799@frogsfrogsfrogs (mailing list archive)
State New
Headers show
Series None | expand

Commit Message

Darrick J. Wong Feb. 19, 2025, 7:17 p.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

Use _scratch_mkfs_sized instead of opencoding the small fs creation
logic because the helper scales down the size of the rt volume to match
the data volume.  This means the format won't fail if SCRATCH_RTDEV is
quite large.

Also fix some incorrect bash usage of "$@" and remove the leading
underscore because it's a private test function.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
v6.4.1: use _scratch_mkfs_sized this time
---
 tests/xfs/104 |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Christoph Hellwig Feb. 20, 2025, 6:17 a.m. UTC | #1
Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>
diff mbox series

Patch

diff --git a/tests/xfs/104 b/tests/xfs/104
index cd625d6b74aaaf..d4fc3ec136ae5f 100755
--- a/tests/xfs/104
+++ b/tests/xfs/104
@@ -12,10 +12,10 @@  _begin_fstest growfs ioctl prealloc auto stress
 # Import common functions.
 . ./common/filter
 
-_create_scratch()
+create_scratch_sized()
 {
 	echo "*** mkfs"
-	_scratch_mkfs_xfs $@ | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs
+	_scratch_mkfs_sized "$@" | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs
 	. $tmp.mkfs
 
 	echo "*** mount"
@@ -61,7 +61,7 @@  size=`expr 125 \* 1048576`	# 120 megabytes initially
 sizeb=`expr $size / $dbsize`	# in data blocks
 echo "*** creating scratch filesystem"
 logblks=$(_scratch_find_xfs_min_logblocks -dsize=${size} -dagcount=${nags})
-_create_scratch -lsize=${logblks}b -dsize=${size} -dagcount=${nags}
+create_scratch_sized "${size}" '' -lsize=${logblks}b -dagcount=${nags}
 
 echo "*** using some initial space on scratch filesystem"
 for i in `seq 125 -1 90`; do