qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [Qemu-devel] [PATCH] qcow2: fix image corruption after


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH] qcow2: fix image corruption after committing qcow2 image into base
Date: Fri, 10 Nov 2017 20:06:13 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

10.11.2017 19:34, Eric Blake wrote:
On 11/03/2017 09:41 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) codepaths leaves
the LUKS header intact, so force use of that codepath.

Signed-off-by: Daniel P. Berrange <address@hidden>
---

NB, ideally we would fix the faster codepath in make_completely_empty, but
having looked at the code, I've really no idea how to even start on fixing that
to not kill the LUKS header clusters.
Hmm - I wonder if persistent bitmaps are also corrupted in the fast path.


Oops.
If I understand correct fast path results in absolutely empty image, so bitmaps will be dropped of course. So, s->nb_bitmaps == 0 should be checked too. You can squash it or I can send separate patch. Don't think
that special test is needed for bitmaps in this case.

--
Best regards,
Vladimir




reply via email to

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