qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
To: qemu-block@nongnu.org, qemu-stable@nongnu.org
Cc: qemu-devel@nongnu.org, kwolf@redhat.com, hreitz@redhat.com,
	vsementsov@yandex-team.ru, eblake@redhat.com, den@virtuozzo.com
Subject: Re: [PATCH 0/3] block: align CoR requests to subclusters
Date: Fri, 7 Jul 2023 14:33:02 +0300	[thread overview]
Message-ID: <a55a6ee2-0229-cf83-013b-d9bb5fb855ba@virtuozzo.com> (raw)
In-Reply-To: <20230626160834.696680-1-andrey.drobyshev@virtuozzo.com>

On 6/26/23 19:08, Andrey Drobyshev wrote:
> This series makes IO requests performed with copy-on-read to be aligned
> to subclusters rather than clusters.  It also affects mirror job requests
> alignment.
> 
> The initial reason for that change is the following crash discovered:
> 
> qemu-img create -f qcow2 base.qcow2 64K
> qemu-img create -f qcow2 -o extended_l2=on,backing_file=base.qcow2,backing_fmt=qcow2 img.qcow2 64K
> qemu-io -c "write -P 0xaa 0 2K" img.qcow2
> qemu-io -C -c "read -P 0x00 2K 62K" img.qcow2
> 
> qemu-io: ../block/io.c:1236: bdrv_co_do_copy_on_readv: Assertion `skip_bytes < pnum' failed.
> 
> This change in alignment fixes the crash and adds test case covering it.
> 
> Andrey Drobyshev (3):
>   block: add subcluster_size field to BlockDriverInfo
>   block/io: align requests to subcluster_size
>   tests/qemu-iotests/197: add testcase for CoR with subclusters
> 
>  block.c                      |  6 +++++
>  block/io.c                   | 50 ++++++++++++++++++------------------
>  block/mirror.c               |  8 +++---
>  block/qcow2.c                |  1 +
>  include/block/block-common.h |  4 +++
>  include/block/block-io.h     |  2 +-
>  tests/qemu-iotests/197       | 29 +++++++++++++++++++++
>  tests/qemu-iotests/197.out   | 24 +++++++++++++++++
>  8 files changed, 94 insertions(+), 30 deletions(-)
> 

Ping


      parent reply	other threads:[~2023-07-07 11:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-26 16:08 [PATCH 0/3] block: align CoR requests to subclusters Andrey Drobyshev via
2023-06-26 16:08 ` [PATCH 1/3] block: add subcluster_size field to BlockDriverInfo Andrey Drobyshev via
2023-07-10 19:44   ` Eric Blake
2023-07-11 16:57   ` Denis V. Lunev
2023-06-26 16:08 ` [PATCH 2/3] block/io: align requests to subcluster_size Andrey Drobyshev via
2023-07-10 19:47   ` Eric Blake
2023-07-11 17:46     ` Andrey Drobyshev
2023-07-11 17:05   ` Denis V. Lunev
2023-06-26 16:08 ` [PATCH 3/3] tests/qemu-iotests/197: add testcase for CoR with subclusters Andrey Drobyshev via
2023-07-10 19:50   ` Eric Blake
2023-07-11 17:05   ` Denis V. Lunev
2023-07-07 11:33 ` Andrey Drobyshev [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=a55a6ee2-0229-cf83-013b-d9bb5fb855ba@virtuozzo.com \
    --to=andrey.drobyshev@virtuozzo.com \
    --cc=den@virtuozzo.com \
    --cc=eblake@redhat.com \
    --cc=hreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=vsementsov@yandex-team.ru \
    /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).