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 #-----------------------------------------------------------------------
28 seqres=$RESULT_DIR/$seq
29 echo "QA output created by $seq"
33 status=1 # failure is the default!
39 trap "_cleanup; exit \$status" 0 1 2 3 15
41 # get standard environment, filters and checks
45 # real QA test starts here
51 min_align=`_min_dio_alignment $SCRATCH_DEV`
55 offset=`expr $1 \* $min_align`
56 end=`expr $2 \* $min_align`
57 length=`expr $end - $offset`
59 $XFS_IO_PROG -d -f $file -c "pwrite $offset $length" >/dev/null
64 _scratch_mkfs_xfs >/dev/null 2>&1
67 # Create a fragmented file
93 # and truncate it again
94 > $SCRATCH_MNT/bigfile