[PATCH 1/3] qemu: migration: Don't use return value of qemuBlockJobUpdate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Upcoming patch will remove it.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_migration.c | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 8a1801d408..bc280e856a 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -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) {
-- 
2.24.1





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux