From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43018) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOwZS-0005Zj-5m for qemu-devel@nongnu.org; Tue, 02 Sep 2014 18:29:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XOwZN-0002W3-7P for qemu-devel@nongnu.org; Tue, 02 Sep 2014 18:29:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41253) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOwZM-0002Vw-UF for qemu-devel@nongnu.org; Tue, 02 Sep 2014 18:28:57 -0400 Message-ID: <540644A5.8010100@redhat.com> Date: Tue, 02 Sep 2014 16:28:53 -0600 From: Eric Blake MIME-Version: 1.0 References: <1409696709-27623-1-git-send-email-mreitz@redhat.com> <1409696709-27623-3-git-send-email-mreitz@redhat.com> In-Reply-To: <1409696709-27623-3-git-send-email-mreitz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="UlDK8DpULgNw8LvF7OjPKk011m07HKpdr" Subject: Re: [Qemu-devel] [PATCH v2 2/3] docs/qcow2: Correct refcount_block_entries List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-devel@nongnu.org Cc: Kevin Wolf , =?UTF-8?B?QmVub8OudCBDYW5ldA==?= , Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --UlDK8DpULgNw8LvF7OjPKk011m07HKpdr Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 09/02/2014 04:25 PM, Max Reitz wrote: > A refblock entry may have a different size than 16 bits, it may even be= > smaller than a byte. Correct the refcount_block_entries calculation > accordingly. >=20 > Signed-off-by: Max Reitz > --- > docs/specs/qcow2.txt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Eric Blake >=20 > diff --git a/docs/specs/qcow2.txt b/docs/specs/qcow2.txt > index cfbc8b0..0a878aa 100644 > --- a/docs/specs/qcow2.txt > +++ b/docs/specs/qcow2.txt > @@ -183,7 +183,7 @@ blocks and are exactly one cluster in size. > Given a offset into the image file, the refcount of its cluster can be= obtained > as follows: > =20 > - refcount_block_entries =3D (cluster_size / sizeof(uint16_t)) > + refcount_block_entries =3D (cluster_size * 8 / refcount_bits) > =20 > refcount_block_index =3D (offset / cluster_size) % refcount_block_= entries > refcount_table_index =3D (offset / cluster_size) / refcount_block_= entries >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --UlDK8DpULgNw8LvF7OjPKk011m07HKpdr 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 iQEcBAEBCAAGBQJUBkSlAAoJEKeha0olJ0Nqg74H+wTiN2tHWUO9IEUgt2xtWzuq 9MCDlo4krkkhRHKWPDw1/Mkffnpn5DOnPUDLhckS0EjgEM/Vu6YpNxx5i4GCF/RX ti2A/0o/2kwidYHVRCP3I/lQs4IhB611DUvBC/72cOya8X1OW2AmMcBdKaUdSFob SELK5f27qt+nkxREUdDmpubTkqeEBBV4yRXIP/idh3hC9whoCgE5k+GoSjqe5HYD EVEm8miGQK4moAzP9emvBif4Acu+mg9g2gdG5ZSXc+KQjn9WIDq7VTyLhByUr4B5 Rh0YvrvxBT9sZNFgUS4+c8PVg2rc3/dPZdyLvyEanAcYtrQBA736nHl0JT9UYMA= =kA0x -----END PGP SIGNATURE----- --UlDK8DpULgNw8LvF7OjPKk011m07HKpdr--