qemu-block
[Top][All Lists]
Advanced

[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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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