From: Stefan Hajnoczi <stefanha@redhat.com>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Markus Armbruster <armbru@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] block: update bdrv_drain_all()/bdrv_drain() comments
Date: Tue, 7 Jul 2015 10:32:41 +0100 [thread overview]
Message-ID: <20150707093241.GD25892@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1435854281-6078-1-git-send-email-stefanha@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1044 bytes --]
On Thu, Jul 02, 2015 at 05:24:41PM +0100, Stefan Hajnoczi wrote:
> The doc comments for bdrv_drain_all() and bdrv_drain() are outdated:
>
> * The bdrv_drain() comment is a poor man's bdrv_lock()/bdrv_unlock()
> which Fam Zheng is currently developing. Unfortunately this warning
> was never really enough because devices keep submitting I/O and op
> blockers don't prevent that.
>
> * The bdrv_drain_all() comment is still partially correct but reflects
> the nature of the implementation rather than API documentation.
>
> Do make it clear that bdrv_drain() is only appropriate within an
> AioContext. For anything spanning AioContexts you need
> bdrv_drain_all().
>
> Cc: Markus Armbruster <armbru@redhat.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
> block/io.c | 20 ++++++++++----------
> 1 file changed, 10 insertions(+), 10 deletions(-)
Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block
Stefan
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
prev parent reply other threads:[~2015-07-07 9:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-02 16:24 [Qemu-devel] [PATCH] block: update bdrv_drain_all()/bdrv_drain() comments Stefan Hajnoczi
2015-07-03 12:49 ` Markus Armbruster
2015-07-06 3:41 ` Fam Zheng
2015-07-07 9:32 ` Stefan Hajnoczi [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=20150707093241.GD25892@stefanha-thinkpad.redhat.com \
--to=stefanha@redhat.com \
--cc=armbru@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@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).