aboutsummaryrefslogtreecommitdiff
path: root/migration
diff options
context:
space:
mode:
authoryuxiating <yuxiating@huawei.com>2021-09-02 19:51:17 +0800
committerJuan Quintela <quintela@trasno.org>2021-11-03 09:38:53 +0100
commitfa0b31d585b66e0a9e6e9e72edf729ad2f10e6fd (patch)
tree3d1a016cd3f12e6f0621a704ac99d4332de3da68 /migration
parent458fecca80963b4c2c2164889d817542d2cece4f (diff)
downloadqemu-fa0b31d585b66e0a9e6e9e72edf729ad2f10e6fd.zip
qemu-fa0b31d585b66e0a9e6e9e72edf729ad2f10e6fd.tar.gz
qemu-fa0b31d585b66e0a9e6e9e72edf729ad2f10e6fd.tar.bz2
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>
Diffstat (limited to 'migration')
-rw-r--r--migration/migration.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/migration/migration.c b/migration/migration.c
index ec3d87f..edc0dac 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -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;
}