Re: [Qemu-block] [PATCH 04/14] job: Use AIO_WAIT_WHILE() in job_finish_sync()

2018-09-11 Thread Fam Zheng
On Fri, 09/07 18:15, Kevin Wolf wrote: > job_finish_sync() needs to release the AioContext lock of the job before > calling aio_poll(). Otherwise, callbacks called by aio_poll() would > possibly take the lock a second time and run into a deadlock with a > nested AIO_WAIT_WHILE() call. > > Also,

[Qemu-block] [PATCH 04/14] job: Use AIO_WAIT_WHILE() in job_finish_sync()

2018-09-07 Thread Kevin Wolf
job_finish_sync() needs to release the AioContext lock of the job before calling aio_poll(). Otherwise, callbacks called by aio_poll() would possibly take the lock a second time and run into a deadlock with a nested AIO_WAIT_WHILE() call. Also, job_drain() without aio_poll() isn't necessarily