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

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.