mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-08 22:15:21 +00:00
qemu: driver: Report error if pivoting fails in qemuDomainBlockJobAbort
As the error message is now available and we know whether the job failed we can report an error straight away rather than having the user check the event. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
7005779653
commit
4ed4e35772
@ -17231,6 +17231,22 @@ qemuDomainBlockJobAbort(virDomainPtr dom,
|
||||
}
|
||||
qemuBlockJobUpdate(vm, job, QEMU_ASYNC_JOB_NONE);
|
||||
}
|
||||
|
||||
if (pivot &&
|
||||
job->state == QEMU_BLOCKJOB_STATE_FAILED) {
|
||||
if (job->errmsg) {
|
||||
virReportError(VIR_ERR_OPERATION_FAILED,
|
||||
_("block job '%s' failed while pivoting"),
|
||||
job->name);
|
||||
} else {
|
||||
virReportError(VIR_ERR_OPERATION_FAILED,
|
||||
_("block job '%s' failed while pivoting: %s"),
|
||||
job->name, job->errmsg);
|
||||
}
|
||||
|
||||
ret = -1;
|
||||
goto endjob;
|
||||
}
|
||||
}
|
||||
|
||||
endjob:
|
||||
|
Loading…
Reference in New Issue
Block a user