diff options
author | Kevin Wolf <kwolf@redhat.com> | 2018-04-10 15:51:52 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2018-06-18 15:03:25 +0200 |
commit | 4d22bbf4ef72583eefdf44db6bf9fc7683fbc4c2 (patch) | |
tree | 1cb73c38dd003a6294b9451fb333f570b8ec6ed0 /block/io.c | |
parent | 57320ca961c2e8488e1884b4ebbcb929b6901dc6 (diff) |
block: Allow AIO_WAIT_WHILE with NULL ctx
bdrv_drain_all() wants to have a single polling loop for draining the
in-flight requests of all nodes. This means that the AIO_WAIT_WHILE()
condition relies on activity in multiple AioContexts, which is polled
from the mainloop context. We must therefore call AIO_WAIT_WHILE() from
the mainloop thread and use the AioWait notification mechanism.
Just randomly picking the AioContext of any non-mainloop thread would
work, but instead of bothering to find such a context in the caller, we
can just as well accept NULL for ctx.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/io.c')
0 files changed, 0 insertions, 0 deletions