[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 12/21] qmp: Add dirty bitmap status field in
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v6 12/21] qmp: Add dirty bitmap status field in query-block |
Date: |
Wed, 22 Apr 2015 16:18:03 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
On 04/17/2015 05:50 PM, John Snow wrote:
> Add the "frozen" status booleans, to inform clients
> when a bitmap is occupied doing a task.
>
> Signed-off-by: Fam Zheng <address@hidden>
> Signed-off-by: John Snow <address@hidden>
> Reviewed-by: Max Reitz <address@hidden>
> Reviewed-by: Stefan Hajnoczi <address@hidden>
> Reviewed-by: Eric Blake <address@hidden>
> ---
> block.c | 1 +
> qapi/block-core.json | 5 ++++-
> 2 files changed, 5 insertions(+), 1 deletion(-)
> +++ b/qapi/block-core.json
> @@ -336,10 +336,13 @@
> #
> # @granularity: granularity of the dirty bitmap in bytes (since 1.4)
> #
> +# @frozen: whether the dirty bitmap is frozen (Since 2.4)
> +#
> # Since: 1.3
> ##
> { 'type': 'BlockDirtyInfo',
> - 'data': {'*name': 'str', 'count': 'int', 'granularity': 'uint32'} }
> + 'data': {'*name': 'str', 'count': 'int', 'granularity': 'uint32',
> + 'frozen': 'bool'} }
Just thinking aloud here - internally, we have a tri-state situation
(enabled, disabled, or frozen). I know we aren't exposing disabled to
the end user yet (no use case for that), but would it be better to make
this output an enum type (two values for now, 'enabled' and 'frozen') to
make it easier to add a third value later, without having to add yet
another boolean?
But it's not the end of the world to expose a single boolean now (we'd
just have to maintain it forever, even if we add later states), and
adding an enum now just adds complexity that we may not need, 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 v6 04/21] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove, (continued)
- [Qemu-devel] [PATCH v6 04/21] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove, John Snow, 2015/04/17
- [Qemu-devel] [PATCH v6 06/21] hbitmap: cache array lengths, John Snow, 2015/04/17
- [Qemu-devel] [PATCH v6 07/21] hbitmap: add hbitmap_merge, John Snow, 2015/04/17
- [Qemu-devel] [PATCH v6 08/21] block: Add bitmap disabled status, John Snow, 2015/04/17
- [Qemu-devel] [PATCH v6 13/21] block: add BdrvDirtyBitmap documentation, John Snow, 2015/04/17
- [Qemu-devel] [PATCH v6 12/21] qmp: Add dirty bitmap status field in query-block, John Snow, 2015/04/17
- Re: [Qemu-devel] [PATCH v6 12/21] qmp: Add dirty bitmap status field in query-block,
Eric Blake <=
- [Qemu-devel] [PATCH v6 11/21] qmp: add block-dirty-bitmap-clear, John Snow, 2015/04/17
- [Qemu-devel] [PATCH v6 09/21] block: Add bitmap successors, John Snow, 2015/04/17
- [Qemu-devel] [PATCH v6 10/21] qmp: Add support of "dirty-bitmap" sync mode for drive-backup, John Snow, 2015/04/17
- [Qemu-devel] [PATCH v6 14/21] block: Ensure consistent bitmap function prototypes, John Snow, 2015/04/17
- [Qemu-devel] [PATCH v6 16/21] hbitmap: truncate tests, John Snow, 2015/04/17
- [Qemu-devel] [PATCH v6 18/21] iotests: add QMP event waiting queue, John Snow, 2015/04/17