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>
# 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"
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