qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fam Zheng <famz@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, qemu-block@nongnu.org,
	Jeff Cody <jcody@redhat.com>,
	qemu-stable@nongnu.org, mreitz@redhat.com, pbonzini@redhat.com,
	eblake@redhat.com
Subject: Re: [Qemu-devel] [Qemu-stable] [PATCH v2] job: Fix nested aio_poll() hanging in job_txn_apply
Date: Tue, 4 Sep 2018 09:02:04 +0800	[thread overview]
Message-ID: <20180904010204.GB28443@lemon.usersys.redhat.com> (raw)
In-Reply-To: <20180824024342.749-1-famz@redhat.com>

On Fri, 08/24 10:43, 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.
> 
> 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>

Ping?

  reply	other threads:[~2018-09-04  1:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-24  2:43 [Qemu-devel] [PATCH v2] job: Fix nested aio_poll() hanging in job_txn_apply Fam Zheng
2018-09-04  1:02 ` Fam Zheng [this message]
2018-09-10 15:27 ` Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180904010204.GB28443@lemon.usersys.redhat.com \
    --to=famz@redhat.com \
    --cc=eblake@redhat.com \
    --cc=jcody@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).