[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH for-1.4 stable 3/3] block-migration: fix block_save_
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PATCH for-1.4 stable 3/3] block-migration: fix block_save_iterate() return value |
Date: |
Sat, 9 Feb 2013 19:01:59 +0100 |
The .save_live_iterate() function returns 0 it continue iterating or 1
to stop iterating.
Since 16310a3cca7320edb9341c976f7819de0a8c27e0 it only ever returns 0,
leading to an infinite loop.
Return 1 if we have finished sending dirty blocks.
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
block-migration.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block-migration.c b/block-migration.c
index a91d96b..e9bc200 100644
--- a/block-migration.c
+++ b/block-migration.c
@@ -582,7 +582,7 @@ static int block_save_iterate(QEMUFile *f, void *opaque)
qemu_put_be64(f, BLK_MIG_FLAG_EOS);
- return 0;
+ return get_remaining_dirty() == 0;
}
static int block_save_complete(QEMUFile *f, void *opaque)
--
1.8.1.2