From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57009) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1delDZ-0007SI-90 for qemu-devel@nongnu.org; Mon, 07 Aug 2017 12:49:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1delDU-0005RK-FG for qemu-devel@nongnu.org; Mon, 07 Aug 2017 12:49:25 -0400 From: Juan Quintela In-Reply-To: <1502117160-24655-18-git-send-email-armbru@redhat.com> (Markus Armbruster's message of "Mon, 7 Aug 2017 16:45:21 +0200") References: <1502117160-24655-1-git-send-email-armbru@redhat.com> <1502117160-24655-18-git-send-email-armbru@redhat.com> Reply-To: quintela@redhat.com Date: Mon, 07 Aug 2017 18:48:59 +0200 Message-ID: <87d187e32c.fsf@secure.mitica> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [RFC PATCH 17/56] migration: Make MigrationStats sizes unsigned in QAPI/QMP List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: qemu-devel@nongnu.org, eblake@redhat.com, kwolf@redhat.com, mreitz@redhat.com, jcody@redhat.com, famz@redhat.com, jsnow@redhat.com, pbonzini@redhat.com, marcandre.lureau@redhat.com, dgilbert@redhat.com, berrange@redhat.com, qemu-block@nongnu.org Markus Armbruster 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 Reviewed-by: Juan Quintela > --- > 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: