projects
/
sdk
/
emulator
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
88266f5
)
dataplane/virtio-blk: check exit conditions before aio_poll()
author
Stefan Hajnoczi
<stefanha@redhat.com>
Thu, 11 Apr 2013 15:24:08 +0000
(17:24 +0200)
committer
Stefan Hajnoczi
<stefanha@redhat.com>
Mon, 19 Aug 2013 13:45:34 +0000
(15:45 +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 <stefanha@redhat.com>
hw/block/dataplane/virtio-blk.c
patch
|
blob
|
history
diff --git
a/hw/block/dataplane/virtio-blk.c
b/hw/block/dataplane/virtio-blk.c
index 411becc06eda28be29d057596fe6a91a29567af6..5bd5eed9847a90a2d70abb5e25710a2485b1a33f 100644
(file)
--- 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;
}