[PATCH 06/10] qemuBlockJobRefreshJobs: Replace qemuMonitorJobCancel by qemuMonitorBlockJobCancel

Peter Krempa pkrempa at redhat.com
Wed Apr 21 14:04:36 UTC 2021


We want to unify on one block job cancellation API. Use
qemuMonitorBlockJobCancel which has more features.

In case of job refresh, we are killing off any unknown jobs so we don't
care about their fate.

Another difference is that an possible error from the block job
cancellation might be reported, but we don't really care here ince
it's a very unlikely scenario and we also report a warning.

Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
 src/qemu/qemu_blockjob.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c
index 9ae4500f4d..faf9a9fb7d 100644
--- a/src/qemu/qemu_blockjob.c
+++ b/src/qemu/qemu_blockjob.c
@@ -526,7 +526,7 @@ qemuBlockJobRefreshJobs(virQEMUDriver *driver,

             qemuDomainObjEnterMonitor(driver, vm);

-            rc = qemuMonitorJobCancel(priv->mon, job->name, true);
+            rc = qemuMonitorBlockJobCancel(priv->mon, job->name, true);
             if (rc == -1 && jobinfo[i]->status == QEMU_MONITOR_JOB_STATUS_CONCLUDED)
                 VIR_WARN("can't cancel job '%s' with invalid data", job->name);

-- 
2.30.2




More information about the libvir-list mailing list