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: Jamie Lokier
Subject: Re: [Qemu-devel] [PATCH] Flush pending AIO on reboot and shutdown.
Date: Thu, 14 Aug 2008 11:26:35 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

Anthony Liguori wrote:
> Gleb Natapov wrote:
> >On Wed, Aug 13, 2008 at 09:40:34PM +0300, Avi Kivity wrote:
> >  
> >>Gleb Natapov wrote:
> >>    
> >>>but what bother me is that we
> >>>consciously drop user data that we can easily save. Why? Real HW tries
> >>>hard to save every bit of user data and we just decided to drop it. The
> >>>difference between cancel or complete a request may be corrupted or not
> >>>corrupted file system after a crash.
> >>>
> >>>  
> >>>      
> >>If a guest didn't wait for an I/O to complete, it shouldn't expect it to  
> >>be on disk.
> >>    
> >If you'll save your swiss bank account details in file and suddenly
> >your guest will crash, you'll surely appreciate if qemu will save it
> >for you :)
> >
> >  
> >>Of course, we can have the IDE layer wait instead of cancelling, which  
> >>will get the request onto the disk.
> >>
> >>    
> >That is the current approach, but the wait is done for all block IO not
> >just IDE.
> >  
> 
> If the guest hasn't seen confirmation that the data is on disk, as far 
> as the guest is concerned, it's not on disk.
> 
> If you have a journalled file system, for instance, unless it receives 
> that notification, it's going to replay whatever has happened in the 
> journal since the last successful write operation.  Practically 
> speaking, I don't think you're saving data.

Except for old guests.  Old guests don't have journalled filesystems
and use the "pray it works" method.  With old hardware it generally
does work, with newer hardware its a bit less reliable.  E.g. old
disks and old BIOSes don't enable disk write cache, and old guests
don't know anything about it.

-- Jamie




reply via email to

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