diff options
author | Peter Xu <peterx@redhat.com> | 2018-02-08 18:31:15 +0800 |
---|---|---|
committer | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2018-02-14 10:37:09 +0000 |
commit | 3e0c8050ebba3f55dc2d92b3790a3cfb80786d07 (patch) | |
tree | a4f08216d9d5236cfec6d7d3a2071f328004409d /migration/migration.c | |
parent | d6208e35e4a228fb07bac60095c5fac706c3fde7 (diff) |
migration: pass MigrationState to migrate_init()
Let the callers take the object, then pass it to migrate_init().
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20180208103132.28452-12-peterx@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'migration/migration.c')
-rw-r--r-- | migration/migration.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/migration/migration.c b/migration/migration.c index 913f658c3e..0aa596f867 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -1258,10 +1258,8 @@ bool migration_is_idle(void) return false; } -MigrationState *migrate_init(void) +void migrate_init(MigrationState *s) { - MigrationState *s = migrate_get_current(); - /* * Reinitialise all migration state, except * parameters/capabilities that the user set, and @@ -1291,7 +1289,6 @@ MigrationState *migrate_init(void) s->vm_was_running = false; s->iteration_initial_bytes = 0; s->threshold_size = 0; - return s; } static GSList *migration_blockers; @@ -1399,7 +1396,7 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk, migrate_set_block_incremental(s, true); } - s = migrate_init(); + migrate_init(s); if (strstart(uri, "tcp:", &p)) { tcp_start_outgoing_migration(s, p, &local_err); |