[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/3] propagate error on failed completion
From: |
Edgar E. Iglesias |
Subject: |
Re: [Qemu-devel] [PATCH 3/3] propagate error on failed completion |
Date: |
Tue, 31 Mar 2009 19:05:45 +0200 |
User-agent: |
Mutt/1.5.16 (2007-06-09) |
On Tue, Mar 31, 2009 at 12:51:15PM -0400, 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 <address@hidden>
> CC: Yaniv Kamay <address@hidden>
> CC: Dor Laor <address@hidden>
> ---
> migration.c | 6 +++++-
> 1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/migration.c b/migration.c
> index b3904b2..4574830 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);
^^^
Forgot something?
> + vm_start();
> + s->done(s, MIG_STATE_ERROR);
> + return;
> + }
> s->state = MIG_STATE_COMPLETED;
> migrate_fd_cleanup(s);
> }
Cheers