From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57229) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnWE9-0005FC-Ad for qemu-devel@nongnu.org; Thu, 22 May 2014 12:52:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WnWE4-00057K-RV for qemu-devel@nongnu.org; Thu, 22 May 2014 12:52:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62391) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnWE4-00056v-Ja for qemu-devel@nongnu.org; Thu, 22 May 2014 12:52:16 -0400 Message-ID: <537E2B3A.1090605@redhat.com> Date: Thu, 22 May 2014 10:52:10 -0600 From: Eric Blake MIME-Version: 1.0 References: <1400751770-14594-1-git-send-email-stefanha@redhat.com> In-Reply-To: <1400751770-14594-1-git-send-email-stefanha@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="8TlbjC1na09jJSu96Hk1hBxl2CNjGBo5K" Subject: Re: [Qemu-devel] [PATCH] docs: clarify that qcow2 file size is not always a cluster multiple List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , qemu-devel@nongnu.org Cc: Kevin Wolf , Maria Kustova , =?UTF-8?B?QmVub8OudCBDYW5ldA==?= This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --8TlbjC1na09jJSu96Hk1hBxl2CNjGBo5K Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 05/22/2014 03:42 AM, Stefan Hajnoczi wrote: > Normally one would expect that qcow2 image file lengths are multiples o= f > the cluster size. This is not true in all cases and the spec should > document this so implementers remember to accept such files. >=20 > $ qemu-img create -f qcow2 foo.qcow2 2G > Formatting 'foo.qcow2', fmt=3Dqcow2 size=3D2147483648 encryption=3Doff = cluster_size=3D65536 lazy_refcounts=3Doff > $ ls -l foo.qcow2 > -rw-r--r-- 1 stefanha stefanha 197120 May 22 11:40 foo.qcow2 > $ bc -q > 3 * (64 * 1024) + 512 > 197120 >=20 > The extra sector are the 4 L1 table entries that a 2 GB disk with 64 KB= > cluster size needs. The rest of the L1 table is omitted from the file > but allocation will continue at the next cluster boundary. >=20 > Reported-by: Maria Kustova > Signed-off-by: Stefan Hajnoczi > --- > docs/specs/qcow2.txt | 4 ++++ > 1 file changed, 4 insertions(+) Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --8TlbjC1na09jJSu96Hk1hBxl2CNjGBo5K 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/ iQEcBAEBCAAGBQJTfis6AAoJEKeha0olJ0Nq/lgH/i6n33BPzr2bgVDvGbIJiSz4 T4Kf+dHhAC7vwOj4tKSDO64PmzydhWOmVMFc+YM7J6RkElIwc2maiBmTa2ZEScb3 i+UNawC7uBN4Xi4NLt+YH43QGXO3zDV74+pKv4hdqbgpZFhZPQbFj7Ud+BxoFdev +uql9GKA3L1xIQx56M/8DV3VkTEqdGbIXm118bdlH9uWGleoMdoUi62/12peiV7t Px06i/jON4Hbagh6YhU9Cx10KX6ZAS08E/j7/v0H0fvhhmeoKS56umpENQMFjkbe icYcQQj6nQw46rNN/rSJ58GW/udO+cjGniVDQ/Nm7tJhsgtMRZiLFY8K5l4Q98c= =jOGo -----END PGP SIGNATURE----- --8TlbjC1na09jJSu96Hk1hBxl2CNjGBo5K--