qemu-devel
[Top][All Lists]
Advanced

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

Re: [RFC PATCH v2 09/26] qcow2: Add l2_entry_size()


From: Max Reitz
Subject: Re: [RFC PATCH v2 09/26] qcow2: Add l2_entry_size()
Date: Wed, 30 Oct 2019 17:47:44 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1

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 <address@hidden>
> ---
>  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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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