[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC 02/13] dataplane/virtio-blk: check exit conditions bef
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [RFC 02/13] dataplane/virtio-blk: check exit conditions before aio_poll() |
Date: |
Thu, 11 Apr 2013 17:44:34 +0200 |
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 5baef23..982896c 100644
--- a/hw/block/dataplane/virtio-blk.c
+++ b/hw/block/dataplane/virtio-blk.c
@@ -378,9 +378,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
- [Qemu-devel] [RFC 11/13] dataplane/virtio-blk: drop flush_true() and flush_io(), (continued)
- [Qemu-devel] [RFC 11/13] dataplane/virtio-blk: drop flush_true() and flush_io(), Stefan Hajnoczi, 2013/04/11
- [Qemu-devel] [RFC 12/13] thread-pool: drop thread_pool_active(), Stefan Hajnoczi, 2013/04/11
- [Qemu-devel] [RFC 05/13] block/gluster: drop qemu_gluster_aio_flush_cb(), Stefan Hajnoczi, 2013/04/11
- [Qemu-devel] [RFC 01/13] block: stop relying on io_flush() in bdrv_drain_all(), Stefan Hajnoczi, 2013/04/11
- [Qemu-devel] [RFC 10/13] block/sheepdog: drop have_co_req() and aio_flush_request(), Stefan Hajnoczi, 2013/04/11
- [Qemu-devel] [RFC 09/13] block/rbd: drop qemu_rbd_aio_flush_cb(), Stefan Hajnoczi, 2013/04/11
- [Qemu-devel] [RFC 13/13] aio: drop io_flush argument, Stefan Hajnoczi, 2013/04/11
- [Qemu-devel] [RFC 06/13] block/iscsi: drop iscsi_process_flush(), Stefan Hajnoczi, 2013/04/11
- [Qemu-devel] [RFC 04/13] block/curl: drop curl_aio_flush(), Stefan Hajnoczi, 2013/04/11
- [Qemu-devel] [RFC 08/13] block/nbd: drop nbd_have_request(), Stefan Hajnoczi, 2013/04/11
- [Qemu-devel] [RFC 02/13] dataplane/virtio-blk: check exit conditions before aio_poll(),
Stefan Hajnoczi <=
- Re: [Qemu-devel] [RFC 00/13] aio: drop io_flush(), Kevin Wolf, 2013/04/12
- Re: [Qemu-devel] [RFC 00/13] aio: drop io_flush(), Stefan Hajnoczi, 2013/04/12
- Re: [Qemu-devel] [RFC 00/13] aio: drop io_flush(), Kevin Wolf, 2013/04/12
- Re: [Qemu-devel] [RFC 00/13] aio: drop io_flush(), Paolo Bonzini, 2013/04/12
- Re: [Qemu-devel] [RFC 00/13] aio: drop io_flush(), Stefan Hajnoczi, 2013/04/12
- Re: [Qemu-devel] [RFC 00/13] aio: drop io_flush(), Kevin Wolf, 2013/04/12
- Re: [Qemu-devel] [RFC 00/13] aio: drop io_flush(), Stefan Hajnoczi, 2013/04/12