diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2019-04-22 17:58:37 +0300 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2019-04-30 15:29:00 +0200 |
commit | f4326aefcf2cd0e89675ca13978597913586d393 (patch) | |
tree | 6652a338ecec23882d00af46b126ea6b693cda3f | |
parent | 08b6261f34e4800f99f3ce9d47bfb95c2f15b656 (diff) |
block/stream: use buffer-based io
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r-- | block/stream.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/block/stream.c b/block/stream.c index bfaebb861a..1a906fd860 100644 --- a/block/stream.c +++ b/block/stream.c @@ -42,12 +42,10 @@ static int coroutine_fn stream_populate(BlockBackend *blk, int64_t offset, uint64_t bytes, void *buf) { - QEMUIOVector qiov = QEMU_IOVEC_INIT_BUF(qiov, buf, bytes); - assert(bytes < SIZE_MAX); /* Copy-on-read the unallocated clusters */ - return blk_co_preadv(blk, offset, qiov.size, &qiov, BDRV_REQ_COPY_ON_READ); + return blk_co_pread(blk, offset, bytes, buf, BDRV_REQ_COPY_ON_READ); } static void stream_abort(Job *job) |