Re: [Qemu-devel] [PATCH] job: Fix nested aio_poll() hanging in job_txn_apply

2018-08-22 Thread Eric Blake
On 08/22/2018 12:48 AM, Fam Zheng wrote: However, I was unable to quickly audit whether all callers really did have the lock (it balloons into whether all callers of job_finalize() have the lock), so I'm reluctant to give R-b. @@ -857,10 +849,10 @@ static void job_completed_txn_success(Job *job

Re: [Qemu-devel] [PATCH] job: Fix nested aio_poll() hanging in job_txn_apply

2018-08-21 Thread Fam Zheng
On Tue, 08/21 11:15, Eric Blake wrote: > On 08/21/2018 01:45 AM, Fam Zheng wrote: > > 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, f

Re: [Qemu-devel] [PATCH] job: Fix nested aio_poll() hanging in job_txn_apply

2018-08-21 Thread Eric Blake
On 08/21/2018 01:45 AM, Fam Zheng wrote: 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. Cc: qemu-s

[Qemu-devel] [PATCH] job: Fix nested aio_poll() hanging in job_txn_apply

2018-08-20 Thread Fam Zheng
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. Cc: qemu-sta...@nongnu.org Reported-by: Gu Nini Sign