]> Git Repo - qemu.git/blobdiff - block/stream.c
file-posix: add drop-cache=on|off option
[qemu.git] / block / stream.c
index 7a49ac099252eda8046ec0e392edb04d935f4285..e14579ff8091cf6e10701d459d39efd3807b3e2a 100644 (file)
@@ -41,14 +41,9 @@ static int coroutine_fn stream_populate(BlockBackend *blk,
                                         int64_t offset, uint64_t bytes,
                                         void *buf)
 {
-    struct iovec iov = {
-        .iov_base = buf,
-        .iov_len  = bytes,
-    };
-    QEMUIOVector qiov;
+    QEMUIOVector qiov = QEMU_IOVEC_INIT_BUF(qiov, buf, bytes);
 
     assert(bytes < SIZE_MAX);
-    qemu_iovec_init_external(&qiov, &iov, 1);
 
     /* Copy-on-read the unallocated clusters */
     return blk_co_preadv(blk, offset, qiov.size, &qiov, BDRV_REQ_COPY_ON_READ);
This page took 0.021956 seconds and 4 git commands to generate.