qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 10/18] migration-local: implementation of outgoi


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 10/18] migration-local: implementation of outgoing part
Date: Wed, 21 Aug 2013 12:44:01 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8

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 <address@hidden>
> ---
>  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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]