From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:59851) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbU4i-0000Gw-Ir for qemu-devel@nongnu.org; Fri, 16 Dec 2011 04:27:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RbU4c-0001t7-Mg for qemu-devel@nongnu.org; Fri, 16 Dec 2011 04:27:32 -0500 Received: from e06smtp13.uk.ibm.com ([195.75.94.109]:59366) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbU4c-0001so-BB for qemu-devel@nongnu.org; Fri, 16 Dec 2011 04:27:26 -0500 Received: from /spool/local by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 16 Dec 2011 09:27:23 -0000 Received: from d06av10.portsmouth.uk.ibm.com (d06av10.portsmouth.uk.ibm.com [9.149.37.251]) by d06nrmr1806.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pBG9RK2k2961486 for ; Fri, 16 Dec 2011 09:27:20 GMT Received: from d06av10.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av10.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pBG9RJd2007564 for ; Fri, 16 Dec 2011 02:27:20 -0700 Date: Fri, 16 Dec 2011 08:09:47 +0000 From: Stefan Hajnoczi Message-ID: <20111216080947.GA24876@stefanha-thinkpad.localdomain> References: <1323784351-25531-1-git-send-email-stefanha@linux.vnet.ibm.com> <1323784351-25531-3-git-send-email-stefanha@linux.vnet.ibm.com> <4EE8A9F3.8080804@redhat.com> <20111215104008.GA8222@amt.cnet> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111215104008.GA8222@amt.cnet> Subject: Re: [Qemu-devel] [PATCH v3 2/9] block: add BlockJob interface for long-running operations List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marcelo Tosatti Cc: Kevin Wolf , qemu-devel@nongnu.org, Luiz Capitulino On Thu, Dec 15, 2011 at 08:40:08AM -0200, Marcelo Tosatti wrote: > On Wed, Dec 14, 2011 at 02:51:47PM +0100, Kevin Wolf wrote: > > Am 13.12.2011 14:52, schrieb Stefan Hajnoczi: > > > Signed-off-by: Stefan Hajnoczi > > > --- > > > block_int.h | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > > > 1 files changed, 83 insertions(+), 0 deletions(-) > > > > Why are these functions static inline in the header instead of being > > implemented in block.c? > > > > The other thing I was going to ask, but don't really know to which patch > > I should reply, is whether we need to take care of bdrv_close/delete > > while a block job is still running. What happens if you unplug a device > > that is being streamed? > > There is an additional reference, its not deleted until the operation > completes. Or at least it should be like that, Stefan? Right, the patch uses bdrv_set_in_use(). In my other reply to this sub-thread I mentioned that certain operations like 'change', 'resize', and 'snapshot_blkdev' do not seem to check bdrv_in_use() yet. So I think in order to make image streaming safe additional checks will need to be added in blockdev.c. Stefan