Skip to content
Snippets Groups Projects
Commit 69d63a97 authored by Jan Kiszka's avatar Jan Kiszka Committed by Anthony Liguori
Browse files

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: default avatarJan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
parent 5e5328be
No related branches found
No related tags found
No related merge requests found
......@@ -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));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment