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: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [RFC PATCH v0 1/3] gluster: Convert aio routines into coroutines
Date: Tue, 3 Dec 2013 15:04:01 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

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.



reply via email to

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