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.
12 # This program is free software; you can redistribute it and/or
13 # modify it under the terms of the GNU General Public License as
14 # published by the Free Software Foundation.
16 # This program is distributed in the hope that it would be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 # GNU General Public License for more details.
21 # You should have received a copy of the GNU General Public License
22 # along with this program; if not, write the Free Software Foundation,
23 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 #-----------------------------------------------------------------------
28 owner=tes@puffy.melbourne.sgi.com
31 echo "QA output created by $seq"
35 status=1 # failure is the default!
36 trap "_cleanup; exit \$status" 0 1 2 3 15
45 # Filter out these lines partially
47 # 40 KiB, 10 ops; 0.0000 sec (4.070 MiB/sec and 1041.9923 ops/sec)
53 tee -a $seq.full | sed 's/ops;.*/ops/'
57 # < 1: [8..79]: 6552..6623 0 (6552..6623) 72
58 # > 1: [8..79]: 202544..202615 0 (202544..202615) 72
63 awk '$3 ~ /hole/ { print $1, $2, $3; next }
64 {print $1, $2}' >> $seq.full
67 # get standard environment, filters and checks
71 # real QA test starts here
73 # Modify as appropriate.
75 _supported_os IRIX Linux
78 testfile=$TEST_DIR/file.$seq
85 #$XFS_IO_PROG -f -c "resvsp ${off}k ${end}k" $testfile
87 # write the initial file
88 $XFS_IO_PROG -f -c "pwrite 0 ${end}k" $testfile | _filter_io
92 while [ $off -le $end ]
97 $XFS_IO_PROG -c "unresvsp $offset $length" -c "bmap -vp" $testfile | _filter_bmap
99 let off=$off+$len # skip over 1
104 while [ $off -le $end ]
110 echo "*** offset = $offset ***"
114 $XFS_IO_PROG -d -c "resvsp $offset $length" -c "pwrite -b $bufsize $offset $length" $testfile | _filter_io
117 #$XFS_IO_PROG -c "resvsp $offset $length" $testfile
118 #xfs_bmap -v -p $testfile
119 #$XFS_IO_PROG -d -c "pwrite -b $bufsize $offset $length" $testfile
120 #xfs_bmap -v -p $testfile
122 $XFS_IO_PROG -r -c "pread -v -b $bufsize $offset $length" $testfile >$tmp.$off &
125 #$XFS_IO_PROG -r -c "pread -v -b $bufsize $offset $length" $testfile
128 let off=$off+$len # skip over 1
133 cat $tmp.* | _filter_io