From: Wang Xiaoguang <wangxg.fnst@cn.fujitsu.com>
To: fstests@vger.kernel.org
Cc: linux-btrfs@vger.kernel.org
Subject: [PATCH] generic: make 17[1-4] work well when btrfs compression is enabled
Date: Fri, 7 Oct 2016 15:00:42 +0800 [thread overview]
Message-ID: <20161007070042.12258-1-wangxg.fnst@cn.fujitsu.com> (raw)
When enabling btrfs compression, original codes can not fill fs
correctly, fix this.
Signed-off-by: Wang Xiaoguang <wangxg.fnst@cn.fujitsu.com>
---
tests/generic/171 | 4 +---
tests/generic/172 | 2 +-
tests/generic/173 | 4 +---
tests/generic/174 | 4 +---
4 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/tests/generic/171 b/tests/generic/171
index f391685..d2ae8e4 100755
--- a/tests/generic/171
+++ b/tests/generic/171
@@ -75,9 +75,7 @@ _cp_reflink $testdir/bigfile $testdir/clonefile
sync
echo "Allocate the rest of the space"
-nr_free=$(stat -f -c '%f' $testdir)
-touch $testdir/file0 $testdir/file1
-_pwrite_byte 0x61 0 $((blksz * nr_free)) $testdir/eat_my_space >> $seqres.full 2>&1
+dd if=/dev/zero of=$testdir/eat_my_space >> $seqres.full 2>&1
sync
echo "CoW the big file"
diff --git a/tests/generic/172 b/tests/generic/172
index 8192290..3bb8687 100755
--- a/tests/generic/172
+++ b/tests/generic/172
@@ -73,7 +73,7 @@ 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
+dd if=/dev/zero of=$testdir/eat_my_space >> $seqres.full 2>&1
sync
echo "CoW the big file"
diff --git a/tests/generic/173 b/tests/generic/173
index c5fac9e..38bc951 100755
--- a/tests/generic/173
+++ b/tests/generic/173
@@ -75,9 +75,7 @@ _cp_reflink $testdir/bigfile $testdir/clonefile
sync
echo "Allocate the rest of the space"
-nr_free=$(stat -f -c '%f' $testdir)
-touch $testdir/file0 $testdir/file1
-_pwrite_byte 0x61 0 $((blksz * nr_free)) $testdir/eat_my_space >> $seqres.full 2>&1
+dd if=/dev/zero of=$testdir/eat_my_space >> $seqres.full 2>&1
sync
echo "mmap CoW the big file"
diff --git a/tests/generic/174 b/tests/generic/174
index 8077d76..a55be38 100755
--- a/tests/generic/174
+++ b/tests/generic/174
@@ -76,9 +76,7 @@ _cp_reflink $testdir/bigfile $testdir/clonefile
sync
echo "Allocate the rest of the space"
-nr_free=$(stat -f -c '%f' $testdir)
-touch $testdir/file0 $testdir/file1
-_pwrite_byte 0x61 0 $((blksz * nr_free)) $testdir/eat_my_space >> $seqres.full 2>&1
+dd if=/dev/zero of=$testdir/eat_my_space >> $seqres.full 2>&1
sync
echo "CoW the big file"
--
2.9.0
next reply other threads:[~2016-10-07 7:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-07 7:00 Wang Xiaoguang [this message]
2016-10-07 14:36 ` [PATCH] generic: make 17[1-4] work well when btrfs compression is enabled Dave Chinner
2016-10-09 21:04 ` Darrick J. Wong
2016-10-10 3:49 ` Wang Xiaoguang
2016-10-10 4:25 ` Darrick J. Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161007070042.12258-1-wangxg.fnst@cn.fujitsu.com \
--to=wangxg.fnst@cn.fujitsu.com \
--cc=fstests@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.