diff options
author | Lu Fengqi <lufq.fnst@cn.fujitsu.com> | 2018-03-08 16:30:53 +0800 |
---|---|---|
committer | Eryu Guan <guaneryu@gmail.com> | 2018-03-08 17:55:08 +0800 |
commit | 640e4f6d7ae3ac930ff2f569098c43dfb6d3b532 (patch) | |
tree | 4dd246952aa55f647656b5f7da85227c33113f9b | |
parent | 34369fb21cc24ce8b81d5b529b21869014391bf0 (diff) | |
download | xfstests-dev-640e4f6d7ae3ac930ff2f569098c43dfb6d3b532.tar.gz |
btrfs/146: make sure hit all stripes in the case of compression
In the case of compression, each 128K input data chunk will be
compressed to 4K (because of the characters written are duplicate).
Therefore we have to write (128K * 16) to make sure every stripe can be
hit.
Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
-rwxr-xr-x | tests/btrfs/146 | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/btrfs/146 b/tests/btrfs/146 index 7071c128ca..4d6c5be51a 100755 --- a/tests/btrfs/146 +++ b/tests/btrfs/146 @@ -73,10 +73,13 @@ echo "Format and mount" _scratch_pool_mkfs "-d raid0 -m raid1" > $seqres.full 2>&1 _scratch_mount -# How much do we need to write? We need to hit all of the stripes. btrfs uses -# a fixed 64k stripesize, so write enough to hit each one +# How much do we need to write? We need to hit all of the stripes. btrfs uses a +# fixed 64k stripesize, so write enough to hit each one. In the case of +# compression, each 128K input data chunk will be compressed to 4K (because of +# the characters written are duplicate). Therefore we have to write +# (128K * 16) = 2048K to make sure every stripe can be hit. number_of_devices=`echo $SCRATCH_DEV_POOL | wc -w` -write_kb=$(($number_of_devices * 64)) +write_kb=$(($number_of_devices * 2048)) _require_fs_space $SCRATCH_MNT $write_kb testfile=$SCRATCH_MNT/fsync-err-test |