mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-24 12:22:20 +00:00
qemuBlockJobRefreshJobs: Replace qemuMonitorJobCancel by qemuMonitorBlockJobCancel
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@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
c83d7775cb
commit
5d31f5e7a7
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user