diff options
author | Kevin Wolf <kwolf@redhat.com> | 2017-12-10 00:11:13 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2018-06-18 15:03:25 +0200 |
commit | bb6756895459f181e2f25e877d3d7a10c297b5c8 (patch) | |
tree | b053dbf25158a20a81743e720480164001d77006 /block/io.c | |
parent | 2ef2f16781af9dee6ba6517755e9073ba5799fa2 (diff) |
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>
Diffstat (limited to 'block/io.c')
-rw-r--r-- | block/io.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/block/io.c b/block/io.c index b7beaeeb9f..5f286bcedb 100644 --- a/block/io.c +++ b/block/io.c @@ -370,10 +370,6 @@ void bdrv_unapply_subtree_drain(BdrvChild *child, BlockDriverState *old_parent) * * Note that unlike bdrv_drain_all(), the caller must hold the BlockDriverState * AioContext. - * - * Only this BlockDriverState's AioContext is run, so in-flight requests must - * not depend on events in other AioContexts. In that case, use - * bdrv_drain_all() instead. */ void coroutine_fn bdrv_co_drain(BlockDriverState *bs) { |