From: Luiz Capitulino <lcapitulino@redhat.com>
To: Soramichi AKIYAMA <akiyama@nii.ac.jp>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Human Monitor: migrate command (without -d) now blocks correctly
Date: Mon, 10 Feb 2014 15:07:12 -0500 [thread overview]
Message-ID: <20140210150712.144ae7df@redhat.com> (raw)
In-Reply-To: <20140127194611.679775b92d4be424325b6ecf@nii.ac.jp>
On Mon, 27 Jan 2014 19:46:11 +0900
Soramichi AKIYAMA <akiyama@nii.ac.jp> wrote:
> This patch fixes a timing issue that migrate command (without -d) does not block in some cases.
> The original version of hmp.c:hmp_migrate_status_cb checks if the migration status is 'active' or not to detect the complition of a migration.
> However, if this function is executed when the migration status is still 'setup' (the status before 'active'),
> migration command returns immediately even if the user does not specify -d option.
>
> Signed-off-by: Soramichi Akiyama <akiyama@nii.ac.jp>
> ---
> hmp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hmp.c b/hmp.c
> index 1af0809..eb887bf 100644
> --- a/hmp.c
> +++ b/hmp.c
> @@ -1234,7 +1234,7 @@ static void hmp_migrate_status_cb(void *opaque)
> MigrationInfo *info;
>
> info = qmp_query_migrate(NULL);
> - if (!info->has_status || strcmp(info->status, "active") == 0) {
> + if (!info->has_status || strcmp(info->status, "active") == 0 || strcmp(info->status, "setup") == 0 ) {
> if (info->has_disk) {
> int progress;
>
Good catch, applied to the qmp branch, thanks.
next prev parent reply other threads:[~2014-02-10 20:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-27 10:46 [Qemu-devel] [PATCH] Human Monitor: migrate command (without -d) now blocks correctly Soramichi AKIYAMA
2014-02-10 20:07 ` Luiz Capitulino [this message]
2014-02-10 20:16 ` Andreas Färber
2014-02-10 20:18 ` Luiz Capitulino
2014-02-10 23:06 ` Soramichi AKIYAMA
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=20140210150712.144ae7df@redhat.com \
--to=lcapitulino@redhat.com \
--cc=akiyama@nii.ac.jp \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).