[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v7 28/32] qcow2: Add subcluster support to qcow2_co_pwrite_ze
From: |
Alberto Garcia |
Subject: |
Re: [PATCH v7 28/32] qcow2: Add subcluster support to qcow2_co_pwrite_zeroes() |
Date: |
Fri, 29 May 2020 18:06:40 +0200 |
User-agent: |
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
On Thu 28 May 2020 09:11:07 PM CEST, Eric Blake wrote:
>> I think the problem also exists in the current code (without my
>> patches). If you zeroize 10 clusters and the last one is compressed
>> you have to repeat the request after having zeroized 9 clusters.
>
> Hmm. In the pre-patch code, qcow2_co_pwrite_zeroes() calls
> qcow2_cluster_zeroize() which can fail with -ENOTSUP up front, but not
> after the fact. Once it starts the while loop over clusters, its use
> of zero_in_l2_slice() handles compressed clusters just fine;
You're right, complete compressed clusters can always be handled, the
problem is just when there's subclusters.
> But isn't this something we could solve recursively? Instead of
> returning -ENOTSUP, we could have zero_in_l2_slice() call
> bdrv_pwrite_zeroes() on the (sub-)clusters associated with a
> compressed cluster.
I suppose we could, as long as BDRV_REQ_NO_FALLBACK is not used.
Berto
[PATCH v7 22/32] qcow2: Add subcluster support to zero_in_l2_slice(), Alberto Garcia, 2020/05/25
[PATCH v7 16/32] qcow2: Add qcow2_cluster_is_allocated(), Alberto Garcia, 2020/05/25
[PATCH v7 09/32] qcow2: Add subcluster-related fields to BDRVQcow2State, Alberto Garcia, 2020/05/25
[PATCH v7 01/32] qcow2: Make Qcow2AioTask store the full host offset, Alberto Garcia, 2020/05/25
[PATCH v7 06/32] qcow2: Add get_l2_entry() and set_l2_entry(), Alberto Garcia, 2020/05/25
[PATCH v7 13/32] qcow2: Update get/set_l2_entry() and add get/set_l2_bitmap(), Alberto Garcia, 2020/05/25
[PATCH v7 23/32] qcow2: Add subcluster support to discard_in_l2_slice(), Alberto Garcia, 2020/05/25
[PATCH v7 15/32] qcow2: Add qcow2_get_subcluster_range_type(), Alberto Garcia, 2020/05/25