On 13/09/2018 14:52, Kevin Wolf wrote: > Also, job_drain() without aio_poll() isn't necessarily enough to make > progress on a job, it could depend on bottom halves to be executed.
This is not changed by the patch though; AIO_WAIT_WHILE does not do the bottom halves part anymore, bdrv_drain_poll_top_level does it instead. What is it that needs bottom halves to be executed? Could it delay switching the job state until after that? Thanks, Paolo