]> git.proxmox.com Git - mirror_qemu.git/commit
qcow2: Fix write_zeroes with partially allocated backing file cluster
authorKevin Wolf <kwolf@redhat.com>
Tue, 17 May 2016 16:42:23 +0000 (18:42 +0200)
committerKevin Wolf <kwolf@redhat.com>
Thu, 19 May 2016 14:45:31 +0000 (16:45 +0200)
commit5efdf53227809a0da436dd63d7ed19c99044ecbd
tree7e5922f4e1ec4cc750b83a8ab0d8614b95b0fe07
parentf575f145f4fa97fdbb9bbb4df62dfeada3f15dc4
qcow2: Fix write_zeroes with partially allocated backing file cluster

In order to correctly check whether a given cluster is read as zero, we
don't only need to check whether bdrv_get_block_status_above() sets
BDRV_BLOCK_ZERO, but also if all sectors for the whole cluster have the
same status.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Denis V. Lunev <den@openvz.org>
block/qcow2.c