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
46 tee -a $seq.full | _filter_xfs_io
50 # < 1: [8..79]: 6552..6623 0 (6552..6623) 72
51 # > 1: [8..79]: 202544..202615 0 (202544..202615) 72
56 awk '$3 ~ /hole/ { print $1, $2, $3; next }
57 {print $1, $2}' >> $seq.full
60 # get standard environment, filters and checks
64 # real QA test starts here
66 # Modify as appropriate.
68 _supported_os IRIX Linux
71 testfile=$TEST_DIR/file.$seq
78 #$XFS_IO_PROG -f -c "resvsp ${off}k ${end}k" $testfile
80 # write the initial file
81 $XFS_IO_PROG -f -c "pwrite 0 ${end}k" $testfile | _filter_io
85 while [ $off -le $end ]
90 $XFS_IO_PROG -c "unresvsp $offset $length" -c "bmap -vp" $testfile | _filter_bmap
92 let off=$off+$len # skip over 1
97 while [ $off -le $end ]
103 echo "*** offset = $offset ***"
107 $XFS_IO_PROG -d -c "resvsp $offset $length" -c "pwrite -b $bufsize $offset $length" $testfile | _filter_io
110 #$XFS_IO_PROG -c "resvsp $offset $length" $testfile
111 #xfs_bmap -v -p $testfile
112 #$XFS_IO_PROG -d -c "pwrite -b $bufsize $offset $length" $testfile
113 #xfs_bmap -v -p $testfile
115 $XFS_IO_PROG -r -c "pread -v -b $bufsize $offset $length" $testfile >$tmp.$off &
118 #$XFS_IO_PROG -r -c "pread -v -b $bufsize $offset $length" $testfile
121 let off=$off+$len # skip over 1
126 cat $tmp.* | _filter_io