From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55748) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNRtQ-0006Cy-7U for qemu-devel@nongnu.org; Mon, 16 Feb 2015 15:03:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YNRtL-0000H2-CJ for qemu-devel@nongnu.org; Mon, 16 Feb 2015 15:03:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53864) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNRtL-0000Gs-2w for qemu-devel@nongnu.org; Mon, 16 Feb 2015 15:03:39 -0500 Message-ID: <54E24D16.2080200@redhat.com> Date: Mon, 16 Feb 2015 13:03:34 -0700 From: Eric Blake MIME-Version: 1.0 References: <1423865338-8576-1-git-send-email-jsnow@redhat.com> <1423865338-8576-3-git-send-email-jsnow@redhat.com> In-Reply-To: <1423865338-8576-3-git-send-email-jsnow@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="4RV68F9fanuk98UQbxm4fw4XQ3d91Eq4M" Subject: Re: [Qemu-devel] [PATCH v13 02/17] qmp: Ensure consistent granularity type List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow , qemu-devel@nongnu.org Cc: kwolf@redhat.com, famz@redhat.com, armbru@redhat.com, mreitz@redhat.com, vsementsov@parallels.com, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --4RV68F9fanuk98UQbxm4fw4XQ3d91Eq4M Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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. >=20 > Signed-off-by: John Snow > --- > 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(-) >=20 > +++ 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 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --4RV68F9fanuk98UQbxm4fw4XQ3d91Eq4M Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJU4k0WAAoJEKeha0olJ0NqgGEH/3kEbXR8F6mCwwbIjBjWk+jO b3NUjOBYVueZOvEseDNWHoQfaDiyhW7fKRMkLnZ6ifL+Gr8XdkxfBjD6zShBqfXG gNOxhHvtITInV9DoHmp7pErJP3fgWXnUExB4VMRWsIC6bk48UYrq7mgD/GaY8bb6 QuqMQ0Pz62ZsQUidpzhPy5tvrv8AHDMlkru91+Hsn8eldmYHXXh5L48ub6uRPGTX ULL/rln0KaM3UrchdbgxgQ/JFSsfM/QSJeedtSpvvIb/WrIR4jcUdb8WIxzGuBCm ODPQgVDT2iuy4A+eLgUDWzfWDW/aIpF8JOIQF3vGTY9jv8wxHHBNAOzQSD2xJNQ= =cYnw -----END PGP SIGNATURE----- --4RV68F9fanuk98UQbxm4fw4XQ3d91Eq4M--