Received: from eggs.gnu.org ([2001:4830:134:3::10]:33653) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtzPr-0001VV-1K for qemu-devel@nongnu.org; Thu, 27 Nov 2014 08:47:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XtzPh-00009c-Vg for qemu-devel@nongnu.org; Thu, 27 Nov 2014 08:47:26 -0500 Received: from mail-wi0-x236.google.com ([2a00:1450:400c:c05::236]:47360) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtzPh-00009P-Og for qemu-devel@nongnu.org; Thu, 27 Nov 2014 08:47:17 -0500 Received: by mail-wi0-f182.google.com with SMTP id h11so8399104wiw.3 for ; Thu, 27 Nov 2014 05:47:17 -0800 (PST) Date: Thu, 27 Nov 2014 13:47:13 +0000 From: Stefan Hajnoczi Message-ID: <20141127134713.GA15586@stefanha-thinkpad.lan> References: <1416503198-17031-1-git-send-email-mreitz@redhat.com> <1416503198-17031-3-git-send-email-mreitz@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Kj7319i9nmIyA2yE" Content-Disposition: inline In-Reply-To: <1416503198-17031-3-git-send-email-mreitz@redhat.com> Subject: Re: [Qemu-devel] [PATCH v3 02/22] qcow2: Add refcount_width to format-specific info List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: Kevin Wolf , qemu-devel@nongnu.org, Stefan Hajnoczi --Kj7319i9nmIyA2yE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 20, 2014 at 06:06:18PM +0100, Max Reitz wrote: > Add the bit width of every refcount entry to the format-specific > information. >=20 > In contrast to lazy_refcounts and the corrupt flag, this should be > always emitted, even for compat=3D0.10 although it does not support any > refcount width other than 16 bits. This is because if a boolean is > optional, one normally assumes it to be false when omitted; but if an > integer is not specified, it is rather difficult to guess its value. >=20 > This new field breaks some test outputs, fix them. >=20 > Signed-off-by: Max Reitz > Reviewed-by: Eric Blake > --- > block/qcow2.c | 4 +++- > qapi/block-core.json | 5 ++++- > tests/qemu-iotests/060.out | 1 + > tests/qemu-iotests/065 | 23 +++++++++++++++-------- > tests/qemu-iotests/067.out | 5 +++++ > tests/qemu-iotests/082.out | 7 +++++++ > tests/qemu-iotests/089.out | 2 ++ > 7 files changed, 37 insertions(+), 10 deletions(-) >=20 > diff --git a/block/qcow2.c b/block/qcow2.c > index f57aff9..d70e927 100644 > --- a/block/qcow2.c > +++ b/block/qcow2.c > @@ -2475,7 +2475,8 @@ static ImageInfoSpecific *qcow2_get_specific_info(B= lockDriverState *bs) > }; > if (s->qcow_version =3D=3D 2) { > *spec_info->qcow2 =3D (ImageInfoSpecificQCow2){ > - .compat =3D g_strdup("0.10"), > + .compat =3D g_strdup("0.10"), > + .refcount_width =3D s->refcount_bits, Why call it "width" in ImageInfoSpecificQCow2 when the qcow2 code calls it "bits"? IMO "bits" is clearer because it tells you the units, and it's more consistent. --Kj7319i9nmIyA2yE Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUdythAAoJEJykq7OBq3PIRtMH/0eIZmaDGgLSAnPwVoiAhwZf QxSISiBgpAAApIhPLQabnzrODrnw6eqnfkCFXyLI65bIjTajiEFzPY94P8kLNad3 HD/pCa4ozas+Pi0Pb0UEKoO09osYY5ZI+cLkoIMtXAEWepURcd2fOGgGDck5czBj AKq7PX42Y1S3xdeIjTKUtNYvqIYyL/Twvso2BYGsNWf94Y91CIzQ6j6dNp7VIL/6 TcpVYjmwX/jjVZnxpq18d3NL3RWzx1y6pg/NMzloffWcqYueNikdH2wz93ITOL1n WHNT1mshyrXxySvWZ9q4jOU47xmBGKI7LmMdaD/2a4oGjPNXnQz9LAZ8TyzkJ9c= =HCz0 -----END PGP SIGNATURE----- --Kj7319i9nmIyA2yE--