From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55775) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDJnE-0001VH-Vy for qemu-devel@nongnu.org; Wed, 06 Mar 2013 14:14:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UDJnD-00072W-0K for qemu-devel@nongnu.org; Wed, 06 Mar 2013 14:14:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]:31195) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDIjX-00029S-St for qemu-devel@nongnu.org; Wed, 06 Mar 2013 13:06:32 -0500 Message-ID: <513785A0.1010001@redhat.com> Date: Wed, 06 Mar 2013 19:06:24 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <51378200.5010705@dlhnet.de> In-Reply-To: <51378200.5010705@dlhnet.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/7] block: only force IO completion in .bdrv_truncate if we are shrinking List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven Cc: kwolf@redhat.com, sw@weilnetz.de, Jeff Cody , qemu-devel@nongnu.org, stefanha@redhat.com Il 06/03/2013 18:50, Peter Lieven ha scritto: >> > Commit 9a665b2b made bdrv_truncate() call bdrv_drain_all(), but this breaks >> > QCOW images, as well other future image formats (such as VHDX) that may call >> > bdrv_truncate(bs->file) from within a read/write operation. For example, QCOW >> > will cause an assert, due to tracked_requests not being empty (since the >> > read/write that called bdrv_truncate() is still in progress). I'm not sure such bdrv_truncate calls are necessary. QCOW2 doesn't have them (almost; there is one in qcow2_write_compressed, I'm not even sure that one is necessary though), and I think QCOW's breaks using it with a block device as a backing file. Paolo