qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Flush pending AIO on reboot and shutdown.


From: Gleb Natapov
Subject: Re: [Qemu-devel] [PATCH] Flush pending AIO on reboot and shutdown.
Date: Wed, 13 Aug 2008 18:23:29 +0300

On Wed, Aug 13, 2008 at 10:07:06AM -0500, Anthony Liguori wrote:
>>> 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?
>>   
>
> But shouldn't the various disk types be the ones to flush their  
> outstanding IO on reset?
>
Yes, conceptually this is what should be done. But all outstanding block IO
requests are stored in one global list in block-raw.c and this file also
provides a global facility to flush all request from this global queue
that is why I used it. Otherwise each subsisted will have to be touched
to have desired affect.

--
                        Gleb.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]