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: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
453e53e2a1
commit
3e248cdcd9
|
@ -1321,9 +1321,11 @@ static void qed_aio_read_data(void *opaque, int ret,
|
||||||
}
|
}
|
||||||
|
|
||||||
BLKDBG_EVENT(bs->file, BLKDBG_READ_AIO);
|
BLKDBG_EVENT(bs->file, BLKDBG_READ_AIO);
|
||||||
bdrv_aio_readv(bs->file, offset / BDRV_SECTOR_SIZE,
|
ret = bdrv_preadv(bs->file, offset, &acb->cur_qiov);
|
||||||
&acb->cur_qiov, acb->cur_qiov.size / BDRV_SECTOR_SIZE,
|
if (ret < 0) {
|
||||||
qed_aio_next_io_cb, acb);
|
goto err;
|
||||||
|
}
|
||||||
|
qed_aio_next_io(acb, 0);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
err:
|
err:
|
||||||
|
|
Loading…
Reference in a new issue