[libvirt] [PATCH] 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 <eblake@redhat.com> --- src/qemu/qemu_driver.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index a3de784..57cc913 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; -- 1.9.3

On 05/08/14 08:51 -0600, Eric Blake wrote:
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> Reviewed-by: Adam Litke <alitke@redhat.com>
--- src/qemu/qemu_driver.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index a3de784..57cc913 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; -- 1.9.3
-- Adam Litke

On 08/05/2014 08:57 AM, Adam Litke wrote:
On 05/08/14 08:51 -0600, Eric Blake wrote:
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> Reviewed-by: Adam Litke <alitke@redhat.com>
Pushed, and I'll backport to v1.2.7-maint. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (2)
-
Adam Litke
-
Eric Blake