Replace use of qemuBlockJobEventProcess with the general helper. A small
tweak is required to pass in the 'type' and 'status' of the job via the
appropriate private data variables.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_driver.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index d0cf2c115a..c582e255a2 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -4716,6 +4716,7 @@ processBlockJobEvent(virQEMUDriverPtr driver,
int status)
{
virDomainDiskDefPtr disk;
+ qemuDomainDiskPrivatePtr diskPriv;
if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0)
return;
@@ -4725,8 +4726,17 @@ processBlockJobEvent(virQEMUDriverPtr driver,
goto endjob;
}
- if ((disk = qemuProcessFindDomainDiskByAliasOrQOM(vm, diskAlias, NULL)))
- qemuBlockJobEventProcess(driver, vm, disk, QEMU_ASYNC_JOB_NONE, type, status);
+ if (!(disk = qemuProcessFindDomainDiskByAliasOrQOM(vm, diskAlias, NULL))) {
+ VIR_DEBUG("disk %s not found", diskAlias);
+ goto endjob;
+ }
+
+ diskPriv = QEMU_DOMAIN_DISK_PRIVATE(disk);
+
+ diskPriv->blockJobType = type;
+ diskPriv->blockJobStatus = status;
+
+ qemuBlockJobUpdate(vm, QEMU_ASYNC_JOB_NONE, disk, NULL);
endjob:
qemuDomainObjEndJob(driver, vm);
--
2.19.2