mirror of https://github.com/xemu-project/xemu.git
migration: Rename save_live_setup() to save_setup()
We are going to use it now for more than save live regions. Once there rename qemu_savevm_state_begin() to qemu_savevm_state_setup(). Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20170628095228.4661-2-quintela@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
parent
c8d3ff384f
commit
9907e842d7
|
@ -1953,7 +1953,7 @@ static void htab_cleanup(void *opaque)
|
|||
}
|
||||
|
||||
static SaveVMHandlers savevm_htab_handlers = {
|
||||
.save_live_setup = htab_save_setup,
|
||||
.save_setup = htab_save_setup,
|
||||
.save_live_iterate = htab_save_iterate,
|
||||
.save_live_complete_precopy = htab_save_complete,
|
||||
.cleanup = htab_cleanup,
|
||||
|
|
|
@ -33,7 +33,7 @@ typedef struct SaveVMHandlers {
|
|||
int (*save_live_iterate)(QEMUFile *f, void *opaque);
|
||||
|
||||
/* This runs outside the iothread lock! */
|
||||
int (*save_live_setup)(QEMUFile *f, void *opaque);
|
||||
int (*save_setup)(QEMUFile *f, void *opaque);
|
||||
void (*save_live_pending)(QEMUFile *f, void *opaque,
|
||||
uint64_t threshold_size,
|
||||
uint64_t *non_postcopiable_pending,
|
||||
|
|
|
@ -1008,7 +1008,7 @@ static bool block_is_active(void *opaque)
|
|||
}
|
||||
|
||||
static SaveVMHandlers savevm_block_handlers = {
|
||||
.save_live_setup = block_save_setup,
|
||||
.save_setup = block_save_setup,
|
||||
.save_live_iterate = block_save_iterate,
|
||||
.save_live_complete_precopy = block_save_complete,
|
||||
.save_live_pending = block_save_pending,
|
||||
|
|
|
@ -350,7 +350,7 @@ static int colo_do_checkpoint_transaction(MigrationState *s,
|
|||
/* Disable block migration */
|
||||
migrate_set_block_enabled(false, &local_err);
|
||||
qemu_savevm_state_header(fb);
|
||||
qemu_savevm_state_begin(fb);
|
||||
qemu_savevm_state_setup(fb);
|
||||
qemu_mutex_lock_iothread();
|
||||
qemu_savevm_state_complete_precopy(fb, false, false);
|
||||
qemu_mutex_unlock_iothread();
|
||||
|
|
|
@ -1835,7 +1835,7 @@ static void *migration_thread(void *opaque)
|
|||
qemu_savevm_send_postcopy_advise(s->to_dst_file);
|
||||
}
|
||||
|
||||
qemu_savevm_state_begin(s->to_dst_file);
|
||||
qemu_savevm_state_setup(s->to_dst_file);
|
||||
|
||||
s->setup_time = qemu_clock_get_ms(QEMU_CLOCK_HOST) - setup_start;
|
||||
migrate_set_state(&s->state, MIGRATION_STATUS_SETUP,
|
||||
|
|
|
@ -2623,7 +2623,7 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id)
|
|||
}
|
||||
|
||||
static SaveVMHandlers savevm_ram_handlers = {
|
||||
.save_live_setup = ram_save_setup,
|
||||
.save_setup = ram_save_setup,
|
||||
.save_live_iterate = ram_save_iterate,
|
||||
.save_live_complete_postcopy = ram_save_complete,
|
||||
.save_live_complete_precopy = ram_save_complete,
|
||||
|
|
|
@ -596,7 +596,7 @@ int register_savevm_live(DeviceState *dev,
|
|||
se->opaque = opaque;
|
||||
se->vmsd = NULL;
|
||||
/* if this is a live_savem then set is_ram */
|
||||
if (ops->save_live_setup != NULL) {
|
||||
if (ops->save_setup != NULL) {
|
||||
se->is_ram = 1;
|
||||
}
|
||||
|
||||
|
@ -955,14 +955,14 @@ void qemu_savevm_state_header(QEMUFile *f)
|
|||
}
|
||||
}
|
||||
|
||||
void qemu_savevm_state_begin(QEMUFile *f)
|
||||
void qemu_savevm_state_setup(QEMUFile *f)
|
||||
{
|
||||
SaveStateEntry *se;
|
||||
int ret;
|
||||
|
||||
trace_savevm_state_begin();
|
||||
trace_savevm_state_setup();
|
||||
QTAILQ_FOREACH(se, &savevm_state.handlers, entry) {
|
||||
if (!se->ops || !se->ops->save_live_setup) {
|
||||
if (!se->ops || !se->ops->save_setup) {
|
||||
continue;
|
||||
}
|
||||
if (se->ops && se->ops->is_active) {
|
||||
|
@ -972,7 +972,7 @@ void qemu_savevm_state_begin(QEMUFile *f)
|
|||
}
|
||||
save_section_header(f, se, QEMU_VM_SECTION_START);
|
||||
|
||||
ret = se->ops->save_live_setup(f, se->opaque);
|
||||
ret = se->ops->save_setup(f, se->opaque);
|
||||
save_section_footer(f, se);
|
||||
if (ret < 0) {
|
||||
qemu_file_set_error(f, ret);
|
||||
|
@ -1241,7 +1241,7 @@ static int qemu_savevm_state(QEMUFile *f, Error **errp)
|
|||
|
||||
qemu_mutex_unlock_iothread();
|
||||
qemu_savevm_state_header(f);
|
||||
qemu_savevm_state_begin(f);
|
||||
qemu_savevm_state_setup(f);
|
||||
qemu_mutex_lock_iothread();
|
||||
|
||||
while (qemu_file_get_error(f) == 0) {
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#define QEMU_VM_SECTION_FOOTER 0x7e
|
||||
|
||||
bool qemu_savevm_state_blocked(Error **errp);
|
||||
void qemu_savevm_state_begin(QEMUFile *f);
|
||||
void qemu_savevm_state_setup(QEMUFile *f);
|
||||
void qemu_savevm_state_header(QEMUFile *f);
|
||||
int qemu_savevm_state_iterate(QEMUFile *f, bool postcopy);
|
||||
void qemu_savevm_state_cleanup(void);
|
||||
|
|
|
@ -32,7 +32,7 @@ savevm_send_open_return_path(void) ""
|
|||
savevm_send_ping(uint32_t val) "%x"
|
||||
savevm_send_postcopy_listen(void) ""
|
||||
savevm_send_postcopy_run(void) ""
|
||||
savevm_state_begin(void) ""
|
||||
savevm_state_setup(void) ""
|
||||
savevm_state_header(void) ""
|
||||
savevm_state_iterate(void) ""
|
||||
savevm_state_cleanup(void) ""
|
||||
|
|
Loading…
Reference in New Issue