qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Flush pending AIO on reboot and shutdown.
@ 2008-08-13 13:23 Gleb Natapov
  2008-08-13 13:46 ` Samuel Thibault
  2008-08-13 13:52 ` Anthony Liguori
  0 siblings, 2 replies; 24+ messages in thread
From: Gleb Natapov @ 2008-08-13 13:23 UTC (permalink / raw)
  To: qemu-devel

If there is outstanding IDE IO when BIOS starts execution then IDE
commands sent by BIOS will interfere with it and will leave IDE
subsystem in unpredictable state. This can happen when system reboots
unexpectedly without waiting for IO completion. Flushing IO before exit
prevents data lose.

Signed-off-by: Gleb Natapov <gleb@qumranet.com>
---

 vl.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/vl.c b/vl.c
index e42ae64..afa2a3a 100644
--- a/vl.c
+++ b/vl.c
@@ -7553,6 +7553,7 @@ static int main_loop(void)
             if (reset_requested) {
                 reset_requested = 0;
                 qemu_system_reset();
+                qemu_aio_flush();
                 ret = EXCP_INTERRUPT;
             }
             if (powerdown_requested) {
@@ -9178,6 +9179,7 @@ int main(int argc, char **argv)
     }
 
     main_loop();
+    qemu_aio_flush();
     quit_timers();
 
 #if !defined(_WIN32)

^ permalink raw reply related	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2008-08-14 10:26 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-13 13:23 [Qemu-devel] [PATCH] Flush pending AIO on reboot and shutdown Gleb Natapov
2008-08-13 13:46 ` Samuel Thibault
2008-08-13 13:59   ` Gleb Natapov
2008-08-13 14:06     ` Samuel Thibault
2008-08-13 14:25       ` Gleb Natapov
2008-08-13 14:29         ` Samuel Thibault
2008-08-13 14:40           ` Avi Kivity
2008-08-13 14:41           ` Gleb Natapov
2008-08-13 16:14             ` Samuel Thibault
2008-08-13 13:52 ` Anthony Liguori
2008-08-13 14:13   ` Gleb Natapov
2008-08-13 15:07     ` Anthony Liguori
2008-08-13 15:18       ` Avi Kivity
2008-08-13 15:47         ` Anthony Liguori
2008-08-13 16:36           ` Avi Kivity
2008-08-13 15:23       ` Gleb Natapov
2008-08-13 15:53         ` Anthony Liguori
2008-08-13 18:35           ` Gleb Natapov
2008-08-13 18:40             ` Avi Kivity
2008-08-13 18:53               ` Gleb Natapov
2008-08-13 19:04                 ` Anthony Liguori
2008-08-14 10:26                   ` Jamie Lokier
2008-08-13 19:03             ` Anthony Liguori
2008-08-13 22:32               ` Samuel Thibault

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).