* [PATCH] migration: initialise compression_counters for a new migration
@ 2021-09-02 11:51 yuxiating
2021-11-02 15:39 ` Juan Quintela
0 siblings, 1 reply; 2+ messages in thread
From: yuxiating @ 2021-09-02 11:51 UTC (permalink / raw)
To: quintela, dgilbert; +Cc: qemu-devel, eric.fangyi
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>
---
migration/migration.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/migration/migration.c b/migration/migration.c
index bb909781b7..f20bc560e5 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -2252,10 +2252,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;
}
--
2.24.0.windows.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] migration: initialise compression_counters for a new migration
2021-09-02 11:51 [PATCH] migration: initialise compression_counters for a new migration yuxiating
@ 2021-11-02 15:39 ` Juan Quintela
0 siblings, 0 replies; 2+ messages in thread
From: Juan Quintela @ 2021-11-02 15:39 UTC (permalink / raw)
To: yuxiating; +Cc: eric.fangyi, dgilbert, qemu-devel
yuxiating <yuxiating@huawei.com> wrote:
> 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>
> ---
> migration/migration.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/migration/migration.c b/migration/migration.c
> index bb909781b7..f20bc560e5 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -2252,10 +2252,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;
> }
Once here, we are not initializing them on qemu_savevm_state() either.
Reviewed-by: Juan Quintela <quintela@redhat.com>
queue.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-02 15:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-02 11:51 [PATCH] migration: initialise compression_counters for a new migration yuxiating
2021-11-02 15:39 ` Juan Quintela
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.