test-bdrv-drain: bdrv_drain() works with cross-AioContext events
commitbb6756895459f181e2f25e877d3d7a10c297b5c8
authorKevin Wolf <kwolf@redhat.com>
Sat, 9 Dec 2017 23:11:13 +0000 (10 00:11 +0100)
committerKevin Wolf <kwolf@redhat.com>
Mon, 18 Jun 2018 13:03:25 +0000 (18 15:03 +0200)
treeb053dbf25158a20a81743e720480164001d77006
parent2ef2f16781af9dee6ba6517755e9073ba5799fa2
test-bdrv-drain: bdrv_drain() works with cross-AioContext events

As long as nobody keeps the other I/O thread from working, there is no
reason why bdrv_drain() wouldn't work with cross-AioContext events. The
key is that the root request we're waiting for is in the AioContext
we're polling (which it always is for bdrv_drain()) so that aio_poll()
is woken up in the end.

Add a test case that shows that it works. Remove the comment in
bdrv_drain() that claims otherwise.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/io.c
tests/test-bdrv-drain.c