From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35042) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDKr6-0001cS-QU for qemu-devel@nongnu.org; Wed, 06 Mar 2013 15:22:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UDKr4-0002n7-SU for qemu-devel@nongnu.org; Wed, 06 Mar 2013 15:22:28 -0500 Received: from mail-ee0-f41.google.com ([74.125.83.41]:37151) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDKr4-0002mx-MK for qemu-devel@nongnu.org; Wed, 06 Mar 2013 15:22:26 -0500 Received: by mail-ee0-f41.google.com with SMTP id c13so6255886eek.0 for ; Wed, 06 Mar 2013 12:22:26 -0800 (PST) Sender: Paolo Bonzini Message-ID: <5137A57E.1010307@redhat.com> Date: Wed, 06 Mar 2013 21:22:22 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <51378200.5010705@dlhnet.de> <20130306183247.GA22782@localhost.localdomain> In-Reply-To: <20130306183247.GA22782@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:32, Jeff Cody ha scritto: > On Wed, Mar 06, 2013 at 06:50:56PM +0100, Peter Lieven wrote: >> Looking at the source I have not found a place where bs->growable is set to 0 for any >> block driver, maybe I miss something. Having bs->growable for iSCSI would also be ok. >> >> Shouldn't it be possible to call bdrv_drain_all() any time? There are other places >> where this is called. One I have in mind is e.g. if you cancel an ongoing block migration. > > That is a good point - what happens to QCOW now, if there is a block > job in progress (e.g. block-commit, block-stream, etc...)? I would > imagine -EBUSY gets thrown, since bdrv_truncate() checks > bdrv_in_use(). No, bs->file is not marked in use. Only bs is. Paolo