diff options
author | Kevin Wolf <kwolf@redhat.com> | 2018-08-17 14:58:49 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2018-09-25 15:50:15 +0200 |
commit | de0fbe64806321fc3e6399bfab360553db87a41d (patch) | |
tree | 8a9a8c219b3ea06f07aaaf5667350f3c75008c1e /scripts/qtest.py | |
parent | 30c070a547322a5e41ce129d540bca3653b1a9c8 (diff) | |
download | qemu-de0fbe64806321fc3e6399bfab360553db87a41d.zip qemu-de0fbe64806321fc3e6399bfab360553db87a41d.tar.gz qemu-de0fbe64806321fc3e6399bfab360553db87a41d.tar.bz2 |
job: Use AIO_WAIT_WHILE() in job_finish_sync()
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 enough to make
progress on a job, it could depend on bottom halves to be executed.
Combine both open-coded while loops into a single AIO_WAIT_WHILE() call
that solves both of these problems.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'scripts/qtest.py')
0 files changed, 0 insertions, 0 deletions