]> git.ipfire.org Git - thirdparty/qemu.git/commit
qcow2: make is_allocated return true for zero clusters
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 6 Mar 2013 17:02:01 +0000 (18:02 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 2 Apr 2013 16:00:19 +0000 (11:00 -0500)
commitd3652a1b286063f02425adc18515804272ebef18
treec9bf76b620687c2db1d59efdcaf1afe63cdabead
parent51943504d5104474d3ec9983a1175c53762877de
qcow2: make is_allocated return true for zero clusters

Otherwise, live migration of the top layer will miss zero clusters and
let the backing file show through.  This also matches what is done in qed.

QCOW2_CLUSTER_ZERO clusters are invalid in v2 image files.  Check this
directly in qcow2_get_cluster_offset instead of replicating the test
everywhere.

Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
(cherry picked from commit 381b487d54ba18c73df9db8452028a330058c505)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
block/qcow2-cluster.c
block/qcow2.c