All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yaniv Kamay <ykamay@redhat.com>
To: Glauber Costa <glommer@redhat.com>
Cc: aliguori@us.ibm.com, Dor Laor <dlaor@redhat.com>,
	qemu-devel@nongnu.org, avi@redhat.com
Subject: [Qemu-devel] Re: [PATCH 3/3] propagate error on failed completion
Date: Tue, 31 Mar 2009 22:35:19 +0300	[thread overview]
Message-ID: <49D27077.8000209@redhat.com> (raw)
In-Reply-To: <1238521389-4130-1-git-send-email-glommer@redhat.com>

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

  reply	other threads:[~2009-03-31 19:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-31 17:43 [Qemu-devel] [PATCH 3/3] propagate error on failed completion Glauber Costa
2009-03-31 19:35 ` Yaniv Kamay [this message]
2009-03-31 19:48   ` [Qemu-devel] " Glauber Costa

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=49D27077.8000209@redhat.com \
    --to=ykamay@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=avi@redhat.com \
    --cc=dlaor@redhat.com \
    --cc=glommer@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 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.