From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37713) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFieA-00087u-Ii for qemu-devel@nongnu.org; Wed, 13 Mar 2013 06:11:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UFie5-0001Ja-OX for qemu-devel@nongnu.org; Wed, 13 Mar 2013 06:10:58 -0400 Message-ID: <514050A3.8060501@redhat.com> Date: Wed, 13 Mar 2013 11:10:43 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1362589321-21402-1-git-send-email-pbonzini@redhat.com> <20130313091423.GA2309@dhcp-200-207.str.redhat.com> In-Reply-To: <20130313091423.GA2309@dhcp-200-207.str.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] qcow2: make is_allocated return true for zero clusters List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org, stefanha@redhat.com, qemu-stable@nongnu.org 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: qemu-stable@nongnu.org >> > Signed-off-by: Paolo Bonzini > 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