From 69d63a97a194a70d305f7d3d6b9d8f2c3c5bfbf2 Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Mon, 30 Nov 2009 18:21:20 +0100 Subject: [PATCH] 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 Signed-off-by: Anthony Liguori --- block-migration.c | 5 +++++ 1 file changed, 5 insertions(+) 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));