qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] Default to cache=writeback


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] Default to cache=writeback
Date: Tue, 1 Jun 2010 13:48:21 +0100

On Tue, Jun 1, 2010 at 12:31 PM, Alexander Graf <address@hidden> wrote:
>
> On 26.05.2010, at 21:28, Stefan Hajnoczi wrote:
>
>> On Wed, May 26, 2010 at 7:13 PM, Alexander Graf <address@hidden> wrote:
>>> In the previous discussion Anthony brought up the fact that cache=writeback 
>>> is
>>> safe enough considering data integrity. If so, I don't see a reason not to 
>>> use
>>> it as default, as it speeds up things a lot.
>>
>> cache=writeback is not a good default for qcow2:
>>
>> https://bugzilla.redhat.com/show_bug.cgi?id=572825
>> http://wiki.qemu.org/Features/Qcow2DataIntegrity
>>
>> The actual qcow2 file itself can become corrupted because metadata
>> updates are not ordered or flushed with respect to each other or data.
>> This is more serious than losing data written after the last flush.
>>
>> I believe special case cache= defaults for raw vs qcow2 have been
>> mentioned before but I don't see any code in qemu.git currently that
>> ensures qcow2 is run safely by default.
>
> Well since cache=writethrough is the default, it apparently isn't hit by the 
> issues you mentioned.

cache=writethrough is safe because it uses O_SYNC.

Stefan



reply via email to

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