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 >
18 # Import common functions.
21 # real QA test starts here
25 dev_size=$((1024 * 1024 * 1024)) # 1GB filesystem
26 _scratch_mkfs_sized $dev_size >>$seqres.full 2>&1
29 for ((i = 0; i < 10; i++)); do
30 echo "loop $i" >>$seqres.full
32 $XFS_IO_PROG -f -c "pwrite -b 1m 0 800m" "$SCRATCH_MNT"/file | \
33 _filter_xfs_io | _filter_scratch
35 rm -f "$SCRATCH_MNT"/file