2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2011-2012 Fujitsu, Inc. All Rights Reserved.
7 # reservation test with heavy cp workload
12 seqres=$RESULT_DIR/$seq
13 echo "QA output created by $seq"
17 status=0 # success is the default!
18 trap "_cleanup; exit \$status" 0 1 2 3 15
35 _cpu_num=`$here/src/feature -o`
36 threads=$(($_cpu_num * 50))
37 if [ $threads -gt 200 ]
48 if ! mkdir $SCRATCH_MNT/origin
50 echo "mkdir origin err"
55 cd $SCRATCH_MNT/origin
57 _disksize=`$DF_PROG -B 1 $SCRATCH_MNT | tail -1 | $AWK_PROG '{ print $5 }'`
58 _disksize=$(($_disksize / 3))
59 _num=$(($_disksize / $count / $threads / $block_size))
61 while [ $_i -lt $_num ]
63 dd if=/dev/zero of=file_$_i bs=$block_size count=$_count >/dev/null 2>&1
74 if ! mkdir $SCRATCH_MNT/sub_$_suffix
76 echo "mkdir sub_xxx err"
81 cp -r $SCRATCH_MNT/origin $SCRATCH_MNT/sub_$_suffix >>$seqres.full 2>&1
84 echo "_porter $_suffix not complete"
94 block_size=$(_get_block_size $SCRATCH_MNT)
97 _file_create $block_size
101 while [ $_pid -lt $_threads ]
111 # real QA test starts here
112 _supported_fs generic
116 echo "------------------------------"
117 echo "start the workload"
118 echo "------------------------------"
122 _scratch_unmount 2>/dev/null
123 _scratch_mkfs_sized $((2 * 1024 * 1024 * 1024)) >>$seqres.full 2>&1