[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] block: fix QEMU crash with scsi-hd and drive_de
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH] block: fix QEMU crash with scsi-hd and drive_del |
Date: |
Thu, 24 May 2018 09:05:53 +0100 |
User-agent: |
Mutt/1.9.5 (2018-04-13) |
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
signature.asc
Description: PGP signature