From: Luiz Capitulino <lcapitulino@redhat.com>
To: Lin Ma <lma@suse.com>
Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH] Fix incorrect state information for migrate_cancel
Date: Fri, 6 Dec 2013 09:00:49 -0500 [thread overview]
Message-ID: <20131206090049.6404ddec@redhat.com> (raw)
In-Reply-To: <52A1C7CB02000062000436B1@soto.provo.novell.com>
On Thu, 05 Dec 2013 18:49:15 -0700
"Lin Ma" <lma@suse.com> wrote:
> In qemu-1.4.x, When performing migrate_cancel on hmp, Sometimes
> s->state is incorrrectly saved to MIG_STATE_ERROR instead of
> MIG_STATE_CANCELLED.
>
> If the migrate_fd_cancel in main thread is scheduled to run before
> the thread buffered_file_thread calls migrate_fd_put_buffer, The
> s->state will be modified to MIG_STATE_CANCELLED by main thread,
> Then the migrate_fd_put_buffer in thread buffered_file_thread will
> return -EIO if s->state != MIG_STATE_ACTIVE, This incorrect return
> value trigged migrate_fd_error to set s->state = MIG_STATE_ERROR.
>
> This patch fixes the issue in qemu-1.4.x.
Is qemu 1.4 still maintained?
>
> Signed-off-by: Lin Ma <lma@suse.com>
> ---
> migration.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/migration.c b/migration.c
> index 98c7696..0ac4608 100644
> --- a/migration.c
> +++ b/migration.c
> @@ -751,7 +751,7 @@ static void *buffered_file_thread(void *opaque)
> }
>
> out:
> - if (ret < 0) {
> + if (ret < 0 && !s->complete) {
> migrate_fd_error(s);
> }
> g_free(s->buffer);
next prev parent reply other threads:[~2013-12-06 14:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-06 1:49 [Qemu-devel] [PATCH] Fix incorrect state information for migrate_cancel Lin Ma
2013-12-06 14:00 ` Luiz Capitulino [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-12-01 22:55 Lin Ma
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=20131206090049.6404ddec@redhat.com \
--to=lcapitulino@redhat.com \
--cc=lma@suse.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=pbonzini@redhat.com \
--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).