2 # FS QA Test No. generic/320
6 # Regression test for commit:
7 # 9a3a5da xfs: check for stale inode before acquiring iflock on push
11 #-----------------------------------------------------------------------
12 # Copyright (c) 2011-2012 Fujitsu, Inc. All Rights Reserved.
13 # Copyright (c) 2013 Red Hat, Inc. All Rights Reserved.
15 # This program is free software; you can redistribute it and/or
16 # modify it under the terms of the GNU General Public License as
17 # published by the Free Software Foundation.
19 # This program is distributed in the hope that it would be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU General Public License for more details.
24 # You should have received a copy of the GNU General Public License
25 # along with this program; if not, write the Free Software Foundation,
26 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 #-----------------------------------------------------------------------
32 seqres=$RESULT_DIR/$seq
33 echo "QA output created by $seq"
37 status=1 # failure is the default!
38 trap "_cleanup; exit \$status" 0 1 2 3 15
46 # get standard environment, filters and checks
50 # real QA test starts here
52 _supported_os IRIX Linux
57 fs_size=$((2 * 1024 * 1024 * 1024))
58 ORIGIN=$SCRATCH_MNT/origin
62 threads=$((LOAD_FACTOR * 100))
63 if [ $threads -gt 200 ]
74 disksize=$(($fs_size / 3))
75 num=$(($disksize / $count / $threads / 4096))
76 while [ $i -lt $num ]; do
77 $XFS_IO_PROG -f -c "pwrite 0 $((4096*count))" \
78 $ORIGIN/file_$i >>$seqres.full 2>&1
87 mkdir $SCRATCH_MNT/sub_$suffix
89 cp -r $ORIGIN/* $SCRATCH_MNT/sub_$suffix >>$seqres.full 2>&1
90 rm -rf $SCRATCH_MNT/sub_$suffix
101 while [ $loop -lt $threads ]; do
110 echo "Silence is golden"
114 _scratch_mkfs_sized $fs_size >>$seqres.full 2>&1
115 _scratch_mount >>$seqres.full 2>&1