qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC PATCH v0 1/3] gluster: Convert aio routines into c


From: Bharata B Rao
Subject: Re: [Qemu-devel] [RFC PATCH v0 1/3] gluster: Convert aio routines into coroutines
Date: Thu, 5 Dec 2013 16:12:43 +0530
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Dec 03, 2013 at 03:04:01PM +0100, Stefan Hajnoczi wrote:
> On Fri, Nov 22, 2013 at 12:46:16PM +0530, Bharata B Rao wrote:
> > +    qemu_bh_delete(acb->bh);
> > +    acb->bh = NULL;
> > +    qemu_coroutine_enter(acb->coroutine, NULL);
> > +    if (acb->finished) {
> > +        *acb->finished = true;
> > +    }
> 
> Now that aio interfaces are gone ->finished and cancellation can be
> removed.
> 
> > +    qemu_aio_release(acb);
> 
> Please do this in the functions that called qemu_aio_get().  Coroutines
> may yield so it's a little risky to assume the coroutine has finished
> accessing acb.
> > -static BlockDriverAIOCB *qemu_gluster_aio_rw(BlockDriverState *bs,
> > -        int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
> > -        BlockDriverCompletionFunc *cb, void *opaque, int write)
> > +static coroutine_fn int qemu_gluster_aio_rw(BlockDriverState *bs,
> > +        int64_t sector_num, int nb_sectors, QEMUIOVector *qiov, int write)
> 
> Please rename this to qemu_gluster_co_rw() since it isn't aio anymore
> and doesn't return a BlockDriverAIOCB.

Thanks will address these in v1.

Regards,
Bharata.




reply via email to

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