mirror of https://github.com/xemu-project/xemu.git
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:
parent
88266f5aa7
commit
bf0da4df83
|
@ -376,9 +376,9 @@ static void *data_plane_thread(void *opaque)
|
||||||
{
|
{
|
||||||
VirtIOBlockDataPlane *s = opaque;
|
VirtIOBlockDataPlane *s = opaque;
|
||||||
|
|
||||||
do {
|
while (!s->stopping || s->num_reqs > 0) {
|
||||||
aio_poll(s->ctx, true);
|
aio_poll(s->ctx, true);
|
||||||
} while (!s->stopping || s->num_reqs > 0);
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue