Il 21/08/2013 09:18, Lei Li ha scritto: > Implementation of outgoing part for localhost migration. > The integration of migration thread and corresponding > adjustment will be in coming patches. > > Signed-off-by: Lei Li <li...@linux.vnet.ibm.com> > --- > include/migration/migration.h | 2 + > migration-local.c | 85 > +++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 87 insertions(+), 0 deletions(-) > > diff --git a/include/migration/migration.h b/include/migration/migration.h > index 5336117..d2c7eff 100644 > --- a/include/migration/migration.h > +++ b/include/migration/migration.h > @@ -92,6 +92,8 @@ void rdma_start_outgoing_migration(void *opaque, const char > *host_port, Error ** > > void rdma_start_incoming_migration(const char *host_port, Error **errp); > > +void local_start_outgoing_migration(void *opaque, const char *uri, Error > **errp); > + > void migrate_fd_error(MigrationState *s); > > void migrate_fd_connect(MigrationState *s); > diff --git a/migration-local.c b/migration-local.c > index 93190fd..cf4a091 100644 > --- a/migration-local.c > +++ b/migration-local.c > @@ -209,3 +209,88 @@ static void *qemu_fopen_local(int fd, const char *mode) > > return s->file; > } > + > +/************************************************************************ > + * Outgoing part > + **/ > + > +static QEMUFileLocal *local_migration_init(void) > +{ > + QEMUFileLocal *s = g_malloc0(sizeof(*s)); > + > + s->state = MIG_STATE_SETUP; > + trace_migrate_set_state(MIG_STATE_SETUP); > + s->fd = -1; > + s->last_block_sent = NULL; > + > + return s; > +}
It's not clear why this is needed, it looks like a violation of encapsulation. Paolo