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