On Wed, Mar 06, 2013 at 06:02:01PM +0100, Paolo Bonzini wrote: > 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: [email protected] > Signed-off-by: Paolo Bonzini <[email protected]> > --- > block/qcow2.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Stefan Hajnoczi <[email protected]> The qcow2 spec says: Bit 0: If set to 1, the cluster reads as all zeros. The host cluster offset can be used to describe a preallocation, but it won't be used for reading data from this cluster, nor is data read from the backing file if the cluster is unallocated. Your patch makes zero clusters "allocated", which does not violate the preallocation case.
