public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] generic/027: enlarge fs size for btrfs in bigger page-size machine
@ 2015-09-11 11:41 xuw2015
  2015-09-11 12:06 ` Filipe David Manana
  2015-09-21  0:19 ` Dave Chinner
  0 siblings, 2 replies; 5+ messages in thread
From: xuw2015 @ 2015-09-11 11:41 UTC (permalink / raw)
  To: fstests; +Cc: George Wang

From: George Wang <xuw2015@gmail.com>

btrfs on bigger page-size machine(such as ppc64/ppc64le), the min fs
size shoule be more than 480MB. Otherwise, the mount will fail.
So we shoud adjust the fs size to 512MB for btrfs to run this test
correctly. And we also provide a double check: if mount fails, we should
never run this test.

Signed-off-by: George Wang <xuw2015@gmail.com>
---
 tests/generic/027 | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/tests/generic/027 b/tests/generic/027
index d2e59d6..c42b9a6 100755
--- a/tests/generic/027
+++ b/tests/generic/027
@@ -65,8 +65,17 @@ _require_scratch
 rm -f $seqres.full
 echo "Silence is golden"
 
-_scratch_mkfs_sized $((256 * 1024 * 1024)) >>$seqres.full 2>&1
-_scratch_mount
+loop=100
+fs_size=$((256 * 1024 * 1024)) 
+# btrfs takes much longer time, reduce the loop count
+# btrfs takes much more space when first mount on bigger page-size machine
+if [ "$FSTYP" == "btrfs" ]; then
+	loop=10
+	fs_size=$((512 * 1024 * 1024))
+fi
+
+_scratch_mkfs_sized $(fs_size) >>$seqres.full 2>&1
+_scratch_mount || _notrun "scratch dev is not mounted successfully"
 
 echo "Reserve 2M space" >>$seqres.full
 $XFS_IO_PROG -f -c "pwrite 0 2m" $SCRATCH_MNT/testfile >>$seqres.full 2>&1
@@ -75,12 +84,6 @@ $XFS_IO_PROG -f -c "pwrite 0 254m" $SCRATCH_MNT/bigfile >>$seqres.full 2>&1
 echo "Remove reserved file" >>$seqres.full
 rm -f $SCRATCH_MNT/testfile
 
-loop=100
-# btrfs takes much longer time, reduce the loop count
-if [ "$FSTYP" == "btrfs" ]; then
-	loop=10
-fi
-
 dir=$SCRATCH_MNT/testdir
 echo -n "iteration" >>$seqres.full
 i=1
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-09-21  0:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-11 11:41 [PATCH] generic/027: enlarge fs size for btrfs in bigger page-size machine xuw2015
2015-09-11 12:06 ` Filipe David Manana
     [not found]   ` <CAPBX1x+GZ0iorNojS90o7eAw4-0Z3LWsLN_8Bz8vscwJ0vEjQQ@mail.gmail.com>
2015-09-14  8:35     ` Filipe David Manana
2015-09-14  9:29       ` George Wang
2015-09-21  0:19 ` Dave Chinner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox