mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
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>
This commit is contained in:
parent
5e5328be14
commit
69d63a97a1
1 changed files with 5 additions and 0 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue