From: Eric Blake <eblake@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>, qemu-devel@nongnu.org
Cc: "Kevin Wolf" <kwolf@redhat.com>, "Maria Kustova" <maxa@catit.be>,
"Benoît Canet" <benoit@irqsave.net>
Subject: Re: [Qemu-devel] [PATCH] docs: clarify that qcow2 file size is not always a cluster multiple
Date: Thu, 22 May 2014 10:52:10 -0600 [thread overview]
Message-ID: <537E2B3A.1090605@redhat.com> (raw)
In-Reply-To: <1400751770-14594-1-git-send-email-stefanha@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1100 bytes --]
On 05/22/2014 03:42 AM, Stefan Hajnoczi wrote:
> Normally one would expect that qcow2 image file lengths are multiples of
> the cluster size. This is not true in all cases and the spec should
> document this so implementers remember to accept such files.
>
> $ qemu-img create -f qcow2 foo.qcow2 2G
> Formatting 'foo.qcow2', fmt=qcow2 size=2147483648 encryption=off cluster_size=65536 lazy_refcounts=off
> $ ls -l foo.qcow2
> -rw-r--r-- 1 stefanha stefanha 197120 May 22 11:40 foo.qcow2
> $ bc -q
> 3 * (64 * 1024) + 512
> 197120
>
> 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.
>
> Reported-by: Maria Kustova <maxa@catit.be>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
> docs/specs/qcow2.txt | 4 ++++
> 1 file changed, 4 insertions(+)
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2014-05-22 16:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-22 9:42 [Qemu-devel] [PATCH] docs: clarify that qcow2 file size is not always a cluster multiple Stefan Hajnoczi
2014-05-22 16:52 ` Eric Blake [this message]
2014-05-23 11:18 ` Kevin Wolf
2014-05-26 11:57 ` Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=537E2B3A.1090605@redhat.com \
--to=eblake@redhat.com \
--cc=benoit@irqsave.net \
--cc=kwolf@redhat.com \
--cc=maxa@catit.be \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).