From: Kevin Wolf <kwolf@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: "Daniel P. Berrange" <berrange@redhat.com>,
qemu-devel@nongnu.org, qemu-block@nongnu.org,
Max Reitz <mreitz@redhat.com>,
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Subject: Re: [Qemu-devel] [PATCH v2 (for-2.11)] qcow2: fix image corruption after committing qcow2 image into base
Date: Fri, 17 Nov 2017 15:37:08 +0100 [thread overview]
Message-ID: <20171117143708.GG4795@localhost.localdomain> (raw)
In-Reply-To: <9f180831-1ecd-7326-7659-19f79170439e@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1171 bytes --]
Am 17.11.2017 um 15:32 hat Eric Blake geschrieben:
> On 11/17/2017 05:29 AM, Daniel P. Berrange wrote:
> > After committing the qcow2 image contents into the base image, qemu-img
> > will call bdrv_make_empty to drop the payload in the layered image.
> >
> > When this is done for qcow2 images, it blows away the LUKS encryption
> > header, making the resulting image unusable. There are two codepaths
> > for emptying a qcow2 image, and the second (slower) codepath leaves
> > the LUKS header intact, so force use of that codepath.
> >
> > Reviewed-by: Eric Blake <eblake@redhat.com>
> > Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
> > ---
>
> >
> > if (s->qcow_version >= 3 && !s->snapshots &&
> > - 3 + l1_clusters <= s->refcount_block_size) {
> > + 3 + l1_clusters <= s->refcount_block_size &&
> > + s->crypt_method_header != QCOW_CRYPT_LUKS) {
>
> Missing the check for s->nb_bitmaps == 0 that Vladimir mentioned on v1.
> Either we can add that in this patch, or I can post the obvious followup
> that also needs queuing.
I've already queued this, so please just send a follow-up patch.
Kevin
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
prev parent reply other threads:[~2017-11-17 14:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-17 11:29 [Qemu-devel] [PATCH v2 (for-2.11)] qcow2: fix image corruption after committing qcow2 image into base Daniel P. Berrange
2017-11-17 12:38 ` Kevin Wolf
2017-11-17 14:32 ` Eric Blake
2017-11-17 14:37 ` Daniel P. Berrange
2017-11-17 14:37 ` Kevin Wolf [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=20171117143708.GG4795@localhost.localdomain \
--to=kwolf@redhat.com \
--cc=berrange@redhat.com \
--cc=eblake@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=vsementsov@virtuozzo.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).