2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2011-2012 Fujitsu, Inc. All Rights Reserved.
4 # Copyright (c) 2013 Red Hat, Inc. All Rights Reserved.
6 # FS QA Test No. generic/320
10 # Regression test for commit:
11 # 9a3a5da xfs: check for stale inode before acquiring iflock on push
13 # Based on generic/273
16 seqres=$RESULT_DIR/$seq
17 echo "QA output created by $seq"
21 status=1 # failure is the default!
22 trap "_cleanup; exit \$status" 0 1 2 3 15
30 # get standard environment, filters and checks
34 # real QA test starts here
40 fs_size=$((2 * 1024 * 1024 * 1024))
41 ORIGIN=$SCRATCH_MNT/origin
45 threads=$((LOAD_FACTOR * 100))
46 if [ $threads -gt 200 ]
57 disksize=$(($fs_size / 3))
58 num=$(($disksize / $count / $threads / 4096))
59 while [ $i -lt $num ]; do
60 $XFS_IO_PROG -f -c "pwrite 0 $((4096*count))" \
61 $ORIGIN/file_$i >>$seqres.full 2>&1
70 mkdir $SCRATCH_MNT/sub_$suffix
72 cp -r $ORIGIN/* $SCRATCH_MNT/sub_$suffix >>$seqres.full 2>&1
73 rm -rf $SCRATCH_MNT/sub_$suffix
84 while [ $loop -lt $threads ]; do
93 echo "Silence is golden"
97 _scratch_mkfs_sized $fs_size >>$seqres.full 2>&1
98 _scratch_mount >>$seqres.full 2>&1