[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-stable] [PATCH v2] job: Fix nested aio_poll() hanging in job_t
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-stable] [PATCH v2] job: Fix nested aio_poll() hanging in job_txn_apply |
Date: |
Mon, 10 Sep 2018 17:27:24 +0200 |
User-agent: |
Mutt/1.9.1 (2017-09-22) |
Am 24.08.2018 um 04:43 hat Fam Zheng geschrieben:
> 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():
>
> address@hidden:~/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: address@hidden
> Reported-by: Gu Nini <address@hidden>
> Reviewed-by: Eric Blake <address@hidden>
> Signed-off-by: Fam Zheng <address@hidden>
Thanks, applied to the block branch.
Kevin