Re: [PATCH v4] qcow2: Forbid discard in qcow2 v2 images with backing files

2020-03-31 Thread Max Reitz
On 31.03.20 11:51, Alberto Garcia wrote: > On Tue 31 Mar 2020 10:57:18 AM CEST, Max Reitz wrote: >> I’ll have to dequeue it again, because it breaks iotests 046 and 177 >> (both of which already have special handling for v2-specific discard; >> but it needs to be adjusted now that the discard opera

Re: [PATCH v4] qcow2: Forbid discard in qcow2 v2 images with backing files

2020-03-31 Thread Alberto Garcia
On Tue 31 Mar 2020 10:57:18 AM CEST, Max Reitz wrote: > I’ll have to dequeue it again, because it breaks iotests 046 and 177 > (both of which already have special handling for v2-specific discard; > but it needs to be adjusted now that the discard operation no longer > reveals the backing file cont

Re: [PATCH v4] qcow2: Forbid discard in qcow2 v2 images with backing files

2020-03-31 Thread Max Reitz
On 30.03.20 12:05, Max Reitz wrote: > On 27.03.20 19:59, Alberto Garcia wrote: >> A discard request deallocates the selected clusters so they read back >> as zeroes. This is done by clearing the cluster offset field and >> setting QCOW_OFLAG_ZERO in the L2 entry. >> >> This flag is however only sup

Re: [PATCH v4] qcow2: Forbid discard in qcow2 v2 images with backing files

2020-03-30 Thread Max Reitz
On 27.03.20 19:59, Alberto Garcia wrote: > A discard request deallocates the selected clusters so they read back > as zeroes. This is done by clearing the cluster offset field and > setting QCOW_OFLAG_ZERO in the L2 entry. > > This flag is however only supported when qcow_version >= 3. In older >

Re: [PATCH v4] qcow2: Forbid discard in qcow2 v2 images with backing files

2020-03-27 Thread Eric Blake
On 3/27/20 1:59 PM, Alberto Garcia wrote: A discard request deallocates the selected clusters so they read back as zeroes. This is done by clearing the cluster offset field and setting QCOW_OFLAG_ZERO in the L2 entry. This flag is however only supported when qcow_version >= 3. In older images th

[PATCH v4] qcow2: Forbid discard in qcow2 v2 images with backing files

2020-03-27 Thread Alberto Garcia
A discard request deallocates the selected clusters so they read back as zeroes. This is done by clearing the cluster offset field and setting QCOW_OFLAG_ZERO in the L2 entry. This flag is however only supported when qcow_version >= 3. In older images the cluster is simply deallocated, exposing an