qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] qcow2: make is_allocated return true for zero c


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] qcow2: make is_allocated return true for zero clusters
Date: Fri, 8 Mar 2013 11:54:50 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

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: address@hidden
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
>  block/qcow2.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Stefan Hajnoczi <address@hidden>

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]