[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v13 02/17] qmp: Ensure consistent granularity ty
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v13 02/17] qmp: Ensure consistent granularity type |
Date: |
Mon, 16 Feb 2015 13:03:34 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
On 02/13/2015 03:08 PM, John Snow wrote:
> We treat this field with a variety of different types everywhere
> in the code. Now it's just uint32_t.
>
> Signed-off-by: John Snow <address@hidden>
> ---
> block.c | 11 ++++++-----
> block/mirror.c | 4 ++--
> include/block/block.h | 2 +-
> include/block/block_int.h | 2 +-
> qapi/block-core.json | 2 +-
> 5 files changed, 11 insertions(+), 10 deletions(-)
>
> +++ b/qapi/block-core.json
> @@ -335,7 +335,7 @@
> # Since: 1.3
> ##
> { 'type': 'BlockDirtyInfo',
> - 'data': {'*name': 'str', 'count': 'int', 'granularity': 'int'} }
> + 'data': {'*name': 'str', 'count': 'int', 'granularity': 'uint32'} }
The wire format of QMP is unchanged. Prior to this patch, a user could
pass a value larger than 4G and get past initial validation, but as
other code then capped the value (for example, drive-mirror caps at a
maximum of 64M), we aren't changing working semantics. Narrowing a type
is not always backwards-compatible, but in this case it looks fine. So:
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v13 00/17] block: incremental backup series, John Snow, 2015/02/13
- [Qemu-devel] [PATCH v13 04/17] block: Introduce bdrv_dirty_bitmap_granularity(), John Snow, 2015/02/13
- [Qemu-devel] [PATCH v13 01/17] qapi: Add optional field "name" to block dirty bitmap, John Snow, 2015/02/13
- [Qemu-devel] [PATCH v13 02/17] qmp: Ensure consistent granularity type, John Snow, 2015/02/13
- [Qemu-devel] [PATCH v13 05/17] hbitmap: add hbitmap_merge, John Snow, 2015/02/13
- [Qemu-devel] [PATCH v13 07/17] block: Add bitmap successors, John Snow, 2015/02/13
- [Qemu-devel] [PATCH v13 09/17] qmp: add block-dirty-bitmap-clear, John Snow, 2015/02/13
- [Qemu-devel] [PATCH v13 06/17] qmp: Add block-dirty-bitmap-enable and block-dirty-bitmap-disable, John Snow, 2015/02/13
- [Qemu-devel] [PATCH v13 03/17] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove, John Snow, 2015/02/13