qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-stable@nongnu.org
Subject: [Qemu-devel] [PULL 2/9] call bdrv_drain_all() even if the vm is stopped
Date: Thu, 26 Nov 2015 16:52:10 +0100	[thread overview]
Message-ID: <1448553137-22191-3-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1448553137-22191-1-git-send-email-pbonzini@redhat.com>

From: Wen Congyang <wency@cn.fujitsu.com>

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>
Message-Id: <564EE92E.4070701@cn.fujitsu.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.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();
-- 
2.5.0

  parent reply	other threads:[~2015-11-26 15:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-26 15:52 [Qemu-devel] [PULL v2 0/9] Misc patches for QEMU 2.5-rc2 Paolo Bonzini
2015-11-26 15:52 ` [Qemu-devel] [PULL 1/9] MAINTAINERS: Update TCG CPU cores section Paolo Bonzini
2015-11-26 15:52 ` Paolo Bonzini [this message]
2015-11-26 15:52 ` [Qemu-devel] [PULL 3/9] Revert "exec: silence hugetlbfs warning under qtest" Paolo Bonzini
2015-11-26 15:52 ` [Qemu-devel] [PULL 4/9] exec: remove warning about mempath and hugetlbfs Paolo Bonzini
2015-11-26 15:52 ` [Qemu-devel] [PULL 5/9] target-sparc: fix 32-bit truncation in fpackfix Paolo Bonzini
2015-11-26 15:52 ` [Qemu-devel] [PULL 6/9] virtio-scsi: don't crash without a valid device Paolo Bonzini
2015-11-26 15:52 ` [Qemu-devel] [PULL 7/9] target-i386: kvm: Abort if MCE bank count is not supported by host Paolo Bonzini
2015-11-26 15:52 ` [Qemu-devel] [PULL 8/9] target-i386: kvm: Use env->mcg_cap when setting up MCE Paolo Bonzini
2015-11-26 15:52 ` [Qemu-devel] [PULL 9/9] target-i386: kvm: Print warning when clearing mcg_cap bits Paolo Bonzini
2015-11-26 16:27 ` [Qemu-devel] [PULL v2 0/9] Misc patches for QEMU 2.5-rc2 Peter Maydell

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=1448553137-22191-3-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@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).