[3/4] migration: pass in_postcopy instead of check state again
diff mbox series

Message ID 20191005220517.24029-4-richardw.yang@linux.intel.com
State New
Headers show
Series
  • migration: trivial cleanup and refine
Related show

Commit Message

Wei Yang Oct. 5, 2019, 10:05 p.m. UTC
Not necessary to do the check again.

Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
---
 migration/migration.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Dr. David Alan Gilbert Oct. 8, 2019, 5:57 p.m. UTC | #1
* Wei Yang (richardw.yang@linux.intel.com) wrote:
> Not necessary to do the check again.
> 
> Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

> ---
>  migration/migration.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/migration/migration.c b/migration/migration.c
> index c8eaa85867..56031305e3 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -3148,8 +3148,7 @@ static MigIterateState migration_iteration_run(MigrationState *s)
>              return MIG_ITERATE_SKIP;
>          }
>          /* Just another iteration step */
> -        qemu_savevm_state_iterate(s->to_dst_file,
> -            s->state == MIGRATION_STATUS_POSTCOPY_ACTIVE);
> +        qemu_savevm_state_iterate(s->to_dst_file, in_postcopy);
>      } else {
>          trace_migration_thread_low_pending(pending_size);
>          migration_completion(s);
> -- 
> 2.17.1
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

Patch
diff mbox series

diff --git a/migration/migration.c b/migration/migration.c
index c8eaa85867..56031305e3 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -3148,8 +3148,7 @@  static MigIterateState migration_iteration_run(MigrationState *s)
             return MIG_ITERATE_SKIP;
         }
         /* Just another iteration step */
-        qemu_savevm_state_iterate(s->to_dst_file,
-            s->state == MIGRATION_STATUS_POSTCOPY_ACTIVE);
+        qemu_savevm_state_iterate(s->to_dst_file, in_postcopy);
     } else {
         trace_migration_thread_low_pending(pending_size);
         migration_completion(s);