[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [RFC PATCH 17/56] migration: Make MigrationStats sizes
From: |
Juan Quintela |
Subject: |
Re: [Qemu-block] [RFC PATCH 17/56] migration: Make MigrationStats sizes unsigned in QAPI/QMP |
Date: |
Mon, 07 Aug 2017 18:48:59 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
Markus Armbruster <address@hidden> wrote:
> Sizes should use QAPI type 'size' (uint64_t). MigrationStats members
> @transferred, @remaining, @total, @normal-bytes, @page-size are 'int'
> (int64_t). populate_ram_info(), populate_disk_info() and and many
> places that update them in global variable @ram_counters implicitly
> convert from unsigned types.
>
> Change these MigrationStats members to 'size'.
>
> query-migrate now reports them correctly above 2^63-1 instead of their
> (negative) two's complement.
>
> HMP's "info migrate" already reported them correctly, because it
> printed the signed integer with PRIu64.
>
> Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
> ---
> qapi-schema.json | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/qapi-schema.json b/qapi-schema.json
> index 4a3d07e..2eee676 100644
> --- a/qapi-schema.json
> +++ b/qapi-schema.json
> @@ -620,11 +620,11 @@
> # Since: 0.14.0
> ##
> { 'struct': 'MigrationStats',
> - 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
> + 'data': {'transferred': 'size', 'remaining': 'size', 'total': 'size' ,
> 'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
> - 'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
> + 'normal-bytes': 'size', 'dirty-pages-rate' : 'int',
> 'mbps' : 'number', 'dirty-sync-count' : 'int',
> - 'postcopy-requests' : 'int', 'page-size' : 'int' } }
> + 'postcopy-requests' : 'int', 'page-size' : 'size' } }
I would expect page-size to not be so big, but who knows O:-)
>
> ##
> # @XBZRLECacheStats:
- [Qemu-block] [RFC PATCH 01/56] qobject: Touch up comments to say @param instead of 'param', (continued)
- [Qemu-block] [RFC PATCH 01/56] qobject: Touch up comments to say @param instead of 'param', Markus Armbruster, 2017/08/07
- [Qemu-block] [RFC PATCH 13/56] pci: Make PCI addresses and sizes unsigned in QAPI/QMP, Markus Armbruster, 2017/08/07
- [Qemu-block] [RFC PATCH 16/56] migration: Make XBZRLE transferred size unsigned in QAPI/QMP, Markus Armbruster, 2017/08/07
- [Qemu-block] [RFC PATCH 11/56] monitor: Drop unused HMP .args_type 'M', Markus Armbruster, 2017/08/07
- [Qemu-block] [RFC PATCH 17/56] migration: Make MigrationStats sizes unsigned in QAPI/QMP, Markus Armbruster, 2017/08/07
- Re: [Qemu-block] [RFC PATCH 17/56] migration: Make MigrationStats sizes unsigned in QAPI/QMP,
Juan Quintela <=
- [Qemu-block] [RFC PATCH 19/56] block: Make snapshot VM state size unsigned in QAPI/QMP, Markus Armbruster, 2017/08/07
- [Qemu-block] [RFC PATCH 21/56] block: Clean up get_human_readable_size(), Markus Armbruster, 2017/08/07
- [Qemu-block] [RFC PATCH 22/56] block: Mix up signed and unsigned less in bdrv_img_create(), Markus Armbruster, 2017/08/07
- [Qemu-block] [RFC PATCH 25/56] block/qcow2: Change qcow2_calc_prealloc_size() to uint64_t, Markus Armbruster, 2017/08/07
- [Qemu-block] [RFC PATCH 02/56] qdict: New helpers to put and get unsigned integers, Markus Armbruster, 2017/08/07
- [Qemu-block] [RFC PATCH 06/56] char: Don't truncate -chardev and HMP chardev-add ringbuf size, Markus Armbruster, 2017/08/07
- [Qemu-block] [RFC PATCH 18/56] migration: Make parameter max-bandwidth unsigned in QAPI/QMP, Markus Armbruster, 2017/08/07