diff options
| author | Kevin Wolf | 2018-04-10 15:51:52 +0200 |
|---|---|---|
| committer | Kevin Wolf | 2018-06-18 15:03:25 +0200 |
| commit | 4d22bbf4ef72583eefdf44db6bf9fc7683fbc4c2 (patch) | |
| tree | 1cb73c38dd003a6294b9451fb333f570b8ec6ed0 /block | |
| parent | test-bdrv-drain: Test that bdrv_drain_invoke() doesn't poll (diff) | |
| download | qemu-4d22bbf4ef72583eefdf44db6bf9fc7683fbc4c2.tar.gz qemu-4d22bbf4ef72583eefdf44db6bf9fc7683fbc4c2.tar.xz qemu-4d22bbf4ef72583eefdf44db6bf9fc7683fbc4c2.zip | |
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')
0 files changed, 0 insertions, 0 deletions
