qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 (for-2.11)] qcow2: fix image corruption after


From: Kevin Wolf
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
User-agent: Mutt/1.9.1 (2017-09-22)

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 <address@hidden>
> > Signed-off-by: Daniel P. Berrange <address@hidden>
> > ---
> 
> >  
> >      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: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]