Markus Armbruster <arm...@redhat.com> 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 <arm...@redhat.com>

Reviewed-by: Juan Quintela <quint...@redhat.com>


> ---
>  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:

Reply via email to