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

2020-03-27 Thread Alberto Garcia
On Fri 27 Mar 2020 03:14:42 PM CET, Kevin Wolf wrote: >> +echo "# Create a backing image and fill it with data" >> +BACKING_IMG="$TEST_IMG.base" >> +TEST_IMG="$BACKING_IMG" _make_test_img 128k >> +$QEMU_IO -c 'write -P 0xff 0 128k' "$BACKING_IMG" | _filter_qemu_io >> + >> +for qcow2_compat in 0.10

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

2020-03-27 Thread Kevin Wolf
Am 24.03.2020 um 13:16 hat Alberto Garcia geschrieben: > 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 >=

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

2020-03-24 Thread Max Reitz
On 24.03.20 13:16, 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 >

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

2020-03-24 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