[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 10/21] qmp: Add support of "dirty-bitmap" syn
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v5 10/21] qmp: Add support of "dirty-bitmap" sync mode for drive-backup |
Date: |
Fri, 17 Apr 2015 17:10:19 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
On 04/17/2015 05:02 PM, John Snow wrote:
>>> { 'type': 'DriveBackup',
>>> 'data': { 'device': 'str', 'target': 'str', '*format': 'str',
>>> 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode',
>>> - '*speed': 'int',
>>> + '*speed': 'int', '*bitmap': 'str',
>>
>> Looks okay. Is it an error if bitmap is supplied, but mode is not
>> dirty-bitmap? Likewise, if mode is dirty-bitmap but bitmap is not
>> supplied?
>>
>
> Yes:
Then we _could_ do this as a flat union (here, using a shorthand syntax
of anonymous inline types, although qapi does not yet support it):
{ 'type': 'DriveBackupBase',
'data': { 'device': 'str', 'target': 'str', '*format': 'str',
'sync': 'MirrorSyncMode', '*mode': 'NewImageMode',
'*speed': 'int', '*on-source-error': 'BlockdevOnError',
'*on-target-error': 'BlockdevOnError' } }
{ 'union': 'DriveBackup', 'base': 'DriveBackupBase',
'discriminator': 'sync',
'data': { 'top': {}, 'full': {}, 'none': {},
'dirty-bitmap': { 'bitmap': 'str' } } }
which would enforce that 'bitmap' be present exactly when
'sync':'dirty-bitmap'. But that's probably overkill; I don't expect you
to do it (especially since qapi shorthand for anonymous inline types is
not there yet).
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH v5 09/21] block: Add bitmap successors, (continued)
- [Qemu-devel] [PATCH v5 11/21] qmp: add block-dirty-bitmap-clear, John Snow, 2015/04/08
- [Qemu-devel] [PATCH v5 15/21] block: Resize bitmaps on bdrv_truncate, John Snow, 2015/04/08
- [Qemu-devel] [PATCH v5 17/21] iotests: add invalid input incremental backup tests, John Snow, 2015/04/08
- [Qemu-devel] [PATCH v5 16/21] hbitmap: truncate tests, John Snow, 2015/04/08
- [Qemu-devel] [PATCH v5 14/21] block: Ensure consistent bitmap function prototypes, John Snow, 2015/04/08
- [Qemu-devel] [PATCH v5 20/21] iotests: add incremental backup failure recovery test, John Snow, 2015/04/08