mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 22:25:25 +00:00
qemu: migration: Don't use return value of qemuBlockJobUpdate
Upcoming patch will remove it. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Pavel Mores <pmores@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
496a44a7eb
commit
028cc19c65
@ -510,7 +510,6 @@ qemuMigrationSrcNBDStorageCopyReady(virDomainObjPtr vm,
|
||||
{
|
||||
size_t i;
|
||||
size_t notReady = 0;
|
||||
int status;
|
||||
|
||||
for (i = 0; i < vm->def->ndisks; i++) {
|
||||
virDomainDiskDefPtr disk = vm->def->disks[i];
|
||||
@ -526,8 +525,8 @@ qemuMigrationSrcNBDStorageCopyReady(virDomainObjPtr vm,
|
||||
return -1;
|
||||
}
|
||||
|
||||
status = qemuBlockJobUpdate(vm, job, asyncJob);
|
||||
if (status == VIR_DOMAIN_BLOCK_JOB_FAILED) {
|
||||
qemuBlockJobUpdate(vm, job, asyncJob);
|
||||
if (job->state == VIR_DOMAIN_BLOCK_JOB_FAILED) {
|
||||
qemuMigrationNBDReportMirrorError(job, disk->dst);
|
||||
virObjectUnref(job);
|
||||
return -1;
|
||||
@ -567,7 +566,6 @@ qemuMigrationSrcNBDCopyCancelled(virDomainObjPtr vm,
|
||||
size_t i;
|
||||
size_t active = 0;
|
||||
size_t completed = 0;
|
||||
int status;
|
||||
bool failed = false;
|
||||
|
||||
retry:
|
||||
@ -582,8 +580,8 @@ qemuMigrationSrcNBDCopyCancelled(virDomainObjPtr vm,
|
||||
if (!(job = qemuBlockJobDiskGetJob(disk)))
|
||||
continue;
|
||||
|
||||
status = qemuBlockJobUpdate(vm, job, asyncJob);
|
||||
switch (status) {
|
||||
qemuBlockJobUpdate(vm, job, asyncJob);
|
||||
switch (job->state) {
|
||||
case VIR_DOMAIN_BLOCK_JOB_FAILED:
|
||||
if (check) {
|
||||
qemuMigrationNBDReportMirrorError(job, disk->dst);
|
||||
@ -599,7 +597,7 @@ qemuMigrationSrcNBDCopyCancelled(virDomainObjPtr vm,
|
||||
active++;
|
||||
}
|
||||
|
||||
if (status == VIR_DOMAIN_BLOCK_JOB_COMPLETED)
|
||||
if (job->state == VIR_DOMAIN_BLOCK_JOB_COMPLETED)
|
||||
completed++;
|
||||
|
||||
virObjectUnref(job);
|
||||
@ -650,11 +648,10 @@ qemuMigrationSrcNBDCopyCancelOne(virQEMUDriverPtr driver,
|
||||
qemuDomainAsyncJob asyncJob)
|
||||
{
|
||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||
int status;
|
||||
int rv;
|
||||
|
||||
status = qemuBlockJobUpdate(vm, job, asyncJob);
|
||||
switch (status) {
|
||||
qemuBlockJobUpdate(vm, job, asyncJob);
|
||||
switch (job->state) {
|
||||
case VIR_DOMAIN_BLOCK_JOB_FAILED:
|
||||
case VIR_DOMAIN_BLOCK_JOB_CANCELED:
|
||||
if (failNoJob) {
|
||||
|
Loading…
Reference in New Issue
Block a user