Now that we reprobe the status of blockjobs when reconnecting in addition to handling job status events, the status reprobing can be removed as we always track the correct status internally. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/qemu/qemu_driver.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index d06eabb265..0598f6e5c7 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -17090,9 +17090,8 @@ qemuDomainBlockPivot(virQEMUDriverPtr driver, const char *device, virDomainDiskDefPtr disk) { - int ret = -1, rc; + int ret = -1; qemuDomainObjPrivatePtr priv = vm->privateData; - qemuMonitorBlockJobInfo info; virStorageSourcePtr oldsrc = NULL; virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver); @@ -17103,23 +17102,6 @@ qemuDomainBlockPivot(virQEMUDriverPtr driver, goto cleanup; } - /* Probe the status, if needed. */ - if (!disk->mirrorState) { - qemuDomainObjEnterMonitor(driver, vm); - rc = qemuMonitorGetBlockJobInfo(priv->mon, disk->info.alias, &info); - if (qemuDomainObjExitMonitor(driver, vm) < 0) - goto cleanup; - if (rc < 0) - goto cleanup; - if (rc == 1 && - (info.ready == 1 || - (info.ready == -1 && - info.end == info.cur && - (info.type == VIR_DOMAIN_BLOCK_JOB_TYPE_COPY || - info.type == VIR_DOMAIN_BLOCK_JOB_TYPE_COMMIT)))) - disk->mirrorState = VIR_DOMAIN_DISK_MIRROR_STATE_READY; - } - if (disk->mirrorState != VIR_DOMAIN_DISK_MIRROR_STATE_READY) { virReportError(VIR_ERR_BLOCK_COPY_ACTIVE, _("disk '%s' not ready for pivot yet"), -- 2.19.2 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list