qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: John Snow <jsnow@redhat.com>,
	Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org
Cc: kwolf@redhat.com, fam@euphon.net, mreitz@redhat.com,
	den@virtuozzo.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 08:50:57 -0500	[thread overview]
Message-ID: <2f7d9ea8-765b-fad1-36d5-225f3b4b2ccc@redhat.com> (raw)
In-Reply-To: <04af0995-a4ef-d9cc-b4ca-1a5e837aafe1@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1992 bytes --]

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.

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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2019-05-17 13:55 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 [this message]
2019-05-17 14:09       ` Vladimir Sementsov-Ogievskiy
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=2f7d9ea8-765b-fad1-36d5-225f3b4b2ccc@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=den@virtuozzo.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 \
    --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).