* [PATCH] xfs/513: fix 4k allocsize fails on 64k pagesize @ 2020-02-18 16:58 Zorro Lang 2020-02-23 12:45 ` Eryu Guan 0 siblings, 1 reply; 4+ messages in thread From: Zorro Lang @ 2020-02-18 16:58 UTC (permalink / raw) To: fstests 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> --- 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=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" TEST: "-o allocsize=1048576k" "pass" "allocsize=1048576k" "true" TEST: "-o allocsize=2048" "fail" TEST: "-o allocsize=2g" "fail" -- 2.20.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] xfs/513: fix 4k allocsize fails on 64k pagesize 2020-02-18 16:58 [PATCH] xfs/513: fix 4k allocsize fails on 64k pagesize Zorro Lang @ 2020-02-23 12:45 ` Eryu Guan 2020-02-23 16:18 ` Zorro Lang 0 siblings, 1 reply; 4+ messages in thread From: Eryu Guan @ 2020-02-23 12:45 UTC (permalink / raw) To: Zorro Lang; +Cc: fstests 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 > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] xfs/513: fix 4k allocsize fails on 64k pagesize 2020-02-23 12:45 ` Eryu Guan @ 2020-02-23 16:18 ` Zorro Lang 2020-02-24 1:35 ` Eryu Guan 0 siblings, 1 reply; 4+ messages in thread From: Zorro Lang @ 2020-02-23 16:18 UTC (permalink / raw) To: Eryu Guan; +Cc: fstests On Sun, Feb 23, 2020 at 08:45:48PM +0800, Eryu Guan wrote: > 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. I thought about that too, but due to this case only uses PAGESIZE once at here. So I don't know if it's worth changing much code for that. And I don't think the PAGESIZE is necessary for this test, 4k and 64k are all fine for me. The case just trys to make sure 4k/64k can be parsed by fs_parse(). What do you think? Thanks, Zorro > > > 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 > > > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] xfs/513: fix 4k allocsize fails on 64k pagesize 2020-02-23 16:18 ` Zorro Lang @ 2020-02-24 1:35 ` Eryu Guan 0 siblings, 0 replies; 4+ messages in thread From: Eryu Guan @ 2020-02-24 1:35 UTC (permalink / raw) To: zlang; +Cc: fstests On Mon, Feb 24, 2020 at 12:18:19AM +0800, Zorro Lang wrote: > On Sun, Feb 23, 2020 at 08:45:48PM +0800, Eryu Guan wrote: > > 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 From this test description, it seems we're not only testing the arg-parsing part, but also testing if kernel could mount the ending fs. So I thought changing 4k to 64k would lose some test coverage, the normal 4k pagesize case is lost. > > > 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. > > I thought about that too, but due to this case only uses PAGESIZE once > at here. So I don't know if it's worth changing much code for that. > And I don't think the PAGESIZE is necessary for this test, 4k and 64k > are all fine for me. The case just trys to make sure 4k/64k can be parsed by > fs_parse(). If it only wants to make sure fs_parse() could parse the arg, then I'm fine with the fix. Thanks, Eryu > > What do you think? > > Thanks, > Zorro > > > > > > 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 > > > > > > ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-02-24 1:35 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-02-18 16:58 [PATCH] xfs/513: fix 4k allocsize fails on 64k pagesize Zorro Lang 2020-02-23 12:45 ` Eryu Guan 2020-02-23 16:18 ` Zorro Lang 2020-02-24 1:35 ` Eryu Guan
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).