Not used anymore after moving block migration to use capabilities. Signed-off-by: Juan Quintela <quint...@redhat.com> --- include/migration/migration.h | 10 +++------- include/migration/vmstate.h | 1 - include/qemu/typedefs.h | 1 - include/sysemu/sysemu.h | 3 +-- migration/colo.c | 2 +- migration/migration.c | 8 +++----- migration/savevm.c | 16 +++------------- 7 files changed, 11 insertions(+), 30 deletions(-)
diff --git a/include/migration/migration.h b/include/migration/migration.h index 09d3188..3353de1 100644 --- a/include/migration/migration.h +++ b/include/migration/migration.h @@ -40,9 +40,6 @@ /* for vl.c */ extern int only_migratable; -struct MigrationParams { -}; - /* Messages sent on the return path from destination to source */ enum mig_rp_message_type { MIG_RP_MSG_INVALID = 0, /* Must be 0 */ @@ -132,12 +129,10 @@ struct MigrationState QEMUBH *cleanup_bh; QEMUFile *to_dst_file; - /* New style params from 'migrate-set-parameters' */ + /* params from 'migrate-set-parameters' */ MigrationParameters parameters; int state; - /* Old style params from 'migrate' command */ - MigrationParams params; /* State related to return path */ struct { @@ -191,7 +186,8 @@ void migrate_fd_error(MigrationState *s, const Error *error); void migrate_fd_connect(MigrationState *s); -MigrationState *migrate_init(const MigrationParams *params); +MigrationState *migrate_init(void); + bool migration_is_blocked(Error **errp); /* True if outgoing migration has entered postcopy phase */ bool migration_in_postcopy(void); diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index 624aa0d..f4c5bed 100644 --- a/include/migration/vmstate.h +++ b/include/migration/vmstate.h @@ -37,7 +37,6 @@ typedef int LoadStateHandler(QEMUFile *f, void *opaque, int version_id); typedef struct SaveVMHandlers { /* This runs inside the iothread lock. */ - void (*set_params)(const MigrationParams *params, void * opaque); SaveStateHandler *save_state; void (*cleanup)(void *opaque); diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index e95f28c..7e6021c 100644 --- a/include/qemu/typedefs.h +++ b/include/qemu/typedefs.h @@ -48,7 +48,6 @@ typedef struct MemoryRegion MemoryRegion; typedef struct MemoryRegionCache MemoryRegionCache; typedef struct MemoryRegionSection MemoryRegionSection; typedef struct MigrationIncomingState MigrationIncomingState; -typedef struct MigrationParams MigrationParams; typedef struct MigrationState MigrationState; typedef struct Monitor Monitor; typedef struct MonitorDef MonitorDef; diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h index 16175f7..5f2f21d 100644 --- a/include/sysemu/sysemu.h +++ b/include/sysemu/sysemu.h @@ -105,8 +105,7 @@ enum qemu_vm_cmd { #define MAX_VM_CMD_PACKAGED_SIZE (1ul << 24) bool qemu_savevm_state_blocked(Error **errp); -void qemu_savevm_state_begin(QEMUFile *f, - const MigrationParams *params); +void qemu_savevm_state_begin(QEMUFile *f); void qemu_savevm_state_header(QEMUFile *f); int qemu_savevm_state_iterate(QEMUFile *f, bool postcopy); void qemu_savevm_state_cleanup(void); diff --git a/migration/colo.c b/migration/colo.c index 4c2365e..2924602 100644 --- a/migration/colo.c +++ b/migration/colo.c @@ -334,7 +334,7 @@ static int colo_do_checkpoint_transaction(MigrationState *s, } qemu_savevm_state_header(fb); - qemu_savevm_state_begin(fb, &s->params); + qemu_savevm_state_begin(fb); qemu_mutex_lock_iothread(); qemu_savevm_state_complete_precopy(fb, false); qemu_mutex_unlock_iothread(); diff --git a/migration/migration.c b/migration/migration.c index 39b4a41..9ab66b6 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -1058,7 +1058,7 @@ bool migration_is_idle(void) return false; } -MigrationState *migrate_init(const MigrationParams *params) +MigrationState *migrate_init(void) { MigrationState *s = migrate_get_current(); @@ -1072,7 +1072,6 @@ MigrationState *migrate_init(const MigrationParams *params) s->cleanup_bh = 0; s->to_dst_file = NULL; s->state = MIGRATION_STATUS_NONE; - s->params = *params; s->rp_state.from_dst_file = NULL; s->rp_state.error = false; s->mbps = 0.0; @@ -1171,7 +1170,6 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk, { Error *local_err = NULL; MigrationState *s = migrate_get_current(); - MigrationParams params; const char *p; if (migration_is_setup_or_active(s->state) || @@ -1189,7 +1187,7 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk, return; } - s = migrate_init(¶ms); + s = migrate_init(); if (has_blk && blk) { migrate_set_block_enabled(s); @@ -1917,7 +1915,7 @@ static void *migration_thread(void *opaque) qemu_savevm_send_postcopy_advise(s->to_dst_file); } - qemu_savevm_state_begin(s->to_dst_file, &s->params); + qemu_savevm_state_begin(s->to_dst_file); s->setup_time = qemu_clock_get_ms(QEMU_CLOCK_HOST) - setup_start; current_active_state = MIGRATION_STATUS_ACTIVE; diff --git a/migration/savevm.c b/migration/savevm.c index c4435e1..96cf6db 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -970,21 +970,13 @@ void qemu_savevm_state_header(QEMUFile *f) } -void qemu_savevm_state_begin(QEMUFile *f, - const MigrationParams *params) +void qemu_savevm_state_begin(QEMUFile *f) { SaveStateEntry *se; int ret; trace_savevm_state_begin(); QTAILQ_FOREACH(se, &savevm_state.handlers, entry) { - if (!se->ops || !se->ops->set_params) { - continue; - } - se->ops->set_params(params, se->opaque); - } - - QTAILQ_FOREACH(se, &savevm_state.handlers, entry) { if (!se->ops || !se->ops->save_live_setup) { continue; } @@ -1236,9 +1228,7 @@ void qemu_savevm_state_cleanup(void) static int qemu_savevm_state(QEMUFile *f, Error **errp) { int ret; - MigrationParams params = { - }; - MigrationState *ms = migrate_init(¶ms); + MigrationState *ms = migrate_init(); MigrationStatus status; ms->to_dst_file = f; @@ -1249,7 +1239,7 @@ static int qemu_savevm_state(QEMUFile *f, Error **errp) qemu_mutex_unlock_iothread(); qemu_savevm_state_header(f); - qemu_savevm_state_begin(f, ¶ms); + qemu_savevm_state_begin(f); qemu_mutex_lock_iothread(); while (qemu_file_get_error(f) == 0) { -- 2.9.3