提交 d56de074 编写于 作者: S Stefano Stabellini

xen_disk: when using AIO flush after the operation is completed

If ioreq->postsync call bdrv_flush when the AIO operation is actually
completed.
Signed-off-by: NStefano Stabellini <stefano.stabellini@eu.citrix.com>
上级 82091410
......@@ -330,6 +330,9 @@ static void qemu_aio_complete(void *opaque, int ret)
if (ioreq->aio_inflight > 0) {
return;
}
if (ioreq->postsync) {
bdrv_flush(ioreq->blkdev->bs);
}
ioreq->status = ioreq->aio_errors ? BLKIF_RSP_ERROR : BLKIF_RSP_OKAY;
ioreq_unmap(ioreq);
......@@ -376,9 +379,6 @@ static int ioreq_runio_qemu_aio(struct ioreq *ioreq)
goto err;
}
if (ioreq->postsync) {
bdrv_flush(blkdev->bs); /* FIXME: aio_flush() ??? */
}
qemu_aio_complete(ioreq, 0);
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册