qemu-devel
[Top][All Lists]
Advanced

[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



reply via email to

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