From: Max Reitz <mreitz@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>, Fam Zheng <famz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 05/11] blockjob: add block_job_defer_to_main_loop()
Date: Tue, 21 Oct 2014 13:24:21 +0200 [thread overview]
Message-ID: <54464265.1030705@redhat.com> (raw)
In-Reply-To: <1413889440-32577-6-git-send-email-stefanha@redhat.com>
On 2014-10-21 at 13:03, Stefan Hajnoczi wrote:
> Block jobs will run in the BlockDriverState's AioContext, which may not
> always be the QEMU main loop.
>
> There are some block layer APIs that are either not thread-safe or risk
> lock ordering problems. This includes bdrv_unref(), bdrv_close(), and
> anything that calls bdrv_drain_all().
>
> The block_job_defer_to_main_loop() API allows a block job to schedule a
> function to run in the main loop with the BlockDriverState AioContext
> held.
>
> This function will be used to perform cleanup and backing chain
> manipulations in block jobs.
>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
> blockjob.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
> include/block/blockjob.h | 19 +++++++++++++++++++
> 2 files changed, 64 insertions(+)
Reviewed-by: Max Reitz <mreitz@redhat.com>
next prev parent reply other threads:[~2014-10-21 11:24 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-21 11:03 [Qemu-devel] [PATCH v2 00/11] block: allow blockjobs to coexist with dataplane Stefan Hajnoczi
2014-10-21 11:03 ` [Qemu-devel] [PATCH v2 01/11] block: acquire AioContext in generic blockjob QMP commands Stefan Hajnoczi
2014-10-21 11:03 ` [Qemu-devel] [PATCH v2 02/11] blockdev: acquire AioContext in do_qmp_query_block_jobs_one() Stefan Hajnoczi
2014-10-22 11:10 ` Max Reitz
2014-10-29 12:10 ` Stefan Hajnoczi
2014-10-21 11:03 ` [Qemu-devel] [PATCH v2 03/11] blockdev: acquire AioContext in blockdev_mark_auto_del() Stefan Hajnoczi
2014-10-21 11:03 ` [Qemu-devel] [PATCH v2 04/11] blockdev: add note that block_job_cb() must be thread-safe Stefan Hajnoczi
2014-10-21 11:03 ` [Qemu-devel] [PATCH v2 05/11] blockjob: add block_job_defer_to_main_loop() Stefan Hajnoczi
2014-10-21 11:24 ` Max Reitz [this message]
2014-10-21 11:03 ` [Qemu-devel] [PATCH v2 06/11] block: add bdrv_drain() Stefan Hajnoczi
2014-10-21 11:03 ` [Qemu-devel] [PATCH v2 07/11] block: let backup blockjob run in BDS AioContext Stefan Hajnoczi
2014-10-21 11:03 ` [Qemu-devel] [PATCH v2 08/11] block: let stream " Stefan Hajnoczi
2014-10-21 11:03 ` [Qemu-devel] [PATCH v2 09/11] block: let mirror " Stefan Hajnoczi
2014-10-21 11:03 ` [Qemu-devel] [PATCH v2 10/11] block: let commit " Stefan Hajnoczi
2014-10-21 11:28 ` Max Reitz
2014-10-21 11:04 ` [Qemu-devel] [PATCH v2 11/11] block: declare blockjobs and dataplane friends! Stefan Hajnoczi
2014-10-29 12:11 ` [Qemu-devel] [PATCH v2 00/11] block: allow blockjobs to coexist with dataplane Stefan Hajnoczi
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=54464265.1030705@redhat.com \
--to=mreitz@redhat.com \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/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).