2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2009 Christoph Hellwig.
7 # Test out the infamous xfs_btree_delrec corruption.
9 # Only happens on 32-bit kernels without CONFIG_LBD, but it should be harmless
10 # to run this everywhere.
13 seqres=$RESULT_DIR/$seq
14 echo "QA output created by $seq"
18 status=1 # failure is the default!
24 trap "_cleanup; exit \$status" 0 1 2 3 15
26 # get standard environment, filters and checks
30 # real QA test starts here
35 min_align=`_min_dio_alignment $SCRATCH_DEV`
39 offset=`expr $1 \* $min_align`
40 end=`expr $2 \* $min_align`
41 length=`expr $end - $offset`
43 $XFS_IO_PROG -d -f $file -c "pwrite $offset $length" >/dev/null
48 _scratch_mkfs_xfs >/dev/null 2>&1
51 # Create a fragmented file
77 # and truncate it again
78 > $SCRATCH_MNT/bigfile