aboutsummaryrefslogtreecommitdiff
path: root/block-migration.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2009-11-30 18:21:20 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2009-12-03 10:48:52 -0600
commit69d63a97a194a70d305f7d3d6b9d8f2c3c5bfbf2 (patch)
tree36a8f2180181dafddd56e282260255b15ffa2b88 /block-migration.c
parent5e5328be14d4c2305411bec5993e909717e6f0a9 (diff)
block migration: Initialize remaining BlkMigState fields
In case we restart a migration, submitted, read_done, transferred, and print_completion need to be reinitialized to 0. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'block-migration.c')
-rw-r--r--block-migration.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/block-migration.c b/block-migration.c
index 6ca48f4b3c..ec32ee27cb 100644
--- a/block-migration.c
+++ b/block-migration.c
@@ -248,6 +248,11 @@ static void init_blk_migration(QEMUFile *f)
BlkMigDevState *bmds;
BlockDriverState *bs;
+ block_mig_state.submitted = 0;
+ block_mig_state.read_done = 0;
+ block_mig_state.transferred = 0;
+ block_mig_state.print_completion = 0;
+
for (bs = bdrv_first; bs != NULL; bs = bs->next) {
if (bs->type == BDRV_TYPE_HD) {
bmds = qemu_mallocz(sizeof(BlkMigDevState));