[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
signature.asc
Description: OpenPGP digital signature
- [RFC PATCH v2 05/26] qcow2: Document the Extended L2 Entries feature, (continued)
- [RFC PATCH v2 05/26] qcow2: Document the Extended L2 Entries feature, Alberto Garcia, 2019/10/26
- [RFC PATCH v2 01/26] qcow2: Add calculate_l2_meta(), Alberto Garcia, 2019/10/26
- [RFC PATCH v2 15/26] qcow2: Add subcluster support to zero_in_l2_slice(), Alberto Garcia, 2019/10/26
- [RFC PATCH v2 07/26] qcow2: Add subcluster-related fields to BDRVQcow2State, Alberto Garcia, 2019/10/26
- [RFC PATCH v2 09/26] qcow2: Add l2_entry_size(), Alberto Garcia, 2019/10/26
- Re: [RFC PATCH v2 09/26] qcow2: Add l2_entry_size(),
Max Reitz <=
- [RFC PATCH v2 17/26] qcow2: Add subcluster support to check_refcounts_l2(), Alberto Garcia, 2019/10/26
- [RFC PATCH v2 02/26] qcow2: Split cluster_needs_cow() out of count_cow_clusters(), Alberto Garcia, 2019/10/26
- [RFC PATCH v2 20/26] qcow2: Update L2 bitmap in qcow2_alloc_cluster_link_l2(), Alberto Garcia, 2019/10/26
- [RFC PATCH v2 12/26] qcow2: Handle QCOW2_CLUSTER_UNALLOCATED_SUBCLUSTER, Alberto Garcia, 2019/10/26
- [RFC PATCH v2 23/26] qcow2: Restrict qcow2_co_pwrite_zeroes() to full clusters only, Alberto Garcia, 2019/10/26
- [RFC PATCH v2 11/26] qcow2: Add qcow2_get_subcluster_type(), Alberto Garcia, 2019/10/26
- [RFC PATCH v2 19/26] qcow2: Fix offset calculation in handle_dependencies(), Alberto Garcia, 2019/10/26
- [RFC PATCH v2 03/26] qcow2: Process QCOW2_CLUSTER_ZERO_ALLOC clusters in handle_copied(), Alberto Garcia, 2019/10/26