All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 3/3] propagate error on failed completion
@ 2009-03-31 17:43 Glauber Costa
  2009-03-31 19:35 ` [Qemu-devel] " Yaniv Kamay
  0 siblings, 1 reply; 3+ messages in thread
From: Glauber Costa @ 2009-03-31 17:43 UTC (permalink / raw)
  To: qemu-devel; +Cc: Yaniv Kamay, aliguori, Dor Laor, avi

migrate_fd_put_ready() calls qemu_savevm_state_complete(),
but the later can fail.

If it happens, re-start the vm and propagate the error up

Based on a patch by Yaniv Kamay

Signed-off-by: Glauber Costa <glommer@redhat.com>
CC: Yaniv Kamay <ykamay@redhat.com>
CC: Dor Laor <dlaor@redhat.com>
---
 migration.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/migration.c b/migration.c
index b3904b2..d77ebbd 100644
--- a/migration.c
+++ b/migration.c
@@ -224,7 +224,11 @@ void migrate_fd_put_ready(void *opaque)
         vm_stop(0);
 
         bdrv_flush_all();
-        qemu_savevm_state_complete(s->file);
+        if ((qemu_savevm_state_complete(s->file)) < 0) {
+            vm_start();
+            s->state = MIG_STATE_ERROR;
+            return;
+        }
         s->state = MIG_STATE_COMPLETED;
         migrate_fd_cleanup(s);
     }
-- 
1.5.6.6

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Qemu-devel] Re: [PATCH 3/3] propagate error on failed completion
  2009-03-31 17:43 [Qemu-devel] [PATCH 3/3] propagate error on failed completion Glauber Costa
@ 2009-03-31 19:35 ` Yaniv Kamay
  2009-03-31 19:48   ` Glauber Costa
  0 siblings, 1 reply; 3+ messages in thread
From: Yaniv Kamay @ 2009-03-31 19:35 UTC (permalink / raw)
  To: Glauber Costa; +Cc: aliguori, Dor Laor, qemu-devel, avi

Glauber Costa wrote:
> migrate_fd_put_ready() calls qemu_savevm_state_complete(),
> but the later can fail.
>
> If it happens, re-start the vm and propagate the error up
>
> Based on a patch by Yaniv Kamay
>
> Signed-off-by: Glauber Costa <glommer@redhat.com>
> CC: Yaniv Kamay <ykamay@redhat.com>
> CC: Dor Laor <dlaor@redhat.com>
> ---
>  migration.c |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/migration.c b/migration.c
> index b3904b2..d77ebbd 100644
> --- a/migration.c
> +++ b/migration.c
> @@ -224,7 +224,11 @@ void migrate_fd_put_ready(void *opaque)
>          vm_stop(0);
>  
>          bdrv_flush_all();
> -        qemu_savevm_state_complete(s->file);
> +        if ((qemu_savevm_state_complete(s->file)) < 0) {
> +            vm_start();
> +            s->state = MIG_STATE_ERROR;
> +            return;
> +        }
>          s->state = MIG_STATE_COMPLETED;
>          migrate_fd_cleanup(s);
>      }
>   
We need to call migrate_fd_cleanup() in case of error.

Yaniv

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Qemu-devel] Re: [PATCH 3/3] propagate error on failed completion
  2009-03-31 19:35 ` [Qemu-devel] " Yaniv Kamay
@ 2009-03-31 19:48   ` Glauber Costa
  0 siblings, 0 replies; 3+ messages in thread
From: Glauber Costa @ 2009-03-31 19:48 UTC (permalink / raw)
  To: Yaniv Kamay; +Cc: aliguori, Dor Laor, qemu-devel, avi

On Tue, Mar 31, 2009 at 10:35:19PM +0300, Yaniv Kamay wrote:
> Glauber Costa wrote:
>> migrate_fd_put_ready() calls qemu_savevm_state_complete(),
>> but the later can fail.
>>
>> If it happens, re-start the vm and propagate the error up
>>
>> Based on a patch by Yaniv Kamay
>>
>> Signed-off-by: Glauber Costa <glommer@redhat.com>
>> CC: Yaniv Kamay <ykamay@redhat.com>
>> CC: Dor Laor <dlaor@redhat.com>
>> ---
>>  migration.c |    6 +++++-
>>  1 files changed, 5 insertions(+), 1 deletions(-)
>>
>> diff --git a/migration.c b/migration.c
>> index b3904b2..d77ebbd 100644
>> --- a/migration.c
>> +++ b/migration.c
>> @@ -224,7 +224,11 @@ void migrate_fd_put_ready(void *opaque)
>>          vm_stop(0);
>>           bdrv_flush_all();
>> -        qemu_savevm_state_complete(s->file);
>> +        if ((qemu_savevm_state_complete(s->file)) < 0) {
>> +            vm_start();
>> +            s->state = MIG_STATE_ERROR;
>> +            return;
>> +        }
>>          s->state = MIG_STATE_COMPLETED;
>>          migrate_fd_cleanup(s);
>>      }
>>   
> We need to call migrate_fd_cleanup() in case of error.
thanks for the spot. I will update this patch.
>
> Yaniv
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-03-31 19:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-31 17:43 [Qemu-devel] [PATCH 3/3] propagate error on failed completion Glauber Costa
2009-03-31 19:35 ` [Qemu-devel] " Yaniv Kamay
2009-03-31 19:48   ` Glauber Costa

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.