aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/024
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2020-07-21 15:55:19 +0200
committerKevin Wolf <kwolf@redhat.com>2020-07-21 16:28:57 +0200
commit61b3043965fe3552ee2684a97e7cc809ca7a71b3 (patch)
tree496e9ee83a0312ebd88803a49761d14b83b18fa8 /tests/qemu-iotests/024
parentbae127d4dcf6158c5042e2eee9582430839a9967 (diff)
qcow2: Implement v2 zero writes with discard if possible
qcow2 version 2 images don't support the zero flag for clusters, so for write_zeroes requests, we return -ENOTSUP and get explicit zero buffer writes. If the image doesn't have a backing file, we can do better: Just discard the respective clusters. This is relevant for 'qemu-img convert -O qcow2 -n', where qemu-img has to assume that the existing target image may contain any data, so it has to write zeroes. Without this patch, this results in a fully allocated target image, even if the source image was empty. Reported-by: Nir Soffer <nsoffer@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20200721135520.72355-2-kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/024')
0 files changed, 0 insertions, 0 deletions