mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
cpus: flush all requests on each vm stop
Flush all requests once we have stopped all cpus and devices. Make sure disk is in consistent state. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Tested-by: Jason Wang <jasowang@redhat.com> Acked-by: Marcelo Tosatti <mtosatti@redhat.com>
This commit is contained in:
parent
3a75e74c76
commit
55df6f3365
1 changed files with 2 additions and 0 deletions
2
cpus.c
2
cpus.c
|
@ -111,6 +111,8 @@ static void do_vm_stop(int reason)
|
|||
vm_running = 0;
|
||||
pause_all_vcpus();
|
||||
vm_state_notify(0, reason);
|
||||
qemu_aio_flush();
|
||||
bdrv_flush_all();
|
||||
monitor_protocol_event(QEVENT_STOP, NULL);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue