* [Qemu-devel] [PATCH] Fix incorrect state information for migrate_cancel
@ 2013-12-01 22:55 Lin Ma
0 siblings, 0 replies; 3+ messages in thread
From: Lin Ma @ 2013-12-01 22:55 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1.1: Type: text/plain, Size: 1047 bytes --]
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.
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);
--
1.8.4
[-- Attachment #1.2: HTML --]
[-- Type: text/html, Size: 1531 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Qemu-devel] [PATCH] Fix incorrect state information for migrate_cancel
@ 2013-12-06 1:49 Lin Ma
2013-12-06 14:00 ` Luiz Capitulino
0 siblings, 1 reply; 3+ messages in thread
From: Lin Ma @ 2013-12-06 1:49 UTC (permalink / raw)
To: qemu-devel; +Cc: pbonzini, lcapitulino
[-- Attachment #1.1: Type: text/plain, Size: 1047 bytes --]
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.
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);
--
1.8.4
[-- Attachment #1.2: HTML --]
[-- Type: text/html, Size: 1655 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] Fix incorrect state information for migrate_cancel
2013-12-06 1:49 [Qemu-devel] [PATCH] Fix incorrect state information for migrate_cancel Lin Ma
@ 2013-12-06 14:00 ` Luiz Capitulino
0 siblings, 0 replies; 3+ messages in thread
From: Luiz Capitulino @ 2013-12-06 14:00 UTC (permalink / raw)
To: Lin Ma; +Cc: pbonzini, qemu-devel, mdroth
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);
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-12-06 14:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-06 1:49 [Qemu-devel] [PATCH] Fix incorrect state information for migrate_cancel Lin Ma
2013-12-06 14:00 ` Luiz Capitulino
-- strict thread matches above, loose matches on Subject: below --
2013-12-01 22:55 Lin Ma
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).