From: Gleb Natapov <gleb@qumranet.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Flush pending AIO on reboot and shutdown.
Date: Wed, 13 Aug 2008 17:13:46 +0300 [thread overview]
Message-ID: <20080813141346.GC17567@minantech.com> (raw)
In-Reply-To: <48A2E732.4040501@codemonkey.ws>
On Wed, Aug 13, 2008 at 08:52:50AM -0500, Anthony Liguori wrote:
> Gleb Natapov wrote:
>> 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();
>>
>
> Perhaps the aio block layer should do qemu_register_reset() with a
> handler that does a flush.
>
I though about doing it this way, but then I saw that qemu_register_reset()
is used for HW reset notification only. I don't think that hw/ide.c is the
right place to register the notifier though, so I decided to call it
explicitly. Do you think I should do qemu_register_reset() in block.c?
--
Gleb.
next prev parent reply other threads:[~2008-08-13 14:13 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
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=20080813141346.GC17567@minantech.com \
--to=gleb@qumranet.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 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).