From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38151) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UEGCf-0000dd-K1 for qemu-devel@nongnu.org; Sat, 09 Mar 2013 04:36:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UEGCY-0006F8-RA for qemu-devel@nongnu.org; Sat, 09 Mar 2013 04:36:33 -0500 Received: from ssl.dlhnet.de ([91.198.192.8]:51160 helo=ssl.dlh.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UEGCY-0006Ew-LR for qemu-devel@nongnu.org; Sat, 09 Mar 2013 04:36:26 -0500 Message-ID: <513B0299.3090702@dlhnet.de> Date: Sat, 09 Mar 2013 10:36:25 +0100 From: Peter Lieven MIME-Version: 1.0 References: <51378B97.2000709@redhat.com> <20130306184800.GB22782@localhost.localdomain> <51379304.50307@dlhnet.de> <5137A964.5020803@redhat.com> <513855A7.7070205@dlhnet.de> <5138BBA7.5030903@redhat.com> <51399911.1060006@dlhnet.de> <5139AE29.9020106@redhat.com> <20130308093519.GA4573@dhcp-200-207.str.redhat.com> <2A642238-3C33-4CF3-86EF-FB4544FDB1CA@dlhnet.de> <20130308115636.GB4573@dhcp-200-207.str.redhat.com> In-Reply-To: <20130308115636.GB4573@dhcp-200-207.str.redhat.com> 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: Kevin Wolf Cc: Paolo Bonzini , Jeff Cody , qemu-devel@nongnu.org, stefanha@redhat.com, sw@weilnetz.de Am 08.03.2013 12:56, schrieb Kevin Wolf: > Am 08.03.2013 um 12:46 hat Peter Lieven geschrieben: >> >> Am 08.03.2013 um 10:35 schrieb Kevin Wolf : >> >>> Am 08.03.2013 um 10:23 hat Paolo Bonzini geschrieben: >>>> Il 08/03/2013 08:53, Peter Lieven ha scritto: >>>>>> >>>>>> I think the fix is to only call it for the monitor command. Optionally, >>>>>> when shrinking, assert that there are no requests in flight. >>>>> >>>>> Okay. >>>>> >>>>> What is the plan? just fix this or fix the whole thing (which seems to >>>>> be some >>>>> work). >>>>> >>>>> The suggested patch from Jeff will break iscsi_truncate as bs->growable >>>>> is 1 currently. >>>> >>>> I guess it's up to Kevin and Jeff. >>> >>> Someone needs to send a fix for the qcow1 (and probably vmdk) >>> regression, otherwise I'll have to revert the patch. >> >> What about Paolos suggestion to call bdrv_drain_all() from the block_resize >> command and not in bdrv_truncate? It is not a the complete solution, but it >> will fix the regression. However, what happens if someone resizes a qcow2 >> device? > > I suppose you mean qcow1? It doesn't support resizing images, but even > if it did, this shouldn't be a problem: The problematic case is the call > of bdrv_drain_all() during a read/write function, which would have to > wait for itself to complete. As soon as you restrict the > bdrv_drain_all() to the monitor, waiting for in-flight I/Os should just > work. Ok, then please ignore / revert the patch that added bdrv_drain_all() in bdrv_truncate() and I will sent a new one that adds bdrv_drain_all() to qmp_block_resize(). Peter > > Kevin >