提交 3e248cdc 编写于 作者: K Kevin Wolf

qed: Make qed_aio_read_data() synchronous

Note that this code is generally not running in coroutine context, so
this is an actual blocking synchronous operation. We'll fix this in a
moment.
Signed-off-by: NKevin Wolf <kwolf@redhat.com>
Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
上级 453e53e2
......@@ -1321,9 +1321,11 @@ static void qed_aio_read_data(void *opaque, int ret,
}
BLKDBG_EVENT(bs->file, BLKDBG_READ_AIO);
bdrv_aio_readv(bs->file, offset / BDRV_SECTOR_SIZE,
&acb->cur_qiov, acb->cur_qiov.size / BDRV_SECTOR_SIZE,
qed_aio_next_io_cb, acb);
ret = bdrv_preadv(bs->file, offset, &acb->cur_qiov);
if (ret < 0) {
goto err;
}
qed_aio_next_io(acb, 0);
return;
err:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册