mirror of https://github.com/xemu-project/xemu.git
migration: Make *start_outgoing_migration return FdMigrationState
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
2975725f6b
commit
7be4363a28
|
@ -61,7 +61,7 @@ static int exec_close(FdMigrationState *s)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
MigrationState *exec_start_outgoing_migration(Monitor *mon,
|
FdMigrationState *exec_start_outgoing_migration(Monitor *mon,
|
||||||
const char *command,
|
const char *command,
|
||||||
int64_t bandwidth_limit,
|
int64_t bandwidth_limit,
|
||||||
int detach,
|
int detach,
|
||||||
|
@ -108,7 +108,7 @@ MigrationState *exec_start_outgoing_migration(Monitor *mon,
|
||||||
}
|
}
|
||||||
|
|
||||||
migrate_fd_connect(s);
|
migrate_fd_connect(s);
|
||||||
return &s->mig_state;
|
return s;
|
||||||
|
|
||||||
err_after_open:
|
err_after_open:
|
||||||
pclose(f);
|
pclose(f);
|
||||||
|
|
|
@ -50,7 +50,7 @@ static int fd_close(FdMigrationState *s)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
MigrationState *fd_start_outgoing_migration(Monitor *mon,
|
FdMigrationState *fd_start_outgoing_migration(Monitor *mon,
|
||||||
const char *fdname,
|
const char *fdname,
|
||||||
int64_t bandwidth_limit,
|
int64_t bandwidth_limit,
|
||||||
int detach,
|
int detach,
|
||||||
|
@ -91,7 +91,7 @@ MigrationState *fd_start_outgoing_migration(Monitor *mon,
|
||||||
}
|
}
|
||||||
|
|
||||||
migrate_fd_connect(s);
|
migrate_fd_connect(s);
|
||||||
return &s->mig_state;
|
return s;
|
||||||
|
|
||||||
err_after_open:
|
err_after_open:
|
||||||
close(s->fd);
|
close(s->fd);
|
||||||
|
|
|
@ -75,7 +75,7 @@ static void tcp_wait_for_connect(void *opaque)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MigrationState *tcp_start_outgoing_migration(Monitor *mon,
|
FdMigrationState *tcp_start_outgoing_migration(Monitor *mon,
|
||||||
const char *host_port,
|
const char *host_port,
|
||||||
int64_t bandwidth_limit,
|
int64_t bandwidth_limit,
|
||||||
int detach,
|
int detach,
|
||||||
|
@ -131,7 +131,7 @@ MigrationState *tcp_start_outgoing_migration(Monitor *mon,
|
||||||
} else if (ret >= 0)
|
} else if (ret >= 0)
|
||||||
migrate_fd_connect(s);
|
migrate_fd_connect(s);
|
||||||
|
|
||||||
return &s->mig_state;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void tcp_accept_incoming_migration(void *opaque)
|
static void tcp_accept_incoming_migration(void *opaque)
|
||||||
|
|
|
@ -74,7 +74,7 @@ static void unix_wait_for_connect(void *opaque)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MigrationState *unix_start_outgoing_migration(Monitor *mon,
|
FdMigrationState *unix_start_outgoing_migration(Monitor *mon,
|
||||||
const char *path,
|
const char *path,
|
||||||
int64_t bandwidth_limit,
|
int64_t bandwidth_limit,
|
||||||
int detach,
|
int detach,
|
||||||
|
@ -132,7 +132,7 @@ MigrationState *unix_start_outgoing_migration(Monitor *mon,
|
||||||
if (ret >= 0)
|
if (ret >= 0)
|
||||||
migrate_fd_connect(s);
|
migrate_fd_connect(s);
|
||||||
|
|
||||||
return &s->mig_state;
|
return s;
|
||||||
|
|
||||||
err_after_open:
|
err_after_open:
|
||||||
close(s->fd);
|
close(s->fd);
|
||||||
|
|
|
@ -79,7 +79,7 @@ void process_incoming_migration(QEMUFile *f)
|
||||||
|
|
||||||
int do_migrate(Monitor *mon, const QDict *qdict, QObject **ret_data)
|
int do_migrate(Monitor *mon, const QDict *qdict, QObject **ret_data)
|
||||||
{
|
{
|
||||||
MigrationState *s = NULL;
|
FdMigrationState *s = NULL;
|
||||||
const char *p;
|
const char *p;
|
||||||
int detach = qdict_get_try_bool(qdict, "detach", 0);
|
int detach = qdict_get_try_bool(qdict, "detach", 0);
|
||||||
int blk = qdict_get_try_bool(qdict, "blk", 0);
|
int blk = qdict_get_try_bool(qdict, "blk", 0);
|
||||||
|
@ -124,7 +124,7 @@ int do_migrate(Monitor *mon, const QDict *qdict, QObject **ret_data)
|
||||||
current_migration->release(current_migration);
|
current_migration->release(current_migration);
|
||||||
}
|
}
|
||||||
|
|
||||||
current_migration = s;
|
current_migration = &s->mig_state;
|
||||||
notifier_list_notify(&migration_state_notifiers, NULL);
|
notifier_list_notify(&migration_state_notifiers, NULL);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ void do_info_migrate(Monitor *mon, QObject **ret_data);
|
||||||
|
|
||||||
int exec_start_incoming_migration(const char *host_port);
|
int exec_start_incoming_migration(const char *host_port);
|
||||||
|
|
||||||
MigrationState *exec_start_outgoing_migration(Monitor *mon,
|
FdMigrationState *exec_start_outgoing_migration(Monitor *mon,
|
||||||
const char *host_port,
|
const char *host_port,
|
||||||
int64_t bandwidth_limit,
|
int64_t bandwidth_limit,
|
||||||
int detach,
|
int detach,
|
||||||
|
@ -81,7 +81,7 @@ MigrationState *exec_start_outgoing_migration(Monitor *mon,
|
||||||
|
|
||||||
int tcp_start_incoming_migration(const char *host_port);
|
int tcp_start_incoming_migration(const char *host_port);
|
||||||
|
|
||||||
MigrationState *tcp_start_outgoing_migration(Monitor *mon,
|
FdMigrationState *tcp_start_outgoing_migration(Monitor *mon,
|
||||||
const char *host_port,
|
const char *host_port,
|
||||||
int64_t bandwidth_limit,
|
int64_t bandwidth_limit,
|
||||||
int detach,
|
int detach,
|
||||||
|
@ -90,7 +90,7 @@ MigrationState *tcp_start_outgoing_migration(Monitor *mon,
|
||||||
|
|
||||||
int unix_start_incoming_migration(const char *path);
|
int unix_start_incoming_migration(const char *path);
|
||||||
|
|
||||||
MigrationState *unix_start_outgoing_migration(Monitor *mon,
|
FdMigrationState *unix_start_outgoing_migration(Monitor *mon,
|
||||||
const char *path,
|
const char *path,
|
||||||
int64_t bandwidth_limit,
|
int64_t bandwidth_limit,
|
||||||
int detach,
|
int detach,
|
||||||
|
@ -99,7 +99,7 @@ MigrationState *unix_start_outgoing_migration(Monitor *mon,
|
||||||
|
|
||||||
int fd_start_incoming_migration(const char *path);
|
int fd_start_incoming_migration(const char *path);
|
||||||
|
|
||||||
MigrationState *fd_start_outgoing_migration(Monitor *mon,
|
FdMigrationState *fd_start_outgoing_migration(Monitor *mon,
|
||||||
const char *fdname,
|
const char *fdname,
|
||||||
int64_t bandwidth_limit,
|
int64_t bandwidth_limit,
|
||||||
int detach,
|
int detach,
|
||||||
|
|
Loading…
Reference in New Issue