All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eryu Guan <guaneryu@gmail.com>
To: Zorro Lang <zlang@redhat.com>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH] xfs/513: fix 4k allocsize fails on 64k pagesize
Date: Sun, 23 Feb 2020 20:45:48 +0800	[thread overview]
Message-ID: <20200223124545.GB3840@desktop> (raw)
In-Reply-To: <20200218165818.21066-1-zlang@redhat.com>

On Wed, Feb 19, 2020 at 12:58:18AM +0800, Zorro Lang wrote:
> The minimal I/O preallocation size is page size. The allocsize=4k
> always fails on 64k pagesize machine. So change the fs blocksize
> allocsize test to allocsize=64k.
> 
> Signed-off-by: Zorro Lang <zlang@redhat.com>

I think it's better to make the page size auto-detected, and filter out
the actual size to something like "PAGESIZE" in .out file.

> ---
>  tests/xfs/513     | 4 ++--
>  tests/xfs/513.out | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/xfs/513 b/tests/xfs/513
> index 70bc2f1c..3c3f5163 100755
> --- a/tests/xfs/513
> +++ b/tests/xfs/513
> @@ -178,13 +178,13 @@ do_test()
>  
>  echo "** start xfs mount testing ..."
>  # Test allocsize=size
> -# Valid values for this option are page size (typically 4KiB) through to 1GiB
> +# Valid values for this option are page size through to 1GiB
>  do_mkfs
>  if [ $dbsize -ge 1024 ];then
>  	blsize="$((dbsize / 1024))k"
>  fi
>  do_test "" pass "allocsize" "false"
> -do_test "-o allocsize=$blsize" pass "allocsize=$blsize" "true"
> +do_test "-o allocsize=64k" pass "allocsize=64k" "true"

do_test "-o allocsize=PAGESIZE" pass "allocsize=PAGESIZE" "true"

And do_test converts the "PAGESIZE" to actual page size.

>  do_test "-o allocsize=1048576k" pass "allocsize=1048576k" "true"
>  do_test "-o allocsize=$((dbsize / 2))" fail
>  do_test "-o allocsize=2g" fail
> diff --git a/tests/xfs/513.out b/tests/xfs/513.out
> index 9be18dd8..2d9f8384 100644
> --- a/tests/xfs/513.out
> +++ b/tests/xfs/513.out
> @@ -5,7 +5,7 @@ QA output created by 513
>  ** start xfs mount testing ...
>  FORMAT: 
>  TEST: "" "pass" "allocsize" "false"
> -TEST: "-o allocsize=4k" "pass" "allocsize=4k" "true"
> +TEST: "-o allocsize=64k" "pass" "allocsize=64k" "true"

So .out prints "... allocsize=PAGESIZE" ...

Thanks,
Eryu

>  TEST: "-o allocsize=1048576k" "pass" "allocsize=1048576k" "true"
>  TEST: "-o allocsize=2048" "fail"
>  TEST: "-o allocsize=2g" "fail"
> -- 
> 2.20.1
> 

  reply	other threads:[~2020-02-23 12:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-18 16:58 [PATCH] xfs/513: fix 4k allocsize fails on 64k pagesize Zorro Lang
2020-02-23 12:45 ` Eryu Guan [this message]
2020-02-23 16:18   ` Zorro Lang
2020-02-24  1:35     ` Eryu Guan

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=20200223124545.GB3840@desktop \
    --to=guaneryu@gmail.com \
    --cc=fstests@vger.kernel.org \
    --cc=zlang@redhat.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 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.