[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-stable] [PATCH] qcow2: make is_allocated return true for zero
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-stable] [PATCH] qcow2: make is_allocated return true for zero clusters |
Date: |
Wed, 13 Mar 2013 11:10:43 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130219 Thunderbird/17.0.3 |
Il 13/03/2013 10:14, Kevin Wolf ha scritto:
>> > 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>
> Can you add a test case for this?
Yes, I'll do this.
> Also is_allocated() probably is the wrong interface now because it can
> mean different things. The content of a zero cluster is indeed defined
> by the image, but it may or may not be fully allocated yet. Have you
> checked if the callers use it consistently in the former way?
Yes, they do. In particular, qemu-img rebase would have the same bug as
the live block jobs.
Paolo