[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] Flush pending AIO on reboot and shutdown.
From: |
Gleb Natapov |
Subject: |
[Qemu-devel] [PATCH] Flush pending AIO on reboot and shutdown. |
Date: |
Wed, 13 Aug 2008 16:23:58 +0300 |
User-agent: |
StGIT/0.14.2 |
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 <address@hidden>
---
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)
- [Qemu-devel] [PATCH] Flush pending AIO on reboot and shutdown.,
Gleb Natapov <=
- Re: [Qemu-devel] [PATCH] Flush pending AIO on reboot and shutdown., Samuel Thibault, 2008/08/13
- Re: [Qemu-devel] [PATCH] Flush pending AIO on reboot and shutdown., Gleb Natapov, 2008/08/13
- Re: [Qemu-devel] [PATCH] Flush pending AIO on reboot and shutdown., Samuel Thibault, 2008/08/13
- Re: [Qemu-devel] [PATCH] Flush pending AIO on reboot and shutdown., Gleb Natapov, 2008/08/13
- Re: [Qemu-devel] [PATCH] Flush pending AIO on reboot and shutdown., Samuel Thibault, 2008/08/13
- Re: [Qemu-devel] [PATCH] Flush pending AIO on reboot and shutdown., Avi Kivity, 2008/08/13
- Re: [Qemu-devel] [PATCH] Flush pending AIO on reboot and shutdown., Gleb Natapov, 2008/08/13
- Re: [Qemu-devel] [PATCH] Flush pending AIO on reboot and shutdown., Samuel Thibault, 2008/08/13
Re: [Qemu-devel] [PATCH] Flush pending AIO on reboot and shutdown., Anthony Liguori, 2008/08/13