Re: [PATCH v6 10/10] qcow2: Forward ZERO_WRITE flag for full preallocation

2020-04-23 Thread Max Reitz
On 23.04.20 17:01, Kevin Wolf wrote: > The BDRV_REQ_ZERO_WRITE is currently implemented in a way that first the > image is possibly preallocated and then the zero flag is added to all > clusters. This means that a copy-on-write operation may be needed when > writing to these clusters, despite

Re: [PATCH v6 10/10] qcow2: Forward ZERO_WRITE flag for full preallocation

2020-04-23 Thread Eric Blake
On 4/23/20 11:04 AM, Kevin Wolf wrote: Hmm. When we get block status, it is very easy to tell that something reads as zero when the qcow2 file has the zero bit set, but when the qcow2 file does not have the zero bit set, we have to then query the format layer whether it reads as zeros (which

Re: [PATCH v6 10/10] qcow2: Forward ZERO_WRITE flag for full preallocation

2020-04-23 Thread Kevin Wolf
Am 23.04.2020 um 17:36 hat Eric Blake geschrieben: > On 4/23/20 10:01 AM, Kevin Wolf wrote: > > The BDRV_REQ_ZERO_WRITE is currently implemented in a way that first the > > image is possibly preallocated and then the zero flag is added to all > > clusters. This means that a copy-on-write operation

Re: [PATCH v6 10/10] qcow2: Forward ZERO_WRITE flag for full preallocation

2020-04-23 Thread Eric Blake
On 4/23/20 10:01 AM, Kevin Wolf wrote: The BDRV_REQ_ZERO_WRITE is currently implemented in a way that first the image is possibly preallocated and then the zero flag is added to all clusters. This means that a copy-on-write operation may be needed when writing to these clusters, despite having

[PATCH v6 10/10] qcow2: Forward ZERO_WRITE flag for full preallocation

2020-04-23 Thread Kevin Wolf
The BDRV_REQ_ZERO_WRITE is currently implemented in a way that first the image is possibly preallocated and then the zero flag is added to all clusters. This means that a copy-on-write operation may be needed when writing to these clusters, despite having used preallocation, negating one of the