]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.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)
committerStefan Hajnoczi <stefanha@redhat.com>
Fri, 15 Mar 2013 15:07:50 +0000 (16:07 +0100)
commit381b487d54ba18c73df9db8452028a330058c505
treeba501d114bd2f5010366e67c306ac08843186c77
parent3647917919dfce5f731755f0ac5955a64bc12570
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>
block/qcow2-cluster.c
block/qcow2.c