qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@redhat.com>
To: yuxiating <yuxiating@huawei.com>
Cc: eric.fangyi@huawei.com, dgilbert@redhat.com, qemu-devel@nongnu.org
Subject: Re: [PATCH] migration: initialise compression_counters for a new migration
Date: Tue, 02 Nov 2021 16:39:12 +0100	[thread overview]
Message-ID: <87ee7yin33.fsf@secure.mitica> (raw)
In-Reply-To: <20210902115117.5633-1-yuxiating@huawei.com> (yuxiating@huawei.com's message of "Thu, 2 Sep 2021 19:51:17 +0800")

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	other threads:[~2021-11-02 15:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-02 11:51 [PATCH] migration: initialise compression_counters for a new migration yuxiating
2021-11-02 15:39 ` Juan Quintela [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ee7yin33.fsf@secure.mitica \
    --to=quintela@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=eric.fangyi@huawei.com \
    --cc=qemu-devel@nongnu.org \
    --cc=yuxiating@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).