yuxiating <[email protected]> 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 <[email protected]>
> ---
>  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 <[email protected]>

queue.


Reply via email to