From: Stefan Hajnoczi <stefanha@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com,
qemu-stable@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qcow2: make is_allocated return true for zero clusters
Date: Fri, 8 Mar 2013 11:54:50 +0100 [thread overview]
Message-ID: <20130308105450.GC32107@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1362589321-21402-1-git-send-email-pbonzini@redhat.com>
On Wed, Mar 06, 2013 at 06:02:01PM +0100, Paolo Bonzini wrote:
> Otherwise, live migration of the top layer will miss zero clusters and
> let the backing file show through. This also matches what is done in qed.
>
> QCOW2_CLUSTER_ZERO clusters are invalid in v2 image files. Check this
> directly in qcow2_get_cluster_offset instead of replicating the test
> everywhere.
>
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> block/qcow2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
The qcow2 spec says:
Bit 0: If set to 1, the cluster reads as all zeros. The host
cluster offset can be used to describe a preallocation,
but it won't be used for reading data from this cluster,
nor is data read from the backing file if the cluster is
unallocated.
Your patch makes zero clusters "allocated", which does not violate the
preallocation case.
next prev parent reply other threads:[~2013-03-08 10:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-06 17:02 [Qemu-devel] [PATCH] qcow2: make is_allocated return true for zero clusters Paolo Bonzini
2013-03-08 10:54 ` Stefan Hajnoczi [this message]
2013-03-11 14:10 ` Stefan Hajnoczi
2013-03-13 9:14 ` Kevin Wolf
2013-03-13 10:10 ` Paolo Bonzini
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=20130308105450.GC32107@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@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).