From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M1kXe-00023h-Kb for qemu-devel@nongnu.org; Wed, 06 May 2009 13:04:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M1kXa-00021l-8G for qemu-devel@nongnu.org; Wed, 06 May 2009 13:04:22 -0400 Received: from [199.232.76.173] (port=54762 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M1kXa-00021i-0L for qemu-devel@nongnu.org; Wed, 06 May 2009 13:04:18 -0400 Received: from mx2.redhat.com ([66.187.237.31]:45538) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M1kXZ-0004vy-8O for qemu-devel@nongnu.org; Wed, 06 May 2009 13:04:17 -0400 Message-ID: <4A01C2D4.5070000@redhat.com> Date: Wed, 06 May 2009 19:03:16 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <1241627950-22195-1-git-send-email-kwolf@redhat.com> <4A01C0C6.7020902@redhat.com> In-Reply-To: <4A01C0C6.7020902@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] qcow2/virtio corruption: Don't allocate the same cluster twice List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: markmc@redhat.com, qemu-devel@nongnu.org Avi Kivity schrieb: > What happens if the second request completes before the first? Then, > when the first request completes, alloc_cluster_link_l2() will call > copy_clusters() and overwrite the second request. Ouch, you're right. I should not only check if the image is consistent, but also if the data survives. Will fix that tomorrow. > Also, the second request now depends on the first to update its > metadata. But if the first request fail, it will not update its > metadata, and the second request will complete without error and also > without updating its metadata. Hm, right. Need to think about this... Kevin