On Thu, Oct 29, 2015 at 10:14:25AM +0800, Fam Zheng wrote: > void bdrv_drain(BlockDriverState *bs) > { > + BdrvChild *child; > bool busy = true; > > + if (bs->drv && bs->drv->bdrv_drain) { > + bs->drv->bdrv_drain(bs); > + } > + QLIST_FOREACH(child, &bs->children, next) { > + bdrv_drain(child->bs); > + } > while (busy) { > /* Keep iterating */ > bdrv_flush_io_queue(bs);
Recursing calls aio_poll() once for each BDS node and I think it's not necessary and could be a performance problem. Stefan
signature.asc
Description: PGP signature