qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fam Zheng <famz@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: pbonzini@redhat.com, qemu-block@nongnu.org,
	qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH] Revert "blockdev: add note that block_job_cb() must be thread-safe"
Date: Tue, 13 Oct 2015 20:33:34 +0800	[thread overview]
Message-ID: <20151013123334.GE28309@ad.nay.redhat.com> (raw)
In-Reply-To: <20151013112147.GI4906@noname.str.redhat.com>

On Tue, 10/13 13:21, Kevin Wolf wrote:
> Am 13.10.2015 um 12:16 hat Fam Zheng geschrieben:
> > This reverts commit 723c5d93c51bdb3adbc238ce90195c0864aa6cd5.
> > 
> > block_job_cb is called by block_job_completed, which is always called in
> > a main loop bottom half in existing block jobs. So we don't need to
> > worry about thread-safety here.
> > 
> > Signed-off-by: Fam Zheng <famz@redhat.com>
> > ---
> >  blockdev.c | 5 -----
> >  1 file changed, 5 deletions(-)
> > 
> > diff --git a/blockdev.c b/blockdev.c
> > index 32b04b4..130b7fb 100644
> > --- a/blockdev.c
> > +++ b/blockdev.c
> > @@ -2248,11 +2248,6 @@ out:
> >  
> >  static void block_job_cb(void *opaque, int ret)
> >  {
> > -    /* Note that this function may be executed from another AioContext besides
> > -     * the QEMU main loop.  If you need to access anything that assumes the
> > -     * QEMU global mutex, use a BH or introduce a mutex.
> > -     */
> > -
> >      BlockDriverState *bs = opaque;
> >      const char *msg = NULL;
> 
> Should we instead add a comment that tells you that you _have_ to use
> that bottom half because block jobs can be running in an I/O thread?

Probably, but this comment is stale anyway.

Fam

  reply	other threads:[~2015-10-13 12:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-13 10:16 [Qemu-devel] [PATCH] Revert "blockdev: add note that block_job_cb() must be thread-safe" Fam Zheng
2015-10-13 11:21 ` Kevin Wolf
2015-10-13 12:33   ` Fam Zheng [this message]
2015-10-14 13:51 ` Stefan Hajnoczi
2015-10-15  2:51   ` Fam Zheng
2015-10-15 15:17     ` 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=20151013123334.GE28309@ad.nay.redhat.com \
    --to=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --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).