From: Anthony Liguori <aliguori@us.ibm.com>
To: Juan Quintela <quintela@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] migration: fix detached migration with fd
Date: Fri, 11 Nov 2011 13:45:27 -0600 [thread overview]
Message-ID: <4EBD7B57.5060207@us.ibm.com> (raw)
In-Reply-To: <1320870541-4571-1-git-send-email-quintela@redhat.com>
On 11/09/2011 02:29 PM, Juan Quintela wrote:
> Migration with fd uses s->mon to pass the fd. But we only assign the
> s->mon for !detached migration. Fix it. Once there add a comment
> indicating that s->mon has two uses.
>
> Bug reported by: Wen Congyang<wency@cn.fujitsu.com>
>
> Signed-off-by: Juan Quintela<quintela@redhat.com>
> CC: Wen Congyang<wency@cn.fujitsu.com>
Applied. Thanks.
Regards,
Anthony Liguori
> ---
> migration.c | 12 ++++++++++--
> 1 files changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/migration.c b/migration.c
> index 4b17566..41c3c24 100644
> --- a/migration.c
> +++ b/migration.c
> @@ -155,7 +155,6 @@ MigrationInfo *qmp_query_migrate(Error **errp)
>
> static void migrate_fd_monitor_suspend(MigrationState *s, Monitor *mon)
> {
> - s->mon = mon;
> if (monitor_suspend(mon) == 0) {
> DPRINTF("suspending monitor\n");
> } else {
> @@ -383,7 +382,12 @@ static MigrationState *migrate_init(Monitor *mon, int detach, int blk, int inc)
> s->bandwidth_limit = bandwidth_limit;
> s->blk = blk;
> s->shared = inc;
> - s->mon = NULL;
> +
> + /* s->mon is used for two things:
> + - pass fd in fd migration
> + - suspend/resume monitor for not detached migration
> + */
> + s->mon = mon;
> s->bandwidth_limit = bandwidth_limit;
> s->state = MIG_STATE_SETUP;
>
> @@ -435,6 +439,10 @@ int do_migrate(Monitor *mon, const QDict *qdict, QObject **ret_data)
> return ret;
> }
>
> + if (detach) {
> + s->mon = NULL;
> + }
> +
> notifier_list_notify(&migration_state_notifiers, s);
> return 0;
> }
prev parent reply other threads:[~2011-11-11 19:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-09 20:29 [Qemu-devel] [PATCH] migration: fix detached migration with fd Juan Quintela
2011-11-10 1:48 ` Stefan Berger
2011-11-11 19:45 ` Anthony Liguori [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=4EBD7B57.5060207@us.ibm.com \
--to=aliguori@us.ibm.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.