diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2018-01-22 13:20:14 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2018-01-23 10:08:05 +0000 |
commit | ee86981bda9ecd40c8daf81b7307b1d2aff68174 (patch) | |
tree | e4a3a109a9c40705cdc42035aa8db9c64a9e005c /migration/migration.c | |
parent | ee264eb32c14f076c964fc34ee66f6f95cce2080 (diff) |
migration: Revert postcopy-blocktime commit set
This reverts commits
ca6011c migration: add postcopy total blocktime into query-migrate
5f32dc8 migration: add blocktime calculation into migration-test
2f7dae9 migration: postcopy_blocktime documentation
3be98be migration: calculate vCPU blocktime on dst side
01a87f0 migration: add postcopy blocktime ctx into MigrationIncomingState
31bf06a migration: introduce postcopy-blocktime capability
as they don't build on ppc32 due to trying to do atomic accesses
on types that are larger than the host pointer type.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'migration/migration.c')
-rw-r--r-- | migration/migration.c | 51 |
1 files changed, 4 insertions, 47 deletions
diff --git a/migration/migration.c b/migration/migration.c index d3a1c494c0..c99a4e62d7 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -596,15 +596,14 @@ static void populate_disk_info(MigrationInfo *info) } } -static void fill_source_migration_info(MigrationInfo *info) +MigrationInfo *qmp_query_migrate(Error **errp) { + MigrationInfo *info = g_malloc0(sizeof(*info)); MigrationState *s = migrate_get_current(); switch (s->state) { case MIGRATION_STATUS_NONE: /* no migration has happened ever */ - /* do not overwrite destination migration status */ - return; break; case MIGRATION_STATUS_SETUP: info->has_status = true; @@ -655,6 +654,8 @@ static void fill_source_migration_info(MigrationInfo *info) break; } info->status = s->state; + + return info; } /** @@ -718,41 +719,6 @@ static bool migrate_caps_check(bool *cap_list, return true; } -static void fill_destination_migration_info(MigrationInfo *info) -{ - MigrationIncomingState *mis = migration_incoming_get_current(); - - switch (mis->state) { - case MIGRATION_STATUS_NONE: - return; - break; - case MIGRATION_STATUS_SETUP: - case MIGRATION_STATUS_CANCELLING: - case MIGRATION_STATUS_CANCELLED: - case MIGRATION_STATUS_ACTIVE: - case MIGRATION_STATUS_POSTCOPY_ACTIVE: - case MIGRATION_STATUS_FAILED: - case MIGRATION_STATUS_COLO: - info->has_status = true; - break; - case MIGRATION_STATUS_COMPLETED: - info->has_status = true; - fill_destination_postcopy_migration_info(info); - break; - } - info->status = mis->state; -} - -MigrationInfo *qmp_query_migrate(Error **errp) -{ - MigrationInfo *info = g_malloc0(sizeof(*info)); - - fill_destination_migration_info(info); - fill_source_migration_info(info); - - return info; -} - void qmp_migrate_set_capabilities(MigrationCapabilityStatusList *params, Error **errp) { @@ -1541,15 +1507,6 @@ bool migrate_zero_blocks(void) return s->enabled_capabilities[MIGRATION_CAPABILITY_ZERO_BLOCKS]; } -bool migrate_postcopy_blocktime(void) -{ - MigrationState *s; - - s = migrate_get_current(); - - return s->enabled_capabilities[MIGRATION_CAPABILITY_POSTCOPY_BLOCKTIME]; -} - bool migrate_use_compression(void) { MigrationState *s; |