[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v9 24/34] qcow2: Add subcluster support to check_refcounts_l2
From: |
Max Reitz |
Subject: |
Re: [PATCH v9 24/34] qcow2: Add subcluster support to check_refcounts_l2() |
Date: |
Thu, 2 Jul 2020 15:32:38 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 |
On 28.06.20 13:02, Alberto Garcia wrote:
> The offset field of an uncompressed cluster's L2 entry must be aligned
> to the cluster size, otherwise it is invalid. If the cluster has no
> data then it means that the offset points to a preallocation, so we
> can clear the offset field without affecting the guest-visible data.
> This is what 'qemu-img check' does when run in repair mode.
>
> On traditional qcow2 images this can only happen when QCOW_OFLAG_ZERO
> is set, and repairing such entries turns the clusters from ZERO_ALLOC
> into ZERO_PLAIN.
>
> Extended L2 entries have no ZERO_ALLOC clusters and no QCOW_OFLAG_ZERO
> but the idea is the same: if none of the subclusters are allocated
> then we can clear the offset field and leave the bitmap untouched.
>
> Signed-off-by: Alberto Garcia <berto@igalia.com>
> ---
> block/qcow2-refcount.c | 16 +++++++++++-----
> tests/qemu-iotests/060.out | 2 +-
> 2 files changed, 12 insertions(+), 6 deletions(-)
Reviewed-by: Max Reitz <mreitz@redhat.com>
signature.asc
Description: OpenPGP digital signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH v9 24/34] qcow2: Add subcluster support to check_refcounts_l2(),
Max Reitz <=