[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 26/28] migration: qemu_savevm_iterate has three retu
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PATCH 26/28] migration: qemu_savevm_iterate has three return values |
Date: |
Wed, 23 Feb 2011 22:47:35 +0100 |
We were retrying when there was one error, entering a loop.
Signed-off-by: Juan Quintela <address@hidden>
---
migration.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/migration.c b/migration.c
index a02100b..6082c32 100644
--- a/migration.c
+++ b/migration.c
@@ -269,6 +269,7 @@ static ssize_t migrate_fd_put_buffer(void *opaque, const
void *data,
static void migrate_fd_put_ready(void *opaque)
{
MigrationState *s = opaque;
+ int ret;
if (s->state != MIG_STATE_ACTIVE) {
DPRINTF("put_ready returning because of non-active state\n");
@@ -276,7 +277,10 @@ static void migrate_fd_put_ready(void *opaque)
}
DPRINTF("iterate\n");
- if (qemu_savevm_state_iterate(s->mon, s->file) == 1) {
+ ret = qemu_savevm_state_iterate(s->mon, s->file);
+ if (ret == -1) {
+ migrate_fd_error(s);
+ } else if (ret == 1) {
int old_vm_running = vm_running;
DPRINTF("done iterating\n");
--
1.7.4
- [Qemu-devel] [PATCH 20/28] migration: Export a function that tells if the migration has finished correctly, (continued)
- [Qemu-devel] [PATCH 05/28] migration: Refactor MigrationState creation, Juan Quintela, 2011/02/23
- [Qemu-devel] [PATCH 23/28] migration: add error handling to migrate_fd_put_notify()., Juan Quintela, 2011/02/23
- [Qemu-devel] [PATCH 22/28] savevm: avoid qemu_savevm_state_iteate() to return 1 when qemu file has error., Juan Quintela, 2011/02/23
- [Qemu-devel] [PATCH 24/28] migration: Don't use callback on file defining it, Juan Quintela, 2011/02/23
- [Qemu-devel] [PATCH 25/28] migration: propagate error correctly, Juan Quintela, 2011/02/23
- [Qemu-devel] [PATCH 26/28] migration: qemu_savevm_iterate has three return values,
Juan Quintela <=
- [Qemu-devel] [PATCH 27/28] migration: If there is one error, it makes no sense to continue, Juan Quintela, 2011/02/23
- [Qemu-devel] [PATCH 28/28] migration: make migration-{tcp, unix} consistent, Juan Quintela, 2011/02/23
- [Qemu-devel] [PATCH 11/28] migration: Introduce migrate_fd_completed() for consistenncy, Juan Quintela, 2011/02/23
- [Qemu-devel] [PATCH 15/28] migration: Move exported functions to the end of the file, Juan Quintela, 2011/02/23