[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 03/18] dataplane/virtio-blk: check exit conditions be
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL 03/18] dataplane/virtio-blk: check exit conditions before aio_poll() |
Date: |
Mon, 19 Aug 2013 16:17:42 +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 411becc..5bd5eed 100644
--- a/hw/block/dataplane/virtio-blk.c
+++ b/hw/block/dataplane/virtio-blk.c
@@ -376,9 +376,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.3.1
- [Qemu-devel] [PULL v2 00/18] Block patches, Stefan Hajnoczi, 2013/08/19
- [Qemu-devel] [PULL 03/18] dataplane/virtio-blk: check exit conditions before aio_poll(),
Stefan Hajnoczi <=
- [Qemu-devel] [PULL 02/18] block: stop relying on io_flush() in bdrv_drain_all(), Stefan Hajnoczi, 2013/08/19
- [Qemu-devel] [PULL 05/18] tests: adjust test-thread-pool to new aio_poll() semantics, Stefan Hajnoczi, 2013/08/19
- [Qemu-devel] [PULL 01/18] block: ensure bdrv_drain_all() works during bdrv_delete(), Stefan Hajnoczi, 2013/08/19
- [Qemu-devel] [PULL 04/18] tests: adjust test-aio to new aio_poll() semantics, Stefan Hajnoczi, 2013/08/19
- [Qemu-devel] [PULL 07/18] block/curl: drop curl_aio_flush(), Stefan Hajnoczi, 2013/08/19
- [Qemu-devel] [PULL 06/18] aio: stop using .io_flush(), Stefan Hajnoczi, 2013/08/19
- [Qemu-devel] [PULL 09/18] block/iscsi: drop iscsi_process_flush(), Stefan Hajnoczi, 2013/08/19
- [Qemu-devel] [PULL 08/18] block/gluster: drop qemu_gluster_aio_flush_cb(), Stefan Hajnoczi, 2013/08/19