From: Kevin Wolf <kwolf@redhat.com>
To: Fam Zheng <famz@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org,
qemu-stable@nongnu.org, Jeff Cody <jcody@redhat.com>,
mreitz@redhat.com, pbonzini@redhat.com, eblake@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2] job: Fix nested aio_poll() hanging in job_txn_apply
Date: Mon, 10 Sep 2018 17:27:24 +0200 [thread overview]
Message-ID: <20180910152724.GK4901@dhcp-200-186.str.redhat.com> (raw)
In-Reply-To: <20180824024342.749-1-famz@redhat.com>
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():
>
> 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>
Thanks, applied to the block branch.
Kevin
prev parent reply other threads:[~2018-09-10 15:33 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 ` [Qemu-devel] [Qemu-stable] " Fam Zheng
2018-09-10 15:27 ` Kevin Wolf [this message]
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=20180910152724.GK4901@dhcp-200-186.str.redhat.com \
--to=kwolf@redhat.com \
--cc=eblake@redhat.com \
--cc=famz@redhat.com \
--cc=jcody@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).