]> Git Repo - qemu.git/commitdiff
block/commit: use buffer-based io
authorVladimir Sementsov-Ogievskiy <[email protected]>
Mon, 22 Apr 2019 14:58:36 +0000 (17:58 +0300)
committerKevin Wolf <[email protected]>
Tue, 30 Apr 2019 13:29:00 +0000 (15:29 +0200)
Signed-off-by: Vladimir Sementsov-Ogievskiy <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Stefano Garzarella <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
block/commit.c

index ba60fef58aa51d4570e1ab883ef5cd54482c9b83..08204fa6f88c25b9f3407f8fbace5dbee32bb1eb 100644 (file)
@@ -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;
     }
This page took 0.026606 seconds and 4 git commands to generate.