[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH 03/17] block: Support AIO drivers i
From: |
Eric Blake |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH 03/17] block: Support AIO drivers in bdrv_driver_preadv/pwritev() |
Date: |
Wed, 27 Apr 2016 08:13:59 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 04/27/2016 03:52 AM, Kevin Wolf wrote:
> Instead of registering emulation functions as .bdrv_co_writev, just
> directly check whether the function is there or not, and use the AIO
> interface if it isn't. This makes the read/write functions more
> consistent with how things are done in other places (flush, discard,
> etc.)
>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> block/io.c | 126
> +++++++++++++++++++++++++------------------------------------
> 1 file changed, 52 insertions(+), 74 deletions(-)
>
> -
> -static int coroutine_fn bdrv_co_io_em(BlockDriverState *bs, int64_t
> sector_num,
> - int nb_sectors, QEMUIOVector *iov,
> - bool is_write)
> -{
> - CoroutineIOCompletion co = {
> - .coroutine = qemu_coroutine_self(),
> - };
> - BlockAIOCB *acb;
> -
> - if (is_write) {
> - acb = bs->drv->bdrv_aio_writev(bs, sector_num, iov, nb_sectors,
> - bdrv_co_io_em_complete, &co);
> - } else {
> - acb = bs->drv->bdrv_aio_readv(bs, sector_num, iov, nb_sectors,
> - bdrv_co_io_em_complete, &co);
> - }
> -
> - trace_bdrv_co_io_em(bs, sector_num, nb_sectors, is_write, acb);
I don't see any more uses of this; do you need to tweak trace-events to
drop bdrv_co_io_em?
With that fixed (or explained),
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-block] [PATCH 00/17] block: Convert .bdrv_read/write to .bdrv_preadv/pwritev, Kevin Wolf, 2016/04/27
- [Qemu-block] [PATCH 01/17] block: Introduce bdrv_driver_preadv(), Kevin Wolf, 2016/04/27
- [Qemu-block] [PATCH 02/17] block: Introduce bdrv_driver_pwritev(), Kevin Wolf, 2016/04/27
- [Qemu-block] [PATCH 03/17] block: Support AIO drivers in bdrv_driver_preadv/pwritev(), Kevin Wolf, 2016/04/27
- Re: [Qemu-block] [Qemu-devel] [PATCH 03/17] block: Support AIO drivers in bdrv_driver_preadv/pwritev(),
Eric Blake <=
- [Qemu-block] [PATCH 04/17] block: Rename bdrv_co_do_preadv/writev to bdrv_co_preadv/writev, Kevin Wolf, 2016/04/27
- [Qemu-block] [PATCH 08/17] dmg: Implement .bdrv_co_preadv() interface, Kevin Wolf, 2016/04/27
- [Qemu-block] [PATCH 07/17] cloop: Implement .bdrv_co_preadv() interface, Kevin Wolf, 2016/04/27
- [Qemu-block] [PATCH 09/17] vdi: Implement .bdrv_co_preadv() interface, Kevin Wolf, 2016/04/27
- [Qemu-block] [PATCH 05/17] block: Introduce .bdrv_co_preadv/pwritev BlockDriver function, Kevin Wolf, 2016/04/27
- [Qemu-block] [PATCH 06/17] bochs: Implement .bdrv_co_preadv() interface, Kevin Wolf, 2016/04/27