[prev in list] [next in list] [prev in thread] [next in thread] 

List:       qemu-block
Subject:    Re: [RFC PATCH v2 09/26] qcow2: Add l2_entry_size()
From:       Max Reitz <mreitz () redhat ! com>
Date:       2019-10-30 16:47:44
Message-ID: ce89b231-c465-9104-a5d1-a151ef9494a5 () redhat ! com
[Download RAW message or body]

[Attachment #2 (multipart/mixed)]


On 26.10.19 23:25, Alberto Garcia wrote:
> qcow2 images with subclusters have 128-bit L2 entries. The first 64
> bits contain the same information as traditional images and the last
> 64 bits form a bitmap with the status of each individual subcluster.
> 
> Because of that we cannot assume that L2 entries are sizeof(uint64_t)
> anymore. This function returns the proper value for the image.
> 
> Signed-off-by: Alberto Garcia <berto@igalia.com>
> ---
>  block/qcow2-cluster.c  | 12 ++++++------
>  block/qcow2-refcount.c | 14 ++++++++------
>  block/qcow2.c          |  6 +++---
>  block/qcow2.h          |  5 +++++
>  4 files changed, 22 insertions(+), 15 deletions(-)

I suppose qcow2_calc_prealloc_size(), qcow2_co_truncate()
(nb_new_l2_tables), and qcow2_measure() (l2_tables) also need some
adjustment.

Max


["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic