Re: [PATCH v7 28/32] qcow2: Add subcluster support to qcow2_co_pwrite_zeroes()

2020-05-29 Thread Alberto Garcia
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,

Re: [PATCH v7 28/32] qcow2: Add subcluster support to qcow2_co_pwrite_zeroes()

2020-05-28 Thread Eric Blake
On 5/28/20 10:04 AM, Alberto Garcia wrote: On Wed 27 May 2020 07:58:10 PM CEST, Eric Blake wrote: 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

Re: [PATCH v7 28/32] qcow2: Add subcluster support to qcow2_co_pwrite_zeroes()

2020-05-28 Thread Alberto Garcia
On Wed 27 May 2020 07:58:10 PM CEST, Eric Blake wrote: >> 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

Re: [PATCH v7 28/32] qcow2: Add subcluster support to qcow2_co_pwrite_zeroes()

2020-05-27 Thread Eric Blake
On 5/25/20 1:08 PM, 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

[PATCH v7 28/32] qcow2: Add subcluster support to qcow2_co_pwrite_zeroes()

2020-05-25 Thread Alberto Garcia
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