From: Eric Blake <eblake@redhat.com>
To: Peter Krempa <pkrempa@redhat.com>, qemu-devel@nongnu.org
Cc: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
John Snow <jsnow@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
qemu-block@nongnu.org
Subject: Re: [PATCH 1/2] migration: dirty-bitmap: Convert alias map inner members to a struct
Date: Thu, 4 Feb 2021 13:12:12 -0600 [thread overview]
Message-ID: <f340cee7-21fd-4398-2d0f-a9c68c44be72@redhat.com> (raw)
In-Reply-To: <8e40a7337e3b9a0a4f11ee3b0e2f3ae4c76f2dbd.1612356810.git.pkrempa@redhat.com>
On 2/3/21 6:59 AM, Peter Krempa wrote:
> Currently the alias mapping hash stores just strings of the target
> objects internally. In further patches we'll be adding another member
> which will need to be stored in the map so convert the members to a
> struct.
>
> Signed-off-by: Peter Krempa <pkrempa@redhat.com>
> ---
> migration/block-dirty-bitmap.c | 37 ++++++++++++++++++++++++++++------
> 1 file changed, 31 insertions(+), 6 deletions(-)
>
> diff --git a/migration/block-dirty-bitmap.c b/migration/block-dirty-bitmap.c
> index c61d382be8..b0403dd00c 100644
> --- a/migration/block-dirty-bitmap.c
> +++ b/migration/block-dirty-bitmap.c
> @@ -169,6 +169,18 @@ typedef struct DBMState {
>
> static DBMState dbm_state;
>
> +typedef struct AliasMapInnerBitmap {
> + char *string;
> +} AliasMapInnerBitmap;
> +
> +static void free_alias_map_inner_bitmap(void *amin_ptr)
> +{
> + AliasMapInnerBitmap *amin = amin_ptr;
> +
> + g_free(amin->string);
Do we want to allow free_alias_map_inner_bitmap(NULL)?
Looks like this patch works without it, but it's less future proof, so I
can add that if you agree.
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
next prev parent reply other threads:[~2021-02-04 19:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-03 12:59 [PATCH 0/2] migration: dirty-bitmap: Allow control of bitmap persistence on destination Peter Krempa
2021-02-03 12:59 ` [PATCH 1/2] migration: dirty-bitmap: Convert alias map inner members to a struct Peter Krempa
2021-02-04 19:12 ` Eric Blake [this message]
2021-02-05 7:04 ` Vladimir Sementsov-Ogievskiy
2021-02-03 13:00 ` [PATCH 2/2] migration: dirty-bitmap: Allow control of bitmap persistence on destination Peter Krempa
2021-02-03 13:23 ` Vladimir Sementsov-Ogievskiy
2021-02-03 13:27 ` Peter Krempa
2021-02-03 13:39 ` Peter Krempa
2021-02-03 14:14 ` Vladimir Sementsov-Ogievskiy
2021-02-04 19:15 ` Eric Blake
2021-02-05 8:01 ` 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=f340cee7-21fd-4398-2d0f-a9c68c44be72@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=jsnow@redhat.com \
--cc=pkrempa@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--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).