4 # TEST busy loop of write and delete in a filesystem.
5 # Sometimes writes will failed on NO_SPACE when disk almost full
6 # in btrfs. It is long-term problem since very beginning for btrfs
8 # This issue was fixed by the patchset named:
10 # btrfs: Fix no_space on dd and rm loop < from zhaolei@cn.fujitsu.com >
12 #-----------------------------------------------------------------------
13 # Copyright (c) 2015 Fujitsu. All Rights Reserved.
14 # Author: Wang Yanfeng <wangyf-fnst@cn.fujitsu.com>
16 # This program is free software; you can redistribute it and/or
17 # modify it under the terms of the GNU General Public License as
18 # published by the Free Software Foundation.
20 # This program is distributed in the hope that it would be useful,
21 # but WITHOUT ANY WARRANTY; without even the implied warranty of
22 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 # GNU General Public License for more details.
25 # You should have received a copy of the GNU General Public License
26 # along with this program; if not, write the Free Software Foundation,
27 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 #-----------------------------------------------------------------------
32 seqres=$RESULT_DIR/$seq
33 echo "QA output created by $seq"
37 trap "exit \$status" 0 1 2 3 15
39 # get standard environment, filters and checks
43 # real QA test starts here
50 dev_size=$((512 * 1024 * 1024)) # 512MB filesystem
51 _scratch_mkfs_sized $dev_size >>$seqres.full 2>&1
54 for ((i = 0; i < 10; i++)); do
55 echo "loop $i" >>$seqres.full
57 $XFS_IO_PROG -f -c "pwrite -b 1m 0 400m" "$SCRATCH_MNT"/file | \
58 _filter_xfs_io | _filter_scratch
60 rm -f "$SCRATCH_MNT"/file