All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: fstests@vger.kernel.org
Cc: linux-btrfs@vger.kernel.org
Subject: [PATCH v2 2/9] generic/015 fix to test the default non-mixed mode
Date: Tue, 25 Sep 2018 12:24:15 +0800	[thread overview]
Message-ID: <1537849462-619-3-git-send-email-anand.jain@oracle.com> (raw)
In-Reply-To: <1537849462-619-1-git-send-email-anand.jain@oracle.com>

commit 97575acd7495 (generic/015: Change the test filesystem size to
101mb), created 101mb FS instead of 100mb FS to make sure we create
a FS which is non mixed mode.

btrfs-progs commit 18e2663db3e1 (btrfs-progs: Add minimum device size
check) added a more accurate minimum required space to create the btrfs
FS in non mixed mode depending on the group profile, and considering
any group profiles we would need at least 256MB (with upward round off).

So this patch changes the FS size to be created by _scratch_sized_mkfs()
to 256MB so that we create the FS in non mixed mode for any group
profile.

Mixed blockgroup can be tested using the MKFS_OPTIONS explicitly.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 tests/generic/015 | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/tests/generic/015 b/tests/generic/015
index 0f4d29800f4f..e6c8d7c37c07 100755
--- a/tests/generic/015
+++ b/tests/generic/015
@@ -37,11 +37,9 @@ _supported_os Linux
 _require_scratch
 _require_no_large_scratch_dev
 
-# With filesystems less than 100mb btrfs is created in mixed mode
-# which can lead to slight accounting errors of 1mb. Having the
-# fs be at least 101 mb ensures those errors are within the error
-# tolerance of 1%
-_scratch_mkfs_sized `expr 101 \* 1024 \* 1024` >/dev/null 2>&1 \
+# btrfs needs at least 256MB (with upward round off) to create a non-mixed mode
+# fs. Ref: btrfs-progs: btrfs_min_dev_size()
+_scratch_mkfs_sized $((256 * 1024 * 1024)) >> $seqres.full 2>&1 \
     || _fail "mkfs failed"
 _scratch_mount
 out=$SCRATCH_MNT/fillup.$$
-- 
1.8.3.1

  parent reply	other threads:[~2018-09-25 10:30 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-25  4:24 [PATCH v2 0/9] Fix _scratch_mkfs_sized() for btrfs Anand Jain
2018-09-25  4:24 ` [PATCH v2 1/9] fstests: btrfs: _scratch_mkfs_sized fix min size without mixed option Anand Jain
2018-09-25 10:51   ` Nikolay Borisov
2018-09-26  4:07     ` Anand Jain
2018-09-26  6:34       ` Nikolay Borisov
2018-09-26  6:37         ` Anand Jain
2018-09-27 20:07         ` Omar Sandoval
2018-09-28 13:23           ` Anand Jain
2018-09-25  4:24 ` Anand Jain [this message]
2018-09-25 10:55   ` [PATCH v2 2/9] generic/015 fix to test the default non-mixed mode Nikolay Borisov
2018-09-25  4:24 ` [PATCH v2 3/9] geneirc/077 fix min size for btrfs Anand Jain
2018-10-06 11:25   ` Eryu Guan
2018-10-11  3:14     ` Anand Jain
2018-10-11  3:27       ` Anand Jain
2018-09-25  4:24 ` [PATCH v2 4/9] generic/083 fix btrfs fs size for default mode Anand Jain
2018-09-25  4:24 ` [PATCH v2 5/9] generic/102 open code dev_size _scratch_mkfs_sized() Anand Jain
2018-09-25 10:54   ` Nikolay Borisov
2018-09-26  4:08     ` Anand Jain
2018-10-07 15:18       ` Eryu Guan
2018-09-25  4:24 ` [PATCH v2 6/9] generic/204 open code SIZE for _scratch_mkfs_sized() Anand Jain
2018-09-25  4:24 ` [PATCH v2 7/9] generic/312 open code fs_size _scratch_mkfs_sized() Anand Jain
2018-09-25  4:24 ` [PATCH v2 8/9] generic/449 fix fs size for _scratch_mkfs_sized for btrfs Anand Jain
2018-09-25  4:24 ` [PATCH v2 9/9] generic/387 fix _scratch_mkfs_sized option " Anand Jain
2018-09-25  6:42 ` [PATCH v2 0/9] Fix _scratch_mkfs_sized() " Qu Wenruo

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=1537849462-619-3-git-send-email-anand.jain@oracle.com \
    --to=anand.jain@oracle.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.