[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 03/18] dataplane/virtio-blk: check exit condi
From: |
Jeff Cody |
Subject: |
Re: [Qemu-devel] [PATCH v6 03/18] dataplane/virtio-blk: check exit conditions before aio_poll() |
Date: |
Fri, 26 Jul 2013 12:44:54 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Jul 25, 2013 at 05:18:10PM +0200, Stefan Hajnoczi wrote:
> Check exit conditions before entering blocking aio_poll(). This is
> mainly for consistency since it's unlikely that we are stopping in the
> first event loop iteration.
>
> Signed-off-by: Stefan Hajnoczi <address@hidden>
> ---
> hw/block/dataplane/virtio-blk.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c
> index 2faed43..8d3e145 100644
> --- a/hw/block/dataplane/virtio-blk.c
> +++ b/hw/block/dataplane/virtio-blk.c
> @@ -379,9 +379,9 @@ static void *data_plane_thread(void *opaque)
> {
> VirtIOBlockDataPlane *s = opaque;
>
> - do {
> + while (!s->stopping || s->num_reqs > 0) {
> aio_poll(s->ctx, true);
> - } while (!s->stopping || s->num_reqs > 0);
> + }
> return NULL;
> }
>
> --
> 1.8.1.4
>
>
Reviewed-by: Jeff Cody <address@hidden>
- [Qemu-devel] [PATCH v6 00/18] aio: drop io_flush(), Stefan Hajnoczi, 2013/07/25
- [Qemu-devel] [PATCH v6 03/18] dataplane/virtio-blk: check exit conditions before aio_poll(), Stefan Hajnoczi, 2013/07/25
- [Qemu-devel] [PATCH v6 02/18] block: stop relying on io_flush() in bdrv_drain_all(), Stefan Hajnoczi, 2013/07/25
- [Qemu-devel] [PATCH v6 06/18] aio: stop using .io_flush(), Stefan Hajnoczi, 2013/07/25
- Re: [Qemu-devel] [PATCH v6 06/18] aio: stop using .io_flush(), Jeff Cody, 2013/07/26
- Re: [Qemu-devel] [PATCH v6 06/18] aio: stop using .io_flush(), Wenchao Xia, 2013/07/29