On Thu, Oct 29, 2015 at 10:14:23AM +0800, Fam Zheng wrote:
> BlockAIOCB *bdrv_aio_ioctl(BlockDriverState *bs,
> unsigned long int req, void *buf,
> BlockCompletionFunc *cb, void *opaque)
> {
> - BlockDriver *drv = bs->drv;
> + BlockAIOCBCoroutine *acb = qemu_aio_get(&bdrv_em_co_aiocb_info,
> + bs, cb, opaque);
> + acb->need_bh = true;
> + acb->req.error = -EINPROGRESS;
> + acb->req.req = req;
> + acb->req.buf = buf;
> + if (qemu_in_coroutine()) {
> + /* Fast-path if already in coroutine context */
> + bdrv_co_aio_ioctl_entry(acb);This is not how bdrv_aio_*() work. They never use the existing coroutine and doing so here would be inconsistent.
signature.asc
Description: PGP signature
