diff options
author | Eric Blake <eblake@redhat.com> | 2016-05-06 10:26:34 -0600 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2016-05-12 15:22:09 +0200 |
commit | d00000f90193cdbed32a16bcc9b5b4e9ff9d7ab2 (patch) | |
tree | 8993c903109d44cb1035b7719ec98d52c5d12e46 /hw/block/xen_disk.c | |
parent | b5772fdde40a8200fc20db4d5da672f1ce149d68 (diff) | |
download | qemu-d00000f90193cdbed32a16bcc9b5b4e9ff9d7ab2.tar.gz qemu-d00000f90193cdbed32a16bcc9b5b4e9ff9d7ab2.tar.bz2 qemu-d00000f90193cdbed32a16bcc9b5b4e9ff9d7ab2.zip |
xen_disk: Switch to byte-based aio block access
Sector-based blk_aio_readv() and blk_aio_writev() should die; switch
to byte-based blk_aio_preadv() and blk_aio_pwritev() instead.
Signed-off-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/block/xen_disk.c')
-rw-r--r-- | hw/block/xen_disk.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c index d4ce380fee..064c116a7c 100644 --- a/hw/block/xen_disk.c +++ b/hw/block/xen_disk.c @@ -554,9 +554,8 @@ static int ioreq_runio_qemu_aio(struct ioreq *ioreq) block_acct_start(blk_get_stats(blkdev->blk), &ioreq->acct, ioreq->v.size, BLOCK_ACCT_READ); ioreq->aio_inflight++; - blk_aio_readv(blkdev->blk, ioreq->start / BLOCK_SIZE, - &ioreq->v, ioreq->v.size / BLOCK_SIZE, - qemu_aio_complete, ioreq); + blk_aio_preadv(blkdev->blk, ioreq->start, &ioreq->v, 0, + qemu_aio_complete, ioreq); break; case BLKIF_OP_WRITE: case BLKIF_OP_FLUSH_DISKCACHE: @@ -569,9 +568,8 @@ static int ioreq_runio_qemu_aio(struct ioreq *ioreq) ioreq->req.operation == BLKIF_OP_WRITE ? BLOCK_ACCT_WRITE : BLOCK_ACCT_FLUSH); ioreq->aio_inflight++; - blk_aio_writev(blkdev->blk, ioreq->start / BLOCK_SIZE, - &ioreq->v, ioreq->v.size / BLOCK_SIZE, - qemu_aio_complete, ioreq); + blk_aio_pwritev(blkdev->blk, ioreq->start, &ioreq->v, 0, + qemu_aio_complete, ioreq); break; case BLKIF_OP_DISCARD: { |