Commit f4326aef authored by Vladimir Sementsov-Ogievskiy's avatar Vladimir Sementsov-Ogievskiy Committed by Kevin Wolf
Browse files

block/stream: use buffer-based io

parent 08b6261f
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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)