4 # Test out the infamous xfs_btree_delrec corruption.
6 # Only happens on 32-bit kernels without CONFIG_LBD, but it should be harmless
7 # to run this everywhere.
9 #-----------------------------------------------------------------------
10 # Copyright (c) 2009 Christoph Hellwig.
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
24 #-----------------------------------------------------------------------
30 echo "QA output created by $seq"
34 status=1 # failure is the default!
38 offset=`expr $1 \* 512`
40 length=`expr $end - $offset`
42 xfs_io -d -f $file -c "pwrite $offset $length" >/dev/null
51 trap "_cleanup; exit \$status" 0 1 2 3 15
53 # get standard environment, filters and checks
57 # real QA test starts here
65 _scratch_mkfs_xfs >/dev/null 2>&1
68 # Create a fragmented file
94 # and truncate it again
95 > $SCRATCH_MNT/bigfile