migration: initialise compression_counters for a new migration
If the compression migration fails or is canceled, the query for the value of compression_counters during the next compression migration is wrong. Signed-off-by: yuxiating <yuxiating@huawei.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
458fecca80
commit
fa0b31d585
@ -2271,10 +2271,11 @@ static bool migrate_prepare(MigrationState *s, bool blk, bool blk_inc,
|
||||
|
||||
migrate_init(s);
|
||||
/*
|
||||
* set ram_counters memory to zero for a
|
||||
* set ram_counters compression_counters memory to zero for a
|
||||
* new migration
|
||||
*/
|
||||
memset(&ram_counters, 0, sizeof(ram_counters));
|
||||
memset(&compression_counters, 0, sizeof(compression_counters));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user