From: Eric Blake <eblake@redhat.com>
To: Max Reitz <mreitz@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 1/2] qcow2-refcount: Snapshot update for zero clusters
Date: Fri, 30 Aug 2013 07:02:52 -0600 [thread overview]
Message-ID: <522097FC.309@redhat.com> (raw)
In-Reply-To: <1377851804-13614-2-git-send-email-mreitz@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1255 bytes --]
On 08/30/2013 02:36 AM, Max Reitz wrote:
> Account for all cluster types in qcow2_update_snapshot_refcounts;
> this prevents this function from updating the refcount of unallocated
> zero clusters which effectively led to wrong adjustments of the refcount
> of cluster 0 (the main qcow2 header). This in turn resulted in images
> with (unallocated) zero clusters having a cluster 0 refcount greater
> than one after creating a snapshot.
>
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
> block/qcow2-refcount.c | 52 +++++++++++++++++++++++++++++++++-----------------
> 1 file changed, 35 insertions(+), 17 deletions(-)
>
> diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c
> index 1244693..a61224a 100644
> --- a/block/qcow2-refcount.c
> +++ b/block/qcow2-refcount.c
> @@ -861,11 +861,14 @@ int qcow2_update_snapshot_refcount(BlockDriverState *bs,
> }
>
> for(j = 0; j < s->l2_size; j++) {
> + uint64_t cluster_index;
As long as you're touching this code, it might be worth s/for(/for (/ in
the line above.
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]
next prev parent reply other threads:[~2013-08-30 13:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-30 8:36 [Qemu-devel] [PATCH v2 0/2] qcow2: Snapshot update for zero clusters Max Reitz
2013-08-30 8:36 ` [Qemu-devel] [PATCH v2 1/2] qcow2-refcount: " Max Reitz
2013-08-30 13:02 ` Eric Blake [this message]
2013-08-30 8:36 ` [Qemu-devel] [PATCH v2 2/2] qemu-iotests: Snapshotting " Max Reitz
2013-08-30 13:07 ` Eric Blake
2013-08-30 13:08 ` Eric Blake
2013-08-30 13:12 ` 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=522097FC.309@redhat.com \
--to=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--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).