qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	Eric Blake <eblake@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:38:14 -0400	[thread overview]
Message-ID: <aca0021b-908c-7c22-df77-76411e0225f8@redhat.com> (raw)
In-Reply-To: <efe6d8d3-ba5f-88f6-c8b0-d4037ba678e2@virtuozzo.com>



On 5/17/19 10:09 AM, Vladimir Sementsov-Ogievskiy wrote:
> 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.
> 

Excellent! Thanks Eric!

--js


  reply	other threads:[~2019-05-17 18:42 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
2019-05-17 18:38         ` John Snow [this message]
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=aca0021b-908c-7c22-df77-76411e0225f8@redhat.com \
    --to=jsnow@redhat.com \
    --cc=armbru@redhat.com \
    --cc=den@virtuozzo.com \
    --cc=eblake@redhat.com \
    --cc=fam@euphon.net \
    --cc=kwolf@redhat.com \
    --cc=mreitz@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).