[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v10 28/34] qcow2: Add subcluster support to qcow2_co_pwrite_z
From: |
Max Reitz |
Subject: |
Re: [PATCH v10 28/34] qcow2: Add subcluster support to qcow2_co_pwrite_zeroes() |
Date: |
Thu, 9 Jul 2020 14:16:08 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 |
On 03.07.20 17:58, Alberto Garcia wrote:
> This works now at the subcluster level and pwrite_zeroes_alignment is
> updated accordingly.
>
> qcow2_cluster_zeroize() is turned into qcow2_subcluster_zeroize() with
> the following changes:
>
> - The request can now be subcluster-aligned.
>
> - The cluster-aligned body of the request is still zeroized using
> zero_in_l2_slice() as before.
>
> - The subcluster-aligned head and tail of the request are zeroized
> with the new zero_l2_subclusters() function.
>
> There is just one thing to take into account for a possible future
> improvement: compressed clusters cannot be partially zeroized so
> zero_l2_subclusters() on the head or the tail can return -ENOTSUP.
> This makes the caller repeat the *complete* request and write actual
> zeroes to disk. This is sub-optimal because
>
> 1) if the head area was compressed we would still be able to use
> the fast path for the body and possibly the tail.
>
> 2) if the tail area was compressed we are writing zeroes to the
> head and the body areas, which are already zeroized.
>
> Signed-off-by: Alberto Garcia <berto@igalia.com>
> ---
> block/qcow2.h | 4 +--
> block/qcow2-cluster.c | 81 +++++++++++++++++++++++++++++++++++++++----
> block/qcow2.c | 33 +++++++++---------
> 3 files changed, 94 insertions(+), 24 deletions(-)
Reviewed-by: Max Reitz <mreitz@redhat.com>
signature.asc
Description: OpenPGP digital signature
- [PATCH v10 19/34] qcow2: Handle QCOW2_SUBCLUSTER_UNALLOCATED_ALLOC, (continued)
- [PATCH v10 19/34] qcow2: Handle QCOW2_SUBCLUSTER_UNALLOCATED_ALLOC, Alberto Garcia, 2020/07/03
- [PATCH v10 33/34] qcow2: Assert that expand_zero_clusters_in_l1() does not support subclusters, Alberto Garcia, 2020/07/03
- [PATCH v10 15/34] qcow2: Add qcow2_get_subcluster_range_type(), Alberto Garcia, 2020/07/03
- [PATCH v10 14/34] qcow2: Add QCow2SubclusterType and qcow2_get_subcluster_type(), Alberto Garcia, 2020/07/03
- [PATCH v10 21/34] qcow2: Add subcluster support to qcow2_get_host_offset(), Alberto Garcia, 2020/07/03
- [PATCH v10 20/34] qcow2: Add subcluster support to calculate_l2_meta(), Alberto Garcia, 2020/07/03
- [PATCH v10 23/34] qcow2: Add subcluster support to discard_in_l2_slice(), Alberto Garcia, 2020/07/03
- [PATCH v10 30/34] qcow2: Add prealloc field to QCowL2Meta, Alberto Garcia, 2020/07/03
- [PATCH v10 28/34] qcow2: Add subcluster support to qcow2_co_pwrite_zeroes(), Alberto Garcia, 2020/07/03
- Re: [PATCH v10 28/34] qcow2: Add subcluster support to qcow2_co_pwrite_zeroes(),
Max Reitz <=
- [PATCH v10 13/34] qcow2: Update get/set_l2_entry() and add get/set_l2_bitmap(), Alberto Garcia, 2020/07/03
- [PATCH v10 17/34] qcow2: Add cluster type parameter to qcow2_get_host_offset(), Alberto Garcia, 2020/07/03
- [PATCH v10 22/34] qcow2: Add subcluster support to zero_in_l2_slice(), Alberto Garcia, 2020/07/03
- [PATCH v10 27/34] qcow2: Add subcluster support to handle_alloc_space(), Alberto Garcia, 2020/07/03
- [PATCH v10 32/34] qcow2: Allow preallocation and backing files if extended_l2 is set, Alberto Garcia, 2020/07/03
- [PATCH v10 29/34] qcow2: Add subcluster support to qcow2_measure(), Alberto Garcia, 2020/07/03
- [PATCH v10 34/34] iotests: Add tests for qcow2 images with extended L2 entries, Alberto Garcia, 2020/07/03
- [PATCH v10 31/34] qcow2: Add the 'extended_l2' option and the QCOW2_INCOMPAT_EXTL2 bit, Alberto Garcia, 2020/07/03