>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=7bfff40fdfe5410c446c1cd8ec413e00530faf7d, >> 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 && + !virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV_REOPEN)) return 0;