|
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 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |