2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2015 Fujitsu. All Rights Reserved.
7 # TEST busy loop of write and delete in a filesystem.
8 # Sometimes writes will failed on NO_SPACE when disk almost full
9 # in btrfs. It is long-term problem since very beginning for btrfs
11 # This issue was fixed by the patchset named:
13 # btrfs: Fix no_space on dd and rm loop < from zhaolei@cn.fujitsu.com >
16 seqres=$RESULT_DIR/$seq
17 echo "QA output created by $seq"
21 trap "exit \$status" 0 1 2 3 15
23 # get standard environment, filters and checks
27 # real QA test starts here
33 dev_size=$((1024 * 1024 * 1024)) # 1GB filesystem
34 _scratch_mkfs_sized $dev_size >>$seqres.full 2>&1
37 for ((i = 0; i < 10; i++)); do
38 echo "loop $i" >>$seqres.full
40 $XFS_IO_PROG -f -c "pwrite -b 1m 0 800m" "$SCRATCH_MNT"/file | \
41 _filter_xfs_io | _filter_scratch
43 rm -f "$SCRATCH_MNT"/file