From: Jan Kiszka Date: Mon, 30 Nov 2009 17:21:20 +0000 (+0100) Subject: block migration: Initialize remaining BlkMigState fields X-Git-Tag: TizenStudio_2.0_p2.3~6443 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6ee25b1ebb3c48add9f8fdb4c41c165f3d63195b;p=sdk%2Femulator%2Fqemu.git 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 --- diff --git a/block-migration.c b/block-migration.c index 6ca48f4..ec32ee2 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));