[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 2/9] block: add BlockJob interface for long-r
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v3 2/9] block: add BlockJob interface for long-running operations |
Date: |
Fri, 16 Dec 2011 08:09:47 +0000 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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 <address@hidden>
> > > ---
> > > 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