From: Max Reitz <mreitz@redhat.com>
To: Anton Nefedov <anton.nefedov@virtuozzo.com>, qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, kwolf@redhat.com, stefanha@redhat.com,
famz@redhat.com, berto@igalia.com, eblake@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 1/2] iotest 033: add misaligned write-zeroes test via truncate
Date: Fri, 23 Feb 2018 14:34:30 +0100 [thread overview]
Message-ID: <a69e1300-dbb2-ee8e-8b47-386bb431907a@redhat.com> (raw)
In-Reply-To: <1518441241-32557-2-git-send-email-anton.nefedov@virtuozzo.com>
[-- Attachment #1: Type: text/plain, Size: 1499 bytes --]
On 2018-02-12 14:14, Anton Nefedov wrote:
> This new test case only makes sense for qcow2 while iotest 033 is generic;
> however it matches the test purpose perfectly and also 033 contains those
> do_test() tricks to pass the alignment, which won't look nice being
> duplicated in other tests or moved to the common code.
>
> Signed-off-by: Anton Nefedov <anton.nefedov@virtuozzo.com>
> ---
> tests/qemu-iotests/033 | 28 ++++++++++++++++++++++++++++
> tests/qemu-iotests/033.out | 13 +++++++++++++
> 2 files changed, 41 insertions(+)
>
> diff --git a/tests/qemu-iotests/033 b/tests/qemu-iotests/033
> index 2cdfd13..5fa3983 100755
> --- a/tests/qemu-iotests/033
> +++ b/tests/qemu-iotests/033
> @@ -64,6 +64,9 @@ do_test()
> } | $QEMU_IO $IO_EXTRA_ARGS
> }
>
> +echo
> +echo "=== Test aligned and misaligned write zeroes operations ==="
> +
> for write_zero_cmd in "write -z" "aio_write -z"; do
> for align in 512 4k; do
> echo
> @@ -102,7 +105,32 @@ for align in 512 4k; do
> done
> done
>
> +
> +# Trigger truncate that would shrink qcow2 L1 table, which is done by
> +# clearing one entry (8 bytes) with bdrv_co_pwrite_zeroes()
> +
> +echo
> +echo "=== Test misaligned write zeroes via truncate ==="
> +echo
> +
> +CLUSTER_SIZE=$((64 * 1024))
> +L2_COVERAGE=$(($CLUSTER_SIZE * $CLUSTER_SIZE / 8))
> +_make_test_img $(($L2_COVERAGE * 2))
There should be a _cleanup_test_img before this or this test will fail
with nbd.
Max
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 512 bytes --]
next prev parent reply other threads:[~2018-02-23 13:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-12 13:13 [Qemu-devel] [PATCH v2 0/2] block: fix write with zero flag set and iovector provided Anton Nefedov
2018-02-12 13:14 ` [Qemu-devel] [PATCH v2 1/2] iotest 033: add misaligned write-zeroes test via truncate Anton Nefedov
2018-02-12 15:54 ` Alberto Garcia
2018-02-12 16:16 ` Anton Nefedov
2018-02-23 13:34 ` Max Reitz [this message]
2018-03-12 22:01 ` Eric Blake
2018-02-12 13:14 ` [Qemu-devel] [PATCH v2 2/2] block: fix write with zero flag set and iovector provided Anton Nefedov
2018-02-12 15:03 ` Alberto Garcia
2018-02-12 16:11 ` Anton Nefedov
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=a69e1300-dbb2-ee8e-8b47-386bb431907a@redhat.com \
--to=mreitz@redhat.com \
--cc=anton.nefedov@virtuozzo.com \
--cc=berto@igalia.com \
--cc=eblake@redhat.com \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@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 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).