render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
9f9eae
From 2151695a5119a8d7f44d416c730df50a1e42695a Mon Sep 17 00:00:00 2001
9f9eae
Message-Id: <2151695a5119a8d7f44d416c730df50a1e42695a.1407860168.git.crobinso@redhat.com>
9f9eae
From: Eric Blake <eblake@redhat.com>
9f9eae
Date: Tue, 5 Aug 2014 08:49:32 -0600
9f9eae
Subject: [PATCH 1/3] blockjob: correctly report active commit for job info
9f9eae
9f9eae
Commit 232a31b munged job info to report 'active commit' instead of
9f9eae
'commit' when generating events, but forgot to also munge the polling
9f9eae
variant of the command.
9f9eae
9f9eae
* src/qemu/qemu_driver.c (qemuDomainBlockJobImpl): Adjust type as
9f9eae
needed.
9f9eae
9f9eae
Signed-off-by: Eric Blake <eblake@redhat.com>
9f9eae
(cherry picked from commit e8cc973041e7ac4ddeefe343af751863c76687fe)
9f9eae
---
9f9eae
 src/qemu/qemu_driver.c | 3 +++
9f9eae
 1 file changed, 3 insertions(+)
9f9eae
9f9eae
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
9f9eae
index a3de784..57cc913 100644
9f9eae
--- a/src/qemu/qemu_driver.c
9f9eae
+++ b/src/qemu/qemu_driver.c
9f9eae
@@ -15103,6 +15103,9 @@ qemuDomainBlockJobImpl(virDomainObjPtr vm,
9f9eae
     ret = qemuMonitorBlockJob(priv->mon, device, basePath, backingPath,
9f9eae
                               bandwidth, info, mode, async);
9f9eae
     qemuDomainObjExitMonitor(driver, vm);
9f9eae
+    if (info && info->type == VIR_DOMAIN_BLOCK_JOB_TYPE_COMMIT &&
9f9eae
+        disk->mirrorJob == VIR_DOMAIN_BLOCK_JOB_TYPE_ACTIVE_COMMIT)
9f9eae
+        info->type = disk->mirrorJob;
9f9eae
     if (ret < 0) {
9f9eae
         if (mode == BLOCK_JOB_ABORT && disk->mirror)
9f9eae
             disk->mirrorState = VIR_DOMAIN_DISK_MIRROR_STATE_NONE;
9f9eae
-- 
9f9eae
1.9.3
9f9eae