On Thu, May 13, 2021 at 13:55:22 +0800, ChangLimin wrote:
>On Mon, May 10, 2021 at 13:34:41 +0800, ChangLimin wrote:
>> Hi Peter,
>>
>> Since
https://libvirt.org/git/?p=libvirt.git;a=commitdiff;h=7bfff40fdfe5410c446...,
>> after blockcopy with pivot, a dirty-bitmap is added, but not been removed
automatically.
>> Is that something wrong?
>
>Yeah, it's a bug and it should be removed. I'll have a look.
>
Can this patch fix the bug?
diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c
index faf9a9fb7d..15dabe2c23 100644
--- a/src/qemu/qemu_blockjob.c
+++ b/src/qemu/qemu_blockjob.c
@@ -1338,7 +1338,8 @@ qemuBlockJobProcessEventCompletedCopyBitmaps(virDomainObj *vm,
g_autoptr(virJSONValue) actions = NULL;
bool shallow = job->jobflags & VIR_DOMAIN_BLOCK_COPY_SHALLOW;
- if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV_REOPEN))
+ if (job->disk->src->readonly &&
No. The problem is that the bitmap shouldn't be added in the first
place if we are not invoking code to delete it.
+ !virQEMUCapsGet(priv->qemuCaps,
QEMU_CAPS_BLOCKDEV_REOPEN))
return 0;