dataplane/virtio-blk: check exit conditions before aio_poll()

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>
This commit is contained in:
Stefan Hajnoczi 2013-04-11 17:24:08 +02:00
parent 88266f5aa7
commit bf0da4df83
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}