4 # Test out prealloc, direct writes and buffered read
5 # Some experimentation when looking at
6 # pv#962014 - DMF 3.7 reading incorrect data
7 # Doesn't actually reproduce the problem but it tried to :-)
9 #-----------------------------------------------------------------------
10 # Copyright (c) 2007 Silicon Graphics, Inc. All Rights Reserved.
11 #-----------------------------------------------------------------------
14 owner=tes@puffy.melbourne.sgi.com
17 echo "QA output created by $seq"
21 status=1 # failure is the default!
22 trap "_cleanup; exit \$status" 0 1 2 3 15
31 # Filter out these lines partially
33 # 40 KiB, 10 ops; 0.0000 sec (4.070 MiB/sec and 1041.9923 ops/sec)
39 tee -a $seq.full | sed 's/ops;.*/ops/'
43 # < 1: [8..79]: 6552..6623 0 (6552..6623) 72
44 # > 1: [8..79]: 202544..202615 0 (202544..202615) 72
50 awk '$3 ~ /hole/ { print $1, $2, $3; next }
54 # get standard environment, filters and checks
58 # real QA test starts here
60 # Modify as appropriate.
62 _supported_os IRIX Linux
65 testfile=$TEST_DIR/file.$seq
72 #xfs_io -f -c "resvsp ${off}k ${end}k" $testfile
74 # write the initial file
75 xfs_io -f -c "pwrite 0 ${end}k" $testfile | _filter_io
79 while [ $off -le $end ]
84 xfs_io -c "unresvsp $offset $length" -c "bmap -vp" $testfile | _filter_bmap
86 off=`expr $off + $len` # skip over 1
87 off=`expr $off + $len`
91 while [ $off -le $end ]
97 echo "*** offset = $offset ***"
101 xfs_io -d -c "resvsp $offset $length" -c "pwrite -b $bufsize $offset $length" $testfile | _filter_io
104 #xfs_io -c "resvsp $offset $length" $testfile
105 #xfs_bmap -v -p $testfile
106 #xfs_io -d -c "pwrite -b $bufsize $offset $length" $testfile
107 #xfs_bmap -v -p $testfile
109 xfs_io -r -c "pread -v -b $bufsize $offset $length" $testfile >$tmp.$off &
112 #xfs_io -r -c "pread -v -b $bufsize $offset $length" $testfile
115 off=`expr $off + $len` # skip over 1
116 off=`expr $off + $len`
120 cat $tmp.* | _filter_io