]> git.proxmox.com Git - mirror_qemu.git/commitdiff
migration/postcopy: start_postcopy could be true only when migrate_postcopy() return...
authorWei Yang <richardw.yang@linux.intel.com>
Thu, 18 Jul 2019 08:37:47 +0000 (16:37 +0800)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Wed, 14 Aug 2019 16:33:14 +0000 (17:33 +0100)
There is only one place to set start_postcopy to true,
qmp_migrate_start_postcopy(), which make sure start_postcopy could be
set to true when migrate_postcopy() return true.

So start_postcopy is true implies the other one.

Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
Message-Id: <20190718083747.5859-1-richardw.yang@linux.intel.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
migration/migration.c

index 7c66da3a83c351ee929658ec3d8a773c041efb5a..8331e628315080c1927227095bfbd70576e4872c 100644 (file)
@@ -3103,8 +3103,7 @@ static MigIterateState migration_iteration_run(MigrationState *s)
 
     if (pending_size && pending_size >= s->threshold_size) {
         /* Still a significant amount to transfer */
-        if (migrate_postcopy() && !in_postcopy &&
-            pend_pre <= s->threshold_size &&
+        if (!in_postcopy && pend_pre <= s->threshold_size &&
             atomic_read(&s->start_postcopy)) {
             if (postcopy_start(s)) {
                 error_report("%s: postcopy failed to start", __func__);