diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2019-04-22 17:58:36 +0300 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2019-04-30 15:29:00 +0200 |
commit | 08b6261f34e4800f99f3ce9d47bfb95c2f15b656 (patch) | |
tree | 836f9a29712ea6df254945d1f204cf7eab0a0c77 /block | |
parent | 607dbdc4e09bfefa3f165079a5e87df035a0e26c (diff) | |
download | qemu-08b6261f34e4800f99f3ce9d47bfb95c2f15b656.zip qemu-08b6261f34e4800f99f3ce9d47bfb95c2f15b656.tar.gz qemu-08b6261f34e4800f99f3ce9d47bfb95c2f15b656.tar.bz2 |
block/commit: 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>
Diffstat (limited to 'block')
-rw-r--r-- | block/commit.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/block/commit.c b/block/commit.c index ba60fef..08204fa 100644 --- a/block/commit.c +++ b/block/commit.c @@ -48,16 +48,15 @@ static int coroutine_fn commit_populate(BlockBackend *bs, BlockBackend *base, void *buf) { int ret = 0; - QEMUIOVector qiov = QEMU_IOVEC_INIT_BUF(qiov, buf, bytes); assert(bytes < SIZE_MAX); - ret = blk_co_preadv(bs, offset, qiov.size, &qiov, 0); + ret = blk_co_pread(bs, offset, bytes, buf, 0); if (ret < 0) { return ret; } - ret = blk_co_pwritev(base, offset, qiov.size, &qiov, 0); + ret = blk_co_pwrite(base, offset, bytes, buf, 0); if (ret < 0) { return ret; } |