diff options
| author | Fam Zheng | 2018-08-24 04:43:42 +0200 |
|---|---|---|
| committer | Kevin Wolf | 2018-09-25 15:50:15 +0200 |
| commit | 49880165a44f26dc84651858750facdee31f2513 (patch) | |
| tree | 3618fd2603a21d63298456f8b1d679d7ed736560 /include/exec | |
| parent | util/async: use qemu_aio_coroutine_enter in co_schedule_bh_cb (diff) | |
| download | qemu-49880165a44f26dc84651858750facdee31f2513.tar.gz qemu-49880165a44f26dc84651858750facdee31f2513.tar.xz qemu-49880165a44f26dc84651858750facdee31f2513.zip | |
job: Fix nested aio_poll() hanging in job_txn_apply
All callers have acquired ctx already. Doing that again results in
aio_poll() hang. This fixes the problem that a BDRV_POLL_WHILE() in the
callback cannot make progress because ctx is recursively locked, for
example, when drive-backup finishes.
There are two callers of job_finalize():
fam@lemon:~/work/qemu [master]$ git grep -w -A1 '^\s*job_finalize'
blockdev.c: job_finalize(&job->job, errp);
blockdev.c- aio_context_release(aio_context);
--
job-qmp.c: job_finalize(job, errp);
job-qmp.c- aio_context_release(aio_context);
--
tests/test-blockjob.c: job_finalize(&job->job, &error_abort);
tests/test-blockjob.c- assert(job->job.status == JOB_STATUS_CONCLUDED);
Ignoring the test, it's easy to see both callers to job_finalize (and
job_do_finalize) have acquired the context.
Cc: qemu-stable@nongnu.org
Reported-by: Gu Nini <ngu@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/exec')
0 files changed, 0 insertions, 0 deletions
