mirror of
https://git.proxmox.com/git/qemu
synced 2025-08-08 13:07:01 +00:00
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: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
This commit is contained in:
parent
820914103c
commit
d56de07469
@ -330,6 +330,9 @@ static void qemu_aio_complete(void *opaque, int ret)
|
|||||||
if (ioreq->aio_inflight > 0) {
|
if (ioreq->aio_inflight > 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (ioreq->postsync) {
|
||||||
|
bdrv_flush(ioreq->blkdev->bs);
|
||||||
|
}
|
||||||
|
|
||||||
ioreq->status = ioreq->aio_errors ? BLKIF_RSP_ERROR : BLKIF_RSP_OKAY;
|
ioreq->status = ioreq->aio_errors ? BLKIF_RSP_ERROR : BLKIF_RSP_OKAY;
|
||||||
ioreq_unmap(ioreq);
|
ioreq_unmap(ioreq);
|
||||||
@ -376,9 +379,6 @@ static int ioreq_runio_qemu_aio(struct ioreq *ioreq)
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ioreq->postsync) {
|
|
||||||
bdrv_flush(blkdev->bs); /* FIXME: aio_flush() ??? */
|
|
||||||
}
|
|
||||||
qemu_aio_complete(ioreq, 0);
|
qemu_aio_complete(ioreq, 0);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user