2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2008 Silicon Graphics, Inc. All Rights Reserved.
7 # log size mkfs test - ensure the log size scaling works for small filesystems
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
15 status=1 # failure is the default!
16 trap "_cleanup; exit \$status" 0 1 2 3 15
24 # get standard environment, filters and checks
28 # real QA test starts here
33 _scratch_mkfs_xfs >/dev/null 2>&1
37 LOOP_DEV=$SCRATCH_MNT/test_fs
38 LOOP_MNT=$SCRATCH_MNT/test_fs_dir
43 echo -n "fssize=${i}g "
44 $MKFS_XFS_PROG -f -b size=4096 -l version=2 \
45 -d name=$LOOP_DEV,size=${i}g |grep log
46 mount -o loop -t xfs $LOOP_DEV $LOOP_MNT
47 echo "test write" > $LOOP_MNT/test
48 umount $LOOP_MNT > /dev/null 2>&1
51 # make large holey file
52 $XFS_IO_PROG -f -c "truncate 256g" $LOOP_DEV
54 #make loopback mount dir
57 # walk over standard sizes (up to 256GB)
58 _do_mkfs 1 2 4 8 16 32 64 128 256