public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: xuw2015@gmail.com
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH] generic/027: enlarge fs size for btrfs in bigger page-size machine
Date: Mon, 21 Sep 2015 10:19:20 +1000	[thread overview]
Message-ID: <20150921001920.GI26895@dastard> (raw)
In-Reply-To: <1441971691-26427-1-git-send-email-xuw2015@gmail.com>

On Fri, Sep 11, 2015 at 07:41:31PM +0800, xuw2015@gmail.com wrote:
> 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

No. Please don't sprinkle fs magic numbers like this through tests.
This is the second "btrfs breaks with small filesystems on 64k page
size machines so change the test" patch in recent times.

If btrfs has some special behaviour that it needs to support here
(e.g. minimum fs size because of machine page size) then please
modify the minimum size inside _scratch_mkfs_sized() via a callout
to a new _mkfs_btrfs_sized() function.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

      parent reply	other threads:[~2015-09-21  0:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=20150921001920.GI26895@dastard \
    --to=david@fromorbit.com \
    --cc=fstests@vger.kernel.org \
    --cc=xuw2015@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox