2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2017 Liu Bo. All Rights Reserved.
5 # FS QA Test generic/406
7 # If a larger dio write (size >= 128M) got splitted, the assertion in endio
8 # would complain (CONFIG_BTRFS_ASSERT is required).
11 # Btrfs: adjust outstanding_extents counter properly when dio write is split
14 seqres=$RESULT_DIR/$seq
15 echo "QA output created by $seq"
19 status=1 # failure is the default!
20 trap "_cleanup; exit \$status" 0 1 2 3 15
28 # get standard environment, filters and checks
32 # remove previous $seqres.full before test
35 # real QA test starts here
37 # Modify as appropriate.
42 _scratch_mkfs >> $seqres.full 2>&1
46 blocksize=$(( (128 + 1) * 2 * 1024 * 1024))
47 fsblock=$(( (128 + 1) * 2 * 1024))
48 _require_fs_space $SCRATCH_MNT $fsblock
50 echo "Silence is golden"
52 $XFS_IO_PROG -f -d -c "pwrite -b ${blocksize} 0 ${blocksize}" $SCRATCH_MNT/testfile.$seq >> $seqres.full 2>&1