From: "Richard W.M. Jones" <rjones@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
pkrempa@redhat.com, Alberto Garcia <berto@igalia.com>,
slp@redhat.com, qemu-block@nongnu.org, qemu-devel@nongnu.org,
mreitz@redhat.com,
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
Klaus Jensen <its@irrelevant.dk>,
philmd@redhat.com, Markus Armbruster <armbru@redhat.com>,
sgarzare@redhat.com
Subject: Re: [ANNOUNCE] libblkio v0.1.0 preview release
Date: Thu, 29 Apr 2021 15:22:59 +0100 [thread overview]
Message-ID: <20210429142259.GR26415@redhat.com> (raw)
In-Reply-To: <YIq9PpAd6nP9XTmz@stefanha-x1.localdomain>
On Thu, Apr 29, 2021 at 03:05:50PM +0100, Stefan Hajnoczi wrote:
> The purpose of this preview release is to discuss both the API design
> and general direction of the project. API documentation is available
> here:
>
> https://gitlab.com/libblkio/libblkio/-/blob/v0.1.0/docs/blkio.rst
libvirt originally, and now libnbd, keep a per-thread error message
(stored in thread-local storage). It's a lot nicer than having to
pass &errmsg to every function. You can just write:
if (nbd_connect_tcp (nbd, "remote", "nbd") == -1) {
fprintf (stderr,
"failed to connect to remote server: %s (errno = %d)\n",
nbd_get_error (), nbd_get_errno ());
exit (EXIT_FAILURE);
}
(https://libguestfs.org/libnbd.3.html#ERROR-HANDLING)
It means you can extend the range of error information available in
future. Also you can return a 'const char *' and the application
doesn't have to worry about lifetimes, at least in the common case.
> Examples are available here:
>
> https://gitlab.com/libblkio/libblkio/-/tree/v0.1.0/examples
>
> The goal is to eventually include the following drivers:
> - Linux io_uring
> - NVMe (VFIO and vfio-user)
> - virtio-blk (VFIO, vfio-user, vhost-user-blk, and vhost-vdpa-blk)
>
> There are a few reasons why libblkio is needed:
>
> 1. QEMU, Ceph, GlusterFS, MariaDB, and other programs have been adding
> more low-level block I/O code, most of it duplicated. Usually only
> one or two of Linux AIO, io_uring, userspace drivers, vhost-user
> drivers, etc are implemented. This makes it difficult to benefit from
> the latest advances in high-performance block I/O.
>
> 2. Coding to a standard API makes it possible to introduce new
> optimizations or hardware interfaces without costly changes to the
> software stack.
>
> 3. A client library is needed so applications can take advantage of
> qemu-storage-daemon's vhost-user-blk exports.
>
> 4. Implementing block I/O as a library allows QEMU to use Rust for new
> code without messy QEMU internal API bindings. Note that libblkio
> currently does not provide a Rust crate, it only offers a C API.
This is where I get confused about what this library actually does.
It's not just a nicer wrapper around io_uring, but what is it actually
doing?
Rich.
> For QEMU integration the next step is a libblkio BlockDriver. This new
> BlockDriver will provide libblkio functionality to QEMU. Eventually
> libblkio will provide block/file-posix.c, block/nvme.c, and the upcoming
> vhost-vdpa-blk functionality and the QEMU code can be simplified or
> removed.
>
> libblkio does not contain an event loop implementation or disk image
> format drivers and that functionality will not be part of libblkio.
>
> How to participate:
> 1. Share your thoughts on the direction and your requirements.
> 2. Review the API docs and give feedback.
> 3. Write a libblkio driver for NVMe VFIO/vfio-user, virtio-blk
> VFIO/vfio-user, vhost-user-blk. Or just a null driver for
> benchmarking/testing :).
> 4. Integrate libblkio into Ceph, GlusterFS, MariaDB, etc.
>
> I am now beginning QEMU and fio integration. Stefano Garzarella is
> looking at adding a vhost-vdpa-blk driver to libblkio.
>
> Stefan
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html
next prev parent reply other threads:[~2021-04-29 14:24 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-29 14:05 [ANNOUNCE] libblkio v0.1.0 preview release Stefan Hajnoczi
2021-04-29 14:22 ` Richard W.M. Jones [this message]
2021-04-29 14:41 ` Stefan Hajnoczi
2021-04-29 15:00 ` Richard W.M. Jones
2021-04-29 15:08 ` Daniel P. Berrangé
2021-04-29 15:31 ` Richard W.M. Jones
2021-04-29 15:35 ` Daniel P. Berrangé
2021-04-29 17:17 ` libnbd thread-local errors and dlclose (was: Re: [ANNOUNCE] libblkio v0.1.0 preview release) Richard W.M. Jones
2021-04-29 17:27 ` Daniel P. Berrangé
2021-04-30 16:20 ` [ANNOUNCE] libblkio v0.1.0 preview release Stefan Hajnoczi
2021-04-29 15:51 ` Kevin Wolf
2021-04-30 15:49 ` Stefan Hajnoczi
2021-05-04 13:44 ` Kevin Wolf
2021-05-05 16:19 ` Stefan Hajnoczi
2021-05-05 16:46 ` Kevin Wolf
2021-05-06 8:46 ` Stefan Hajnoczi
2021-05-06 10:33 ` Kevin Wolf
2021-05-06 13:53 ` Stefan Hajnoczi
2021-05-13 9:47 ` Stefan Hajnoczi
2021-05-14 15:55 ` Kevin Wolf
2021-05-17 14:09 ` Stefan Hajnoczi
2021-05-18 8:02 ` Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210429142259.GR26415@redhat.com \
--to=rjones@redhat.com \
--cc=armbru@redhat.com \
--cc=berto@igalia.com \
--cc=its@irrelevant.dk \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=philmd@redhat.com \
--cc=pkrempa@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=sgarzare@redhat.com \
--cc=slp@redhat.com \
--cc=stefanha@redhat.com \
--cc=vsementsov@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).