qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [Qemu-devel] QCow2 compression


From: Eric Blake
Subject: Re: [Qemu-block] [Qemu-devel] QCow2 compression
Date: Mon, 29 Feb 2016 08:54:21 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

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: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]