qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v7 02/13] blkio: add libblkio block driver


From: Stefano Garzarella
Subject: Re: [PATCH v7 02/13] blkio: add libblkio block driver
Date: Wed, 19 Oct 2022 11:48:26 +0200

On Thu, Oct 13, 2022 at 02:58:57PM -0400, Stefan Hajnoczi wrote:
libblkio (https://gitlab.com/libblkio/libblkio/) is a library for
high-performance disk I/O. It currently supports io_uring,
virtio-blk-vhost-user, and virtio-blk-vhost-vdpa with additional drivers
under development.

One of the reasons for developing libblkio is that other applications
besides QEMU can use it. This will be particularly useful for
virtio-blk-vhost-user which applications may wish to use for connecting
to qemu-storage-daemon.

libblkio also gives us an opportunity to develop in Rust behind a C API
that is easy to consume from QEMU.

This commit adds io_uring, nvme-io_uring, virtio-blk-vhost-user, and
virtio-blk-vhost-vdpa BlockDrivers to QEMU using libblkio. It will be
easy to add other libblkio drivers since they will share the majority of
code.

For now I/O buffers are copied through bounce buffers if the libblkio
driver requires it. Later commits add an optimization for
pre-registering guest RAM to avoid bounce buffers.

The syntax is:

 --blockdev 
io_uring,node-name=drive0,filename=test.img,readonly=on|off,cache.direct=on|off

 --blockdev 
nvme-io_uring,node-name=drive0,filename=/dev/ng0n1,readonly=on|off,cache.direct=on

 --blockdev 
virtio-blk-vhost-vdpa,node-name=drive0,path=/dev/vdpa...,readonly=on|off,cache.direct=on

 --blockdev 
virtio-blk-vhost-user,node-name=drive0,path=vhost-user-blk.sock,readonly=on|off,cache.direct=on

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Markus Armbruster <armbru@redhat.com>
---
MAINTAINERS                   |   6 +
meson_options.txt             |   2 +
qapi/block-core.json          |  77 +++-
meson.build                   |   9 +
block/blkio.c                 | 831 ++++++++++++++++++++++++++++++++++
tests/qtest/modules-test.c    |   3 +
block/meson.build             |   1 +
scripts/meson-buildoptions.sh |   3 +
8 files changed, 928 insertions(+), 4 deletions(-)
create mode 100644 block/blkio.c

Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]