* [Qemu-devel] [PATCH for-2.5] call bdrv_drain_all() even if the vm is stopped
@ 2015-11-20 9:34 Wen Congyang
2015-11-23 17:42 ` Paolo Bonzini
0 siblings, 1 reply; 2+ messages in thread
From: Wen Congyang @ 2015-11-20 9:34 UTC (permalink / raw)
To: qemu-devl, Paolo Bonzini
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH for-2.5] call bdrv_drain_all() even if the vm is stopped
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
0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2015-11-23 17:42 UTC (permalink / raw)
To: Wen Congyang, qemu-devl
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!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-11-23 17:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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.