From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35940) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaQ9X-0002ri-79 for qemu-devel@nongnu.org; Mon, 29 Feb 2016 10:54:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aaQ9W-0002a6-8n for qemu-devel@nongnu.org; Mon, 29 Feb 2016 10:54:31 -0500 References: <20160227050038.X5XK3.255642.root@dnvrco-web06> <56D45CDD.40400@redhat.com> From: Eric Blake Message-ID: <56D469AD.3060308@redhat.com> Date: Mon, 29 Feb 2016 08:54:21 -0700 MIME-Version: 1.0 In-Reply-To: <56D45CDD.40400@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qGsHkw2lJrWtX4uNuRp1dbj0hBUQwpRjJ" Subject: Re: [Qemu-devel] QCow2 compression List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: mgreger@cinci.rr.com, qemu-devel@nongnu.org, qemu block This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --qGsHkw2lJrWtX4uNuRp1dbj0hBUQwpRjJ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 02/29/2016 07:59 AM, Eric Blake wrote: >> an L2 entry value of 4A C0 00 00 00 3D 97 50. >=20 > So with default 64k clusters, x =3D 62 - (16 - 8) =3D 54. Bits 0-54 ar= e the > host cluster offset, or 0x003d9750, but that is in terms of host > sectors. The comment in block/qcow2.c is telling, and perhaps we shoul= d > improve the qcow2 spec to make it obvious: >=20 > - Size of compressed clusters is stored in sectors to reduce bit usag= e > in the cluster offsets. >=20 > Thus, in your image, the guest compressed data starts at sector > 0x003d9750, or host file offset 0x7b2ea000. This value is NOT aligned > to a cluster, but IS aligned to a sector (since a sector is the smalles= t > unit we write to), and makes more sense than something ending in 0x50 > (which is not sector aligned). Disclaimer - I did not test things, so I may be misreading the spec mysel= f. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --qGsHkw2lJrWtX4uNuRp1dbj0hBUQwpRjJ 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 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJW1GmtAAoJEKeha0olJ0NqYnAH/iMvD/fBU7BJ56VClRyqcXRf p4q4vOrmfKcBE5LdwC0YoFuNY+bYe/jN32FyKrmjHdJbWs0lo+XoFABBmt1Wi1DF ZWi47Uwl2bSOsc7Ege82A0oB7M3OEs7v/vffIKA3cXFg/WMJhpw6hnbjnhkoc4tm NOUBtnyG0vwalVTRzUSP2Nzk/M0cLayLU1y6IvaVIkt/NuU+m5OQrfJtNiET/5zN NcPsEhHMPBDYMWEdjrs4LylnBVJ6k7vkJhnwn1qQb3Tn7rKsquITM0illcD3ll0n 9G2C2t8Wx5llPLdlhWnUAYEHKr1fqF7I5LqlDm9WrI+KC380vMDsMOLvJ2qR5rg= =/CCy -----END PGP SIGNATURE----- --qGsHkw2lJrWtX4uNuRp1dbj0hBUQwpRjJ--