From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 1/2] block: add the support to drain throttled requests
Date: Mon, 12 Mar 2012 08:27:31 +0100 [thread overview]
Message-ID: <jjk8h3$ide$1@dough.gmane.org> (raw)
In-Reply-To: <1331533744-15802-1-git-send-email-zwu.kernel@gmail.com>
Il 12/03/2012 07:29, zwu.kernel@gmail.com ha scritto:
> From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
>
> Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
> ---
> block.c | 21 +++++++++++++++++++++
> block_int.h | 1 +
> 2 files changed, 22 insertions(+), 0 deletions(-)
>
> diff --git a/block.c b/block.c
> index 52ffe14..0825168 100644
> --- a/block.c
> +++ b/block.c
> @@ -853,6 +853,21 @@ void bdrv_close_all(void)
> }
> }
>
> +/**
> + * Complete all pending requests for a block device
> + */
> +void bdrv_drain(BlockDriverState *bs)
> +{
> + do {
> + qemu_co_queue_restart_all(&bs->throttled_reqs);
> + } while (!qemu_co_queue_empty(&bs->throttled_reqs));
> +
> + qemu_aio_flush();
This doesn't work, qemu_aio_flush can start new I/O.
Paolo
next prev parent reply other threads:[~2012-03-12 7:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-12 6:29 [Qemu-devel] [PATCH v2 1/2] block: add the support to drain throttled requests zwu.kernel
2012-03-12 7:27 ` Paolo Bonzini [this message]
2012-03-12 8:42 ` Zhi Yong Wu
2012-03-12 8:48 ` Paolo Bonzini
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='jjk8h3$ide$1@dough.gmane.org' \
--to=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.