All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Juan Quintela <quintela@redhat.com>
Cc: qemu-devel@nongnu.org, dgilbert@redhat.com, lvivier@redhat.com
Subject: Re: [Qemu-devel] [PATCH 2/2] migration: to_dst_file at that point is NULL
Date: Wed, 26 Apr 2017 19:53:31 +0800	[thread overview]
Message-ID: <20170426115331.GA26792@pxdev.xzpeter.org> (raw)
In-Reply-To: <20170425101758.3944-3-quintela@redhat.com>

On Tue, Apr 25, 2017 at 12:17:58PM +0200, Juan Quintela wrote:
> We have just arrived as:
> 
> migration.c: qemu_migrate()
>   ....
>   s = migrate_init() <- puts it to NULL
>   ....
>   {tcp,unix}_start_outgoing_migration ->
>      socket_outgoing_migration
>         migration_channel_connect()
> 	   sets to_dst_file
> 
> if tls is enabled, we do another round through
> migrate_channel_tls_connect(), but we only set it up if there is no
> error.  So we don't need the assignation.  I am removing it to remove
> in the follwing patches the knowledge about MigrationState in that two
> files.
> 
> Signed-off-by: Juan Quintela <quintela@redhat.com>

Reviewed-by: Peter Xu <peterx@redhat.com>

> ---
>  migration/socket.c | 1 -
>  migration/tls.c    | 1 -
>  2 files changed, 2 deletions(-)
> 
> diff --git a/migration/socket.c b/migration/socket.c
> index 13966f1..dc88812 100644
> --- a/migration/socket.c
> +++ b/migration/socket.c
> @@ -79,7 +79,6 @@ static void socket_outgoing_migration(QIOTask *task,
>  
>      if (qio_task_propagate_error(task, &err)) {
>          trace_migration_socket_outgoing_error(error_get_pretty(err));
> -        data->s->to_dst_file = NULL;
>          migrate_fd_error(data->s, err);
>          error_free(err);
>      } else {
> diff --git a/migration/tls.c b/migration/tls.c
> index 45bec44..a33ecb7 100644
> --- a/migration/tls.c
> +++ b/migration/tls.c
> @@ -116,7 +116,6 @@ static void migration_tls_outgoing_handshake(QIOTask *task,
>  
>      if (qio_task_propagate_error(task, &err)) {
>          trace_migration_tls_outgoing_handshake_error(error_get_pretty(err));
> -        s->to_dst_file = NULL;
>          migrate_fd_error(s, err);
>          error_free(err);
>      } else {
> -- 
> 2.9.3
> 

-- 
Peter Xu

      parent reply	other threads:[~2017-04-26 11:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-25 10:17 [Qemu-devel] [PATCH 0/2] Misc migration fixes Juan Quintela
2017-04-25 10:17 ` [Qemu-devel] [PATCH 1/2] migration: Move check_migratable() into qdev.c Juan Quintela
2017-04-25 11:58   ` Laurent Vivier
2017-04-26 10:06   ` Peter Xu
2017-04-26 10:31     ` Juan Quintela
2017-04-25 10:17 ` [Qemu-devel] [PATCH 2/2] migration: to_dst_file at that point is NULL Juan Quintela
2017-04-25 12:39   ` Laurent Vivier
2017-04-25 12:59     ` Juan Quintela
2017-04-25 13:10       ` Laurent Vivier
2017-04-25 13:14   ` Daniel P. Berrange
2017-04-26 11:53   ` Peter Xu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170426115331.GA26792@pxdev.xzpeter.org \
    --to=peterx@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.