generic: make 17[1-4] work well when btrfs compression is enabled

When enabling btrfs compression, original codes can not fill fs
correctly, here we introduce _fill_fs() in common/rc, which'll keep
creating and writing files until enospc error occurs. Note _fill_fs
is copied from tests/generic/256, but with some minor modifications.

Signed-off-by: Wang Xiaoguang <wangxg.fnst@cn.fujitsu.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
Wang Xiaoguang
2016-11-02 12:07:27 +08:00
committed by Eryu Guan
parent f613638308
commit 815015e9ee
6 changed files with 82 additions and 68 deletions
+3 -2
View File
@@ -38,6 +38,7 @@ _cleanup()
# get standard environment, filters and checks
. ./common/rc
. ./common/populate
. ./common/filter
. ./common/attr
. ./common/reflink
@@ -57,6 +58,7 @@ testdir=$SCRATCH_MNT/test-$seq
mkdir $testdir
echo "Reformat with appropriate size"
blksz="$(get_block_size $testdir)"
umount $SCRATCH_MNT
file_size=$((168 * 1024 * 1024))
@@ -72,8 +74,7 @@ _cp_reflink $testdir/bigfile $testdir/clonefile
sync
echo "Allocate the rest of the space"
touch $testdir/file0 $testdir/file1
_pwrite_byte 0x61 0 $fs_size $testdir/eat_my_space >> $seqres.full 2>&1
_fill_fs $fs_size $testdir/space $blksz 0 >> $seqres.full 2>&1
sync
echo "CoW the big file"