On Thu, 24 May 2018 09:05:53 +0100
Stefan Hajnoczi <stefa...@redhat.com> wrote:

> On Thu, May 24, 2018 at 08:04:59AM +0200, Paolo Bonzini wrote:
> > On 23/05/2018 16:46, Greg Kurz wrote:  
> > > Maybe change bdrv_root_unref_child() to ensure we don't call
> > > bdrv_close() with pending I/O requests ?
> > > 
> > >  void bdrv_root_unref_child(BdrvChild *child)
> > >  {
> > >      BlockDriverState *child_bs;
> > >  
> > >      child_bs = child->bs;
> > > +    bdrv_drained_begin(child_bs);
> > >      bdrv_detach_child(child);
> > > +    bdrv_drained_end(child_bs);
> > >      bdrv_unref(child_bs);
> > >  }  
> > 
> > Maybe bdrv_detach_child should do it.  
> 
> Sounds good.
> 
> Stefan

I guess it makes sense for bdrv_detach_child() to *break* blk->root without
leaving I/O requests behind. I'll just do that then.

Cheers,

--
Greg

Attachment: pgpoluBcHZshA.pgp
Description: OpenPGP digital signature

Reply via email to