From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: Eric Blake <eblake@redhat.com>, John Snow <jsnow@redhat.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"qemu-block@nongnu.org" <qemu-block@nongnu.org>
Cc: "kwolf@redhat.com" <kwolf@redhat.com>,
"fam@euphon.net" <fam@euphon.net>,
"mreitz@redhat.com" <mreitz@redhat.com>,
Denis Lunev <den@virtuozzo.com>,
"armbru@redhat.com" <armbru@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 1/2] qapi: support external bitmaps in block-dirty-bitmap-merge
Date: Fri, 17 May 2019 14:09:21 +0000 [thread overview]
Message-ID: <efe6d8d3-ba5f-88f6-c8b0-d4037ba678e2@virtuozzo.com> (raw)
In-Reply-To: <2f7d9ea8-765b-fad1-36d5-225f3b4b2ccc@redhat.com>
17.05.2019 16:50, Eric Blake wrote:
> On 5/16/19 7:32 PM, John Snow wrote:
>>
>>
>> On 5/16/19 8:27 AM, Vladimir Sementsov-Ogievskiy wrote:
>>> Add new optional parameter making possible to merge bitmaps from
>>> different nodes. It is needed to maintain external snapshots during
>>> incremental backup chain history.
>>>
>>> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
>>> ---
>>> qapi/block-core.json | 13 ++++++++++---
>>> block/dirty-bitmap.c | 9 ++++++---
>>> blockdev.c | 46 ++++++++++++++++++++++++++++++--------------
>>> 3 files changed, 48 insertions(+), 20 deletions(-)
>
>>> -# @bitmaps: name(s) of the source dirty bitmap(s)
>>> +# @bitmaps: name(s) of the source dirty bitmap(s). The field is optional
>>> +# since 4.1.
>>> +#
>>> +# @external-bitmaps: additional list of source dirty bitmaps with specified
>>> +# nodes, which allows merging bitmaps between different
>>> +# nodes. (Since: 4.1)
>>> #
>>> # Since: 4.0
>>> ##
>>> { 'struct': 'BlockDirtyBitmapMerge',
>>> - 'data': { 'node': 'str', 'target': 'str', 'bitmaps': ['str'] } }
>>> + 'data': { 'node': 'str', 'target': 'str', '*bitmaps': ['str'],
>>> + '*external-bitmaps': ['BlockDirtyBitmap'] } }
>>>
>>
>> I guess you can specify one, or both, or maybe neither! Seems fine.
>
>
>>
>> I don't think I like the name "external-bitmaps" but I guess I don't
>> really have a better suggestion.
>
> I do - we could use an alternate type instead:
>
> { 'alternate': 'BitmapSource',
> 'data': { 'local': 'str',
> 'external': 'BlockDirtyBitmap' } }
>
> then use 'bitmaps': ['BitmapSource']
>
> so that the caller can pass:
>
> "bitmaps": [ "bitmap1", { "node": "other", "name", "bitmap2" } ]
>
> and we only have to deal with one array at all times, and not have the
> name 'external-bitmaps' to worry about.
>
Oh, I wanted to do something like this, but looked at union type, which also needs some
discriminator field, and decided that it's impossible to make it backward-compatible.
Will resend.
--
Best regards,
Vladimir
next prev parent reply other threads:[~2019-05-17 14:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-16 12:27 [Qemu-devel] [PATCH 0/2] bitmaps: merge bitmaps from different nodes Vladimir Sementsov-Ogievskiy
2019-05-16 12:27 ` [Qemu-devel] [PATCH 1/2] qapi: support external bitmaps in block-dirty-bitmap-merge Vladimir Sementsov-Ogievskiy
2019-05-17 0:32 ` John Snow
2019-05-17 13:50 ` Eric Blake
2019-05-17 14:09 ` Vladimir Sementsov-Ogievskiy [this message]
2019-05-17 18:38 ` John Snow
2019-05-16 12:27 ` [Qemu-devel] [PATCH 2/2] iotests: test external snapshot with bitmap copying 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=efe6d8d3-ba5f-88f6-c8b0-d4037ba678e2@virtuozzo.com \
--to=vsementsov@virtuozzo.com \
--cc=armbru@redhat.com \
--cc=den@virtuozzo.com \
--cc=eblake@redhat.com \
--cc=fam@euphon.net \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).