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 #-----------------------------------------------------------------------
29 echo "QA output created by $seq"
33 status=1 # failure is the default!
34 trap "_cleanup; exit \$status" 0 1 2 3 15
44 tee -a $seq.full | _filter_xfs_io
48 # < 1: [8..79]: 6552..6623 0 (6552..6623) 72
49 # > 1: [8..79]: 202544..202615 0 (202544..202615) 72
54 awk '$3 ~ /hole/ { print $1, $2, $3; next }
55 {print $1, $2}' >> $seq.full
58 # get standard environment, filters and checks
62 # real QA test starts here
64 # Modify as appropriate.
66 _supported_os IRIX Linux
69 testfile=$TEST_DIR/file.$seq
76 #$XFS_IO_PROG -f -c "resvsp ${off}k ${end}k" $testfile
78 # write the initial file
79 $XFS_IO_PROG -f -c "pwrite 0 ${end}k" $testfile | _filter_io
83 while [ $off -le $end ]
88 $XFS_IO_PROG -c "unresvsp $offset $length" -c "bmap -vp" $testfile | _filter_bmap
90 let off=$off+$len # skip over 1
95 while [ $off -le $end ]
101 echo "*** offset = $offset ***"
105 $XFS_IO_PROG -d -c "resvsp $offset $length" -c "pwrite -b $bufsize $offset $length" $testfile | _filter_io
108 #$XFS_IO_PROG -c "resvsp $offset $length" $testfile
109 #xfs_bmap -v -p $testfile
110 #$XFS_IO_PROG -d -c "pwrite -b $bufsize $offset $length" $testfile
111 #xfs_bmap -v -p $testfile
113 $XFS_IO_PROG -r -c "pread -v -b $bufsize $offset $length" $testfile >$tmp.$off &
116 #$XFS_IO_PROG -r -c "pread -v -b $bufsize $offset $length" $testfile
119 let off=$off+$len # skip over 1
124 cat $tmp.* | _filter_io