From: Eric Blake Date: Tue, 5 Aug 2014 14:49:32 +0000 (-0600) Subject: blockjob: correctly report active commit for job info X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2151695a5119a8d7f44d416c730df50a1e42695a;p=thirdparty%2Flibvirt.git blockjob: correctly report active commit for job info Commit 232a31b munged job info to report 'active commit' instead of 'commit' when generating events, but forgot to also munge the polling variant of the command. * src/qemu/qemu_driver.c (qemuDomainBlockJobImpl): Adjust type as needed. Signed-off-by: Eric Blake (cherry picked from commit e8cc973041e7ac4ddeefe343af751863c76687fe) --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index a3de7849cd..57cc913274 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -15103,6 +15103,9 @@ qemuDomainBlockJobImpl(virDomainObjPtr vm, ret = qemuMonitorBlockJob(priv->mon, device, basePath, backingPath, bandwidth, info, mode, async); qemuDomainObjExitMonitor(driver, vm); + if (info && info->type == VIR_DOMAIN_BLOCK_JOB_TYPE_COMMIT && + disk->mirrorJob == VIR_DOMAIN_BLOCK_JOB_TYPE_ACTIVE_COMMIT) + info->type = disk->mirrorJob; if (ret < 0) { if (mode == BLOCK_JOB_ABORT && disk->mirror) disk->mirrorState = VIR_DOMAIN_DISK_MIRROR_STATE_NONE;