From: Eryu Guan <guan@eryu.me>
To: Anju T Sudhakar <anju@linux.vnet.ibm.com>
Cc: fstests@vger.kernel.org, david@fromorbit.com
Subject: Re: [PATCH] generic/031: Modify fcollapse arguments to work on non-4k block sized fs instances
Date: Sun, 29 Nov 2020 18:48:35 +0800 [thread overview]
Message-ID: <20201129104835.GR3853@desktop> (raw)
In-Reply-To: <20201124083733.1795978-1-anju@linux.vnet.ibm.com>
On Tue, Nov 24, 2020 at 02:07:33PM +0530, Anju T Sudhakar wrote:
> This write vs fcollapse test does a sequence of operations to create a
> page which has non-contiguous mix of dirty and clean blocks. But when
> running the test with 64k block size, fallocate returns with EINVAL
> error, as the offset and length parameters for fcollapse are not
> multiples of fs blocksize.
>
> Modify the offset and length arguments for fcollapse in the test, to run
> the test with non-4k block sized fs instances also.
>
> Without the patch:
> -------------------
> # ./check generic/031
> SECTION -- ext4_test
> FSTYP -- ext4
> PLATFORM -- Linux/ppc64le localhost_ubuntu 4.15.0-15-generic
> MKFS_OPTIONS -- -b 65536 /dev/loop5
> MOUNT_OPTIONS -- -o acl,user_xattr /dev/loop5 /mnt2/scratch
>
> QA output created by 031
> +fallocate: Invalid argument
> +fallocate: Invalid argument
> wrote 55756/55756 bytes at offset 185332
> XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
> wrote 63394/63394 bytes at offset 133228
> ...
>
> (Note: Same failure observed for xfs also)
>
> With the patch:
> -----------------
> v# ./check generic/031
> SECTION -- ext4_test
> FSTYP -- ext4
> PLATFORM -- Linux/ppc64le localhost_ubuntu 4.15.0-15-generic #
> MKFS_OPTIONS -- -b 65536 /dev/loop5
> MOUNT_OPTIONS -- -o acl,user_xattr /dev/loop5 /mnt2/scratch
>
> generic/031 2s ... 2s
> Ran: generic/031
> Passed all 1 tests
>
> SECTION -- ext4_test
> =========================
> Ran: generic/031
> Passed all 1 tests
>
> Signed-off-by: Anju T Sudhakar <anju@linux.vnet.ibm.com>
> ---
> tests/generic/031 | 6 +++---
> tests/generic/031.out | 14 +++++++-------
> 2 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/tests/generic/031 b/tests/generic/031
> index db84031b..2b253c3c 100755
> --- a/tests/generic/031
> +++ b/tests/generic/031
> @@ -41,9 +41,9 @@ _scratch_mount
>
> $XFS_IO_PROG -f \
> -c "pwrite 185332 55756" \
> - -c "fcollapse 28672 40960" \
> - -c "pwrite 133228 63394" \
> - -c "fcollapse 0 4096" \
> + -c "fcollapse 65536 65536" \
> + -c "pwrite 67692 63394" \
> + -c "fcollapse 0 65536" \
I'm wondering if the original bug still reproduce after this change? The
test is aimed to execrise partial page writeback in fs blocksize <
pagesize case, so the offsets and lens may be the key to reproduce the
original bug.
Thanks,
Eryu
> $testfile | _filter_xfs_io
>
> echo "==== Pre-Remount ==="
> diff --git a/tests/generic/031.out b/tests/generic/031.out
> index 194bfa45..b096694f 100644
> --- a/tests/generic/031.out
> +++ b/tests/generic/031.out
> @@ -1,19 +1,19 @@
> QA output created by 031
> wrote 55756/55756 bytes at offset 185332
> XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
> -wrote 63394/63394 bytes at offset 133228
> +wrote 63394/63394 bytes at offset 67692
> XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
> ==== Pre-Remount ===
> 00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
> *
> -0001f860 00 00 00 00 00 00 00 00 00 00 00 00 cd cd cd cd |................|
> -0001f870 cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd |................|
> +00000860 00 00 00 00 00 00 00 00 00 00 00 00 cd cd cd cd |................|
> +00000870 cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd |................|
> *
> -0002fdc0
> +0001adc0
> ==== Post-Remount ==
> 00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
> *
> -0001f860 00 00 00 00 00 00 00 00 00 00 00 00 cd cd cd cd |................|
> -0001f870 cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd |................|
> +00000860 00 00 00 00 00 00 00 00 00 00 00 00 cd cd cd cd |................|
> +00000870 cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd |................|
> *
> -0002fdc0
> +0001adc0
> --
> 2.15.1
prev parent reply other threads:[~2020-11-29 10:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-24 8:37 [PATCH] generic/031: Modify fcollapse arguments to work on non-4k block sized fs instances Anju T Sudhakar
2020-11-29 10:48 ` Eryu Guan [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=20201129104835.GR3853@desktop \
--to=guan@eryu.me \
--cc=anju@linux.vnet.ibm.com \
--cc=david@fromorbit.com \
--cc=fstests@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox