All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Hanna Reitz <hreitz@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>, Nir Soffer <nsoffer@redhat.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org,
	qemu-stable@nongnu.org
Subject: Re: [PATCH v2 1/2] block/io: Update BSC only if want_zero is true
Date: Fri, 28 Jan 2022 14:46:13 -0600	[thread overview]
Message-ID: <20220128204613.kij3kyw5vcvgx4qx@redhat.com> (raw)
In-Reply-To: <20220118170000.49423-2-hreitz@redhat.com>

On Tue, Jan 18, 2022 at 05:59:59PM +0100, Hanna Reitz wrote:
> We update the block-status cache whenever we get new information from a
> bdrv_co_block_status() call to the block driver.  However, if we have
> passed want_zero=false to that call, it may flag areas containing zeroes
> as data, and so we would update the block-status cache with wrong
> information.
> 
> Therefore, we should not update the cache with want_zero=false.
> 
> Reported-by: Nir Soffer <nsoffer@redhat.com>
> Fixes: 0bc329fbb00 ("block: block-status cache for data regions")
> Reviewed-by: Nir Soffer <nsoffer@redhat.com>
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
> ---
>  block/io.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



  reply	other threads:[~2022-01-28 20:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-18 16:59 [PATCH v2 0/2] block/io: Update BSC only if want_zero is true Hanna Reitz
2022-01-18 16:59 ` [PATCH v2 1/2] " Hanna Reitz
2022-01-28 20:46   ` Eric Blake [this message]
2022-01-18 17:00 ` [PATCH v2 2/2] iotests/block-status-cache: New test Hanna Reitz
2022-01-18 18:02   ` Nir Soffer
2022-01-28 20:50   ` Eric Blake
2022-01-28 22:55     ` Eric Blake

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=20220128204613.kij3kyw5vcvgx4qx@redhat.com \
    --to=eblake@redhat.com \
    --cc=hreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=nsoffer@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.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 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.