All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Wen Congyang <wency@cn.fujitsu.com>, qemu-devl <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH for-2.5] call bdrv_drain_all() even if the vm is stopped
Date: Mon, 23 Nov 2015 18:42:32 +0100	[thread overview]
Message-ID: <56535008.4010304@redhat.com> (raw)
In-Reply-To: <564EE92E.4070701@cn.fujitsu.com>



On 20/11/2015 10:34, Wen Congyang wrote:
> There are still I/O operations when the vm is stopped. For example, stop the vm, and do block
> migration. In this case, we don't drain all I/O operation, and may meet the following problem:
> qemu-system-x86_64: migration/block.c:731: block_save_complete: Assertion `block_mig_state.submitted == 0' failed.
> 
> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
> ---
>  cpus.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/cpus.c b/cpus.c
> index 877bd70..43676fa 100644
> --- a/cpus.c
> +++ b/cpus.c
> @@ -1415,6 +1415,8 @@ int vm_stop_force_state(RunState state)
>          return vm_stop(state);
>      } else {
>          runstate_set(state);
> +
> +        bdrv_drain_all();
>          /* Make sure to return an error if the flush in a previous vm_stop()
>           * failed. */
>          return bdrv_flush_all();
> 

Queued for 2.5-rc2, thanks!

      reply	other threads:[~2015-11-23 17:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-20  9:34 [Qemu-devel] [PATCH for-2.5] call bdrv_drain_all() even if the vm is stopped Wen Congyang
2015-11-23 17:42 ` Paolo Bonzini [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=56535008.4010304@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=wency@cn.fujitsu.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 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.