From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57526) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDJ89-0006AI-BH for qemu-devel@nongnu.org; Wed, 06 Mar 2013 13:31:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UDJ87-0003CG-Ra for qemu-devel@nongnu.org; Wed, 06 Mar 2013 13:31:57 -0500 Received: from mail-we0-x22e.google.com ([2a00:1450:400c:c03::22e]:47314) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDJ87-0003By-L3 for qemu-devel@nongnu.org; Wed, 06 Mar 2013 13:31:55 -0500 Received: by mail-we0-f174.google.com with SMTP id r6so8525709wey.19 for ; Wed, 06 Mar 2013 10:31:54 -0800 (PST) Sender: Paolo Bonzini Message-ID: <51378B97.2000709@redhat.com> Date: Wed, 06 Mar 2013 19:31:51 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <51378200.5010705@dlhnet.de> <513785A0.1010001@redhat.com> <20130306181454.GB3743@localhost.localdomain> In-Reply-To: <20130306181454.GB3743@localhost.localdomain> Content-Type: text/plain; charset=ISO-8859-1 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: Jeff Cody Cc: kwolf@redhat.com, sw@weilnetz.de, Peter Lieven , qemu-devel@nongnu.org, stefanha@redhat.com Il 06/03/2013 19:14, Jeff Cody ha scritto: > QCOW breaks with it using a normal raw posix file as a device. As a > test: qemu-img create -f qcow test.qcow 5G. Now run qemu with that > drive mounted, and try to partition and format it. QEMU now asserts. > > The nicety of being able to using truncate during a write call, > especially for VHDX (which can have relatively large block/cluster > sizes), so to grow the file sparsely in a dynamically allocated file. Perhaps we need two APIs, "truncate" and "revalidate". Truncate should be a no-op if (!bs->growable). Revalidate could be called by the block_resize monitor command with no size specified. Paolo