From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58582) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDs7o-00025z-DE for qemu-devel@nongnu.org; Fri, 08 Mar 2013 02:54:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UDs7m-0003gV-2r for qemu-devel@nongnu.org; Fri, 08 Mar 2013 02:53:56 -0500 Received: from ssl.dlhnet.de ([91.198.192.8]:43063 helo=ssl.dlh.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDs7l-0003gF-Sn for qemu-devel@nongnu.org; Fri, 08 Mar 2013 02:53:53 -0500 Message-ID: <51399911.1060006@dlhnet.de> Date: Fri, 08 Mar 2013 08:53:53 +0100 From: Peter Lieven MIME-Version: 1.0 References: <51378200.5010705@dlhnet.de> <513785A0.1010001@redhat.com> <20130306181454.GB3743@localhost.localdomain> <51378B97.2000709@redhat.com> <20130306184800.GB22782@localhost.localdomain> <51379304.50307@dlhnet.de> <5137A964.5020803@redhat.com> <513855A7.7070205@dlhnet.de> <5138BBA7.5030903@redhat.com> In-Reply-To: <5138BBA7.5030903@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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: Paolo Bonzini Cc: kwolf@redhat.com, sw@weilnetz.de, Jeff Cody , qemu-devel@nongnu.org, stefanha@redhat.com On 07.03.2013 17:09, Paolo Bonzini wrote: > Il 07/03/2013 09:53, Peter Lieven ha scritto: >>> >>> Then we can add bdrv_revalidate and, for block_resize, call >>> bdrv_revalidate+bdrv_truncate. For bs->growable = 0 && >>> !bs->drv->bdrv_truncate, bdrv_truncate can just check that the actual >>> size is the same or bigger as the one requested, and fail otherwise. >>> >> >> Regarding brd_drain_all(). Is the fix right to call it only on device >> shrink? > > 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. Peter > > Paolo > >> In this case it has to be added to iscsi_truncate as well. >