]> xenbits.xensource.com Git - libvirt.git/commitdiff
blockjob: correctly report active commit for job info
authorEric Blake <eblake@redhat.com>
Tue, 5 Aug 2014 14:49:32 +0000 (08:49 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 5 Aug 2014 16:30:56 +0000 (10:30 -0600)
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 <eblake@redhat.com>
src/qemu/qemu_driver.c

index 8eba8e8eb107ec55fbc440199afd1f2d2def8cd9..b0a19027062dfa6ab9b53be2278898463ba9aa4d 100644 (file)
@@ -15099,6 +15099,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;