From: Fam Zheng <famz@redhat.com>
To: Max Reitz <mreitz@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH for-2.11] block: Keep strong reference when draining all BDS
Date: Fri, 10 Nov 2017 23:31:03 +0800 [thread overview]
Message-ID: <20171110153103.GB9235@lemon.Home> (raw)
In-Reply-To: <d0e58edd-39cf-2bb5-61bd-442825b82ff9@redhat.com>
On Fri, 11/10 16:23, Max Reitz wrote:
> But bdrv_unref() is safe only in the main loop. Without having checked,
> I'm not sure whether all callers of bdrv_next() are running in the main
> loop.
They must be. The reasoning is simple:
1) one needs to acquire the ctx of all the BDSes for safe access;
2) only main loop can acquire any BDS' ctx;
So there is no way bdrv_next can work in an IOThread.
Fam
next prev parent reply other threads:[~2017-11-10 15:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-09 20:43 [Qemu-devel] [PATCH for-2.11] block: Keep strong reference when draining all BDS Max Reitz
2017-11-09 21:02 ` Eric Blake
2017-11-10 2:45 ` Fam Zheng
2017-11-10 13:17 ` Kevin Wolf
2017-11-10 13:32 ` Fam Zheng
2017-11-10 15:23 ` Max Reitz
2017-11-10 15:31 ` Fam Zheng [this message]
2017-11-10 16:05 ` Kevin Wolf
2017-11-10 16:13 ` Max Reitz
2017-11-10 16:22 ` Kevin Wolf
2017-11-10 16:43 ` Max Reitz
2017-11-10 9:19 ` Stefan Hajnoczi
2017-11-10 15:26 ` Max Reitz
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=20171110153103.GB9235@lemon.Home \
--to=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@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).