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
18 # Import common functions.
21 # real QA test starts here
27 fs_size=$((2 * 1024 * 1024 * 1024))
28 ORIGIN=$SCRATCH_MNT/origin
32 threads=$((LOAD_FACTOR * 100))
33 if [ $threads -gt 200 ]
44 disksize=$(($fs_size / 3))
45 num=$(($disksize / $count / $threads / 4096))
46 while [ $i -lt $num ]; do
47 $XFS_IO_PROG -f -c "pwrite 0 $((4096*count))" \
48 $ORIGIN/file_$i >>$seqres.full 2>&1
57 mkdir $SCRATCH_MNT/sub_$suffix
59 cp -r $ORIGIN/* $SCRATCH_MNT/sub_$suffix >>$seqres.full 2>&1
60 rm -rf $SCRATCH_MNT/sub_$suffix
71 while [ $loop -lt $threads ]; do
80 echo "Silence is golden"
82 _scratch_mkfs_sized $fs_size >>$seqres.full 2>&1
83 _scratch_mount >>$seqres.full 2>&1