[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v2 4/6] raw-posix: Switch to bdrv_co_* interface
From: |
Eric Blake |
Subject: |
Re: [Qemu-block] [PATCH v2 4/6] raw-posix: Switch to bdrv_co_* interfaces |
Date: |
Tue, 14 Jun 2016 08:10:45 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 06/14/2016 07:32 AM, Kevin Wolf wrote:
> In order to use the modern byte-based .bdrv_co_preadv/pwritev()
> interface, this patch switches raw-posix to coroutine-based interfaces
> as a first step. In terms of semantics and performance, it doesn't make
> a difference with the existing code whether we go from a coroutine to a
> callback-based interface already in block/io.c or only in linux-aio.c
>
> As there have been concerns in the past that this change may be a step
> in the wrong direction with respect to a possible AIO fast path, the
> old callback-based interface for linux-aio is left around and can be
> reactivated when a fast path (e.g. directly from virtio-blk dataplane,
> bypassing the whole block layer) is implemented.
>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> block/linux-aio.c | 87
> +++++++++++++++++++++++++++++++++++++++++--------------
> block/raw-aio.h | 4 +++
> block/raw-posix.c | 59 +++++++++++++++++--------------------
> 3 files changed, 96 insertions(+), 54 deletions(-)
Reviewed-by: Eric Blake <address@hidden>
> @@ -1957,8 +1952,8 @@ BlockDriver bdrv_file = {
> .bdrv_co_get_block_status = raw_co_get_block_status,
> .bdrv_co_pwrite_zeroes = raw_co_pwrite_zeroes,
>
> - .bdrv_aio_readv = raw_aio_readv,
> - .bdrv_aio_writev = raw_aio_writev,
> + .bdrv_co_readv = raw_co_readv,
> + .bdrv_co_writev = raw_co_writev,
> .bdrv_aio_flush = raw_aio_flush,
> .bdrv_aio_discard = raw_aio_discard,
The rest of this chunk doesn't try to align '='. Not worth a respin, but
something you may want to clean up on pull request.
> .bdrv_refresh_limits = raw_refresh_limits,
> @@ -2405,8 +2400,8 @@ static BlockDriver bdrv_host_device = {
> .create_opts = &raw_create_opts,
> .bdrv_co_pwrite_zeroes = hdev_co_pwrite_zeroes,
>
> - .bdrv_aio_readv = raw_aio_readv,
> - .bdrv_aio_writev = raw_aio_writev,
> + .bdrv_co_readv = raw_co_readv,
> + .bdrv_co_writev = raw_co_writev,
> .bdrv_aio_flush = raw_aio_flush,
> .bdrv_aio_discard = hdev_aio_discard,
> .bdrv_refresh_limits = raw_refresh_limits,
and this hunk is also inconsistent, but in a different way.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-block] [PATCH v2 0/6] block: Enable byte granularity I/O, Kevin Wolf, 2016/06/14
- [Qemu-block] [PATCH v2 1/6] block: Byte-based bdrv_co_do_copy_on_readv(), Kevin Wolf, 2016/06/14
- [Qemu-block] [PATCH v2 5/6] raw-posix: Implement .bdrv_co_preadv/pwritev, Kevin Wolf, 2016/06/14
- [Qemu-block] [PATCH v2 4/6] raw-posix: Switch to bdrv_co_* interfaces, Kevin Wolf, 2016/06/14
- Re: [Qemu-block] [PATCH v2 4/6] raw-posix: Switch to bdrv_co_* interfaces,
Eric Blake <=
- [Qemu-block] [PATCH v2 3/6] block: Prepare bdrv_aligned_pwritev() for byte-aligned requests, Kevin Wolf, 2016/06/14
- [Qemu-block] [PATCH v2 2/6] block: Prepare bdrv_aligned_preadv() for byte-aligned requests, Kevin Wolf, 2016/06/14
- [Qemu-block] [PATCH v2 6/6] block: Don't enforce 512 byte minimum alignment, Kevin Wolf, 2016/06/14
- Re: [Qemu-block] [PATCH v2 0/6] block: Enable byte granularity I/O, Stefan Hajnoczi, 2016/06/15