qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	qemu-block@nongnu.org
Cc: fam@euphon.net, quintela@redhat.com, qemu-devel@nongnu.org,
	dgilbert@redhat.com, stefanha@redhat.com, jsnow@redhat.com
Subject: Re: [PATCH] migration/block-dirty-bitmap: fix add_bitmaps_to_list
Date: Fri, 26 Jun 2020 09:34:46 -0500	[thread overview]
Message-ID: <20eed09c-f667-ab71-9d1a-a08c0c9d6a65@redhat.com> (raw)
In-Reply-To: <20200626130658.76498-1-vsementsov@virtuozzo.com>

On 6/26/20 8:06 AM, Vladimir Sementsov-Ogievskiy wrote:
> We shouldn't fail, if found unnamed bitmap in a unnamed node or node

We shouldn't fail when finding an unnamed

> with auto-generated node name, as bitmap migration ignores such bitmaps
> at all.

such bitmaps in the first place.

> 
> Fixes: 82640edb88faa
> Fixes: 4ff5cc121b089
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> ---
>   migration/block-dirty-bitmap.c | 6 +++++-
>   1 file changed, 5 insertions(+), 1 deletion(-)
> 

Reviewed-by: Eric Blake <eblake@redhat.com>

Will queue through the bitmaps tree.

Is this easy enough to reproduce that it would be worth having iotest 
coverage?

> diff --git a/migration/block-dirty-bitmap.c b/migration/block-dirty-bitmap.c
> index 47bc0f650c..b0dbf9eeed 100644
> --- a/migration/block-dirty-bitmap.c
> +++ b/migration/block-dirty-bitmap.c
> @@ -274,7 +274,11 @@ static int add_bitmaps_to_list(BlockDriverState *bs, const char *bs_name)
>       DirtyBitmapMigBitmapState *dbms;
>       Error *local_err = NULL;
>   
> -    bitmap = bdrv_dirty_bitmap_first(bs);
> +    FOR_EACH_DIRTY_BITMAP(bs, bitmap) {
> +        if (bdrv_dirty_bitmap_name(bitmap)) {
> +            break;
> +        }
> +    }
>       if (!bitmap) {
>           return 0;
>       }
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org



  reply	other threads:[~2020-06-26 14:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-26 13:06 [PATCH] migration/block-dirty-bitmap: fix add_bitmaps_to_list Vladimir Sementsov-Ogievskiy
2020-06-26 14:34 ` Eric Blake [this message]
2020-06-26 16:48   ` Vladimir Sementsov-Ogievskiy

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=20eed09c-f667-ab71-9d1a-a08c0c9d6a65@redhat.com \
    --to=eblake@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=fam@euphon.net \
    --cc=jsnow@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=vsementsov@virtuozzo.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).