aio-wait: Increase num_waiters even in home thread
authorKevin Wolf <kwolf@redhat.com>
Wed, 5 Sep 2018 16:14:17 +0000 (18:14 +0200)
committerKevin Wolf <kwolf@redhat.com>
Tue, 25 Sep 2018 13:50:15 +0000 (15:50 +0200)
commit486574483aba988c83b20e7d3f1ccd50c4c333d8
treea09a6a9d2eba3720d14f5cbfdc6bf2278ecf53bb
parent34dc97b9a0e592bc466bdb0bbfe45d77304a72b6
aio-wait: Increase num_waiters even in home thread

Even if AIO_WAIT_WHILE() is called in the home context of the
AioContext, we still want to allow the condition to change depending on
other threads as long as they kick the AioWait. Specfically block jobs
can be running in an I/O thread and should then be able to kick a drain
in the main loop context.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
include/block/aio-wait.h