qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [Qemu-devel] [PATCH v2 03/17] block: Support AIO driver


From: Fam Zheng
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH v2 03/17] block: Support AIO drivers in bdrv_driver_preadv/pwritev()
Date: Fri, 29 Apr 2016 11:25:15 +0800
User-agent: Mutt/1.6.0 (2016-04-01)

On Fri, 04/29 09:22, Fam Zheng wrote:
> > @@ -125,19 +119,13 @@ void bdrv_io_limits_update_group(BlockDriverState 
> > *bs, const char *group)
> >  
> >  void bdrv_setup_io_funcs(BlockDriver *bdrv)
> >  {
> > -    /* Block drivers without coroutine functions need emulation */
> > -    if (!bdrv->bdrv_co_readv) {
> > -        bdrv->bdrv_co_readv = bdrv_co_readv_em;
> > -        bdrv->bdrv_co_writev = bdrv_co_writev_em;
> > -
> > -        /* bdrv_co_readv_em()/brdv_co_writev_em() work in terms of aio, so 
> > if
> > -         * the block driver lacks aio we need to emulate that too.
> > -         */
> > -        if (!bdrv->bdrv_aio_readv) {
> > -            /* add AIO emulation layer */
> > -            bdrv->bdrv_aio_readv = bdrv_aio_readv_em;
> > -            bdrv->bdrv_aio_writev = bdrv_aio_writev_em;
> > -        }
> > +    /* bdrv_co_readv_em()/brdv_co_writev_em() work in terms of aio, so if
> > +     * the block driver lacks aio we need to emulate that.
> > +     */
> > +    if (!bdrv->bdrv_aio_readv) {
> 
> I'd also AND with !bdrv->bdrv_co_readv, because in that case the em functions
> are assigned but not used.

Never mind, I see the last patch removes this altogether.

Fam



reply via email to

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