qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC][PATCH] make sure disk writes actually hit disk


From: Bill C. Riemers
Subject: Re: [Qemu-devel] [RFC][PATCH] make sure disk writes actually hit disk
Date: Sat, 29 Jul 2006 13:33:01 -0400

How about compromising, and making the patch a run time option.  Presumably this is only a problem when the virtual machine is not properly shutdown.  For those ho want the extra security of knowing the data will be written regardless of the shutdown status they can enable the flag.  By default it could be turned off.  Then everybody can be happy.

Bill


On 7/29/06, Rik van Riel <address@hidden> wrote:
Fabrice Bellard wrote:
> Hi,
>
> Using O_SYNC for disk image access is not acceptable: QEMU relies on the
> host OS to ensure that the data is written correctly.

This means that write ordering is not preserved, and on a power
failure any data written by qemu (or Xen fully virt) guests may
not be preserved.

Applications running on the host can count on fsync doing the
right thing, meaning that if they call fsync, the data *will*
have made it to disk.  Applications running inside a guest have
no guarantees that their data is actually going to make it
anywhere when fsync returns...

This may look like hair splitting, but so far I've lost a
(test) postgresql database to this 3 times already.  Not getting
the guest application's data to disk when the application calls
fsync is a recipe for disaster.

--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan


_______________________________________________
Qemu-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/qemu-devel


reply via email to

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