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 <[email protected]> > --- > 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 <[email protected]>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
