From: Bharata B Rao <bharata@linux.vnet.ibm.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [RFC PATCH v0 1/3] gluster: Convert aio routines into coroutines
Date: Thu, 5 Dec 2013 16:12:43 +0530 [thread overview]
Message-ID: <20131205104243.GA21197@in.ibm.com> (raw)
In-Reply-To: <20131203140401.GE24604@stefanha-thinkpad.muc.redhat.com>
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.
next prev parent reply other threads:[~2013-12-05 12:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-22 7:16 [Qemu-devel] [RFC PATCH v0 0/3] gluster: conversion to coroutines and supporting write_zeroes Bharata B Rao
2013-11-22 7:16 ` [Qemu-devel] [RFC PATCH v0 1/3] gluster: Convert aio routines into coroutines Bharata B Rao
2013-12-03 14:04 ` Stefan Hajnoczi
2013-12-05 10:42 ` Bharata B Rao [this message]
2013-11-22 7:16 ` [Qemu-devel] [RFC PATCH v0 2/3] gluster: Implement .bdrv_co_write_zeroes for gluster Bharata B Rao
2013-12-04 19:16 ` Jeff Cody
2013-12-05 10:45 ` Bharata B Rao
2013-11-22 7:16 ` [Qemu-devel] [RFC PATCH v0 3/3] gluster: Add support for creating zero-filled image Bharata B Rao
2013-12-04 19:00 ` Jeff Cody
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131205104243.GA21197@in.ibm.com \
--to=bharata@linux.vnet.ibm.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.