From: Eric Blake <eblake@redhat.com>
To: mgreger@cinci.rr.com, qemu-devel@nongnu.org,
qemu block <qemu-block@nongnu.org>
Subject: Re: [Qemu-devel] QCow2 compression
Date: Mon, 29 Feb 2016 08:54:21 -0700 [thread overview]
Message-ID: <56D469AD.3060308@redhat.com> (raw)
In-Reply-To: <56D45CDD.40400@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 994 bytes --]
On 02/29/2016 07:59 AM, Eric Blake wrote:
>> an L2 entry value of 4A C0 00 00 00 3D 97 50.
>
> So with default 64k clusters, x = 62 - (16 - 8) = 54. Bits 0-54 are 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 should
> improve the qcow2 spec to make it obvious:
>
> - Size of compressed clusters is stored in sectors to reduce bit usage
> in the cluster offsets.
>
> 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 smallest
> 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 myself.
--
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:[~2016-02-29 15:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-27 5:00 [Qemu-devel] QCow2 compression mgreger
2016-02-29 14:01 ` Kevin Wolf
2016-02-29 15:58 ` Eric Blake
2016-02-29 14:59 ` Eric Blake
2016-02-29 15:54 ` Eric Blake [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-03-04 4:24 mgreger
2016-03-04 22:19 ` Eric Blake
2016-03-05 0:11 mgreger
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=56D469AD.3060308@redhat.com \
--to=eblake@redhat.com \
--cc=mgreger@cinci.rr.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).