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
41 fs_size=$((2 * 1024 * 1024 * 1024))
42 ORIGIN=$SCRATCH_MNT/origin
46 threads=$((LOAD_FACTOR * 100))
47 if [ $threads -gt 200 ]
58 disksize=$(($fs_size / 3))
59 num=$(($disksize / $count / $threads / 4096))
60 while [ $i -lt $num ]; do
61 $XFS_IO_PROG -f -c "pwrite 0 $((4096*count))" \
62 $ORIGIN/file_$i >>$seqres.full 2>&1
71 mkdir $SCRATCH_MNT/sub_$suffix
73 cp -r $ORIGIN/* $SCRATCH_MNT/sub_$suffix >>$seqres.full 2>&1
74 rm -rf $SCRATCH_MNT/sub_$suffix
85 while [ $loop -lt $threads ]; do
94 echo "Silence is golden"
98 _scratch_mkfs_sized $fs_size >>$seqres.full 2>&1
99 _scratch_mount >>$seqres.full 2>&1