Patchwork [11/23] block migration: Initialize remaining BlkMigState fields

login
register
mail settings
Submitter Jan Kiszka
Date Nov. 30, 2009, 5:21 p.m.
Message ID <20091130172120.22889.68200.stgit@mchn012c.ww002.siemens.net>
Download mbox | patch
Permalink /patch/39848/
State New
Headers show

Comments

Jan Kiszka - Nov. 30, 2009, 5:21 p.m.
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>
---

 block-migration.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

Patch

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));