]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfs/104: use _scratch_mkfs_sized
authorDarrick J. Wong <djwong@kernel.org>
Thu, 20 Feb 2025 21:47:12 +0000 (13:47 -0800)
committerZorro Lang <zlang@kernel.org>
Thu, 6 Mar 2025 13:25:55 +0000 (21:25 +0800)
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>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/xfs/104

index cd625d6b74aaaf40180dfb6c835a83f1964c46dd..d4fc3ec136ae5fd17be048c529cdd554d5c1268a 100755 (executable)
@@ -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