qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] migration: initialise compression_counters for a new migrati


From: Juan Quintela
Subject: Re: [PATCH] migration: initialise compression_counters for a new migration
Date: Tue, 02 Nov 2021 16:39:12 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]