From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33661) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaQ1l-0006at-Pn for qemu-devel@nongnu.org; Mon, 29 Feb 2016 10:46:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aaQ1g-0000Ff-5i for qemu-devel@nongnu.org; Mon, 29 Feb 2016 10:46:29 -0500 References: <1456758714-12609-1-git-send-email-eblake@redhat.com> <56D466F1.8090104@redhat.com> From: Max Reitz Message-ID: <56D467C5.9030402@redhat.com> Date: Mon, 29 Feb 2016 16:46:13 +0100 MIME-Version: 1.0 In-Reply-To: <56D466F1.8090104@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="D0SdPDO3lVk50FlgPQC2m5L5H7KP7AJkf" Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] qcow2: Clarify that compressed cluster offset requires shift List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , qemu-devel@nongnu.org Cc: mgreger@cinci.rr.com, qemu-block@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --D0SdPDO3lVk50FlgPQC2m5L5H7KP7AJkf Content-Type: multipart/mixed; boundary="xTO1fL1LOIFQt3KCeJ3vfvFd66K1bwLk6" From: Max Reitz To: Eric Blake , qemu-devel@nongnu.org Cc: mgreger@cinci.rr.com, qemu-block@nongnu.org Message-ID: <56D467C5.9030402@redhat.com> Subject: Re: [Qemu-block] [PATCH] qcow2: Clarify that compressed cluster offset requires shift References: <1456758714-12609-1-git-send-email-eblake@redhat.com> <56D466F1.8090104@redhat.com> In-Reply-To: <56D466F1.8090104@redhat.com> --xTO1fL1LOIFQt3KCeJ3vfvFd66K1bwLk6 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 29.02.2016 16:42, Max Reitz wrote: > On 29.02.2016 16:11, Eric Blake wrote: >> The specs for the host cluster offset of a compressed cluster >> were not clear that the offset is in terms of sectors, and requires >> a shift by 9 to be a byte offset. Add some more text to make the >> interpretation obvious. >> >> CC: mgreger@cinci.rr.com >> Signed-off-by: Eric Blake >> --- >> docs/specs/qcow2.txt | 9 +++++++-- >> 1 file changed, 7 insertions(+), 2 deletions(-) >> >> diff --git a/docs/specs/qcow2.txt b/docs/specs/qcow2.txt >> index 80cdfd0..7049415 100644 >> --- a/docs/specs/qcow2.txt >> +++ b/docs/specs/qcow2.txt >> @@ -323,11 +323,16 @@ Standard Cluster Descriptor: >> >> Compressed Clusters Descriptor (x =3D 62 - (cluster_bits - 8)): >> >> - Bit 0 - x: Host cluster offset. This is usually _not_ aligne= d to a >> - cluster boundary! >> + Bit 0 - x: Bits 9-(x+9) of host cluster offset. This is >=20 > I'd rather use one of "9..(x+9)", "[9, x+9]", "9 - (x+9)", "9=E2=80=94(= x+9)" in > order to clarify that this is not a minus but a range. =2E..unless, of course, this is actually a byte offset, which it seems to= be, judging from qcow2_get_cluster_offset() (and qcow2_decompress_cluster(), as Kevin said on IRC). Max --xTO1fL1LOIFQt3KCeJ3vfvFd66K1bwLk6-- --D0SdPDO3lVk50FlgPQC2m5L5H7KP7AJkf Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJW1GfFAAoJEDuxQgLoOKyt83MH/AqjL5CEmjDgdjDFWPZ+1ikZ wJ7nE/T6/4FmpzRrHN4737xcLdVDndVGBPIDIXkq0GHz3/1rTKYnVt/ltEpfZJfg 9WeKwrc2D7hFJCUoFoyiIBoWepeidGYxDZQE4npR1z3HNN7cooWo5HIAVO/tiLMP HBgqZCyex5Chu9IyY/sz0uOQvkSypxHIXYx4XNXY6CrvVFaQdTmgtponmGa8lPQn xKip+qpRtuIlap/2KvRCxcmGLgPdOk468FSYdbDU7ADtwD4f8oZ70kHqMGQX6LV8 rUMMUNfhSe2amBlabjMKKMz7r6UUP5kF+rFoXviaNHInlIU1Hg0rz4Y9zNZynG0= =NePM -----END PGP SIGNATURE----- --D0SdPDO3lVk50FlgPQC2m5L5H7KP7AJkf--