From: Wen Congyang <wency@cn.fujitsu.com>
To: qemu-devl <qemu-devel@nongnu.org>, Paolo Bonzini <pbonzini@redhat.com>
Subject: [Qemu-devel] [PATCH for-2.5] call bdrv_drain_all() even if the vm is stopped
Date: Fri, 20 Nov 2015 17:34:38 +0800 [thread overview]
Message-ID: <564EE92E.4070701@cn.fujitsu.com> (raw)
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();
--
2.5.0
next reply other threads:[~2015-11-20 9:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-20 9:34 Wen Congyang [this message]
2015-11-23 17:42 ` [Qemu-devel] [PATCH for-2.5] call bdrv_drain_all() even if the vm is stopped 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=564EE92E.4070701@cn.fujitsu.com \
--to=wency@cn.fujitsu.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 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.