Re: JFYI: ext4 bug triggerable by kvm

Anthony Liguori
2010-08-17T14:57:29Z

On 08/17/2010 09:46 AM, Christoph Hellwig wrote:
> On Tue, Aug 17, 2010 at 09:44:49AM -0500, Anthony Liguori wrote:
>
>> I think the real issue is we're mixing host configuration with guest
>> visible state.
>>
> The last time I proposed to decouple the two you and Avi were heavily
> opposed to it..
>
>
>> With O_SYNC, we're causing cache=writethrough to do writethrough
>> through two layers of the storage heirarchy. I don't think that's
>> necessary or desirable though.
>>
> It's absolutely nessecary if we tell the guest that we do not have
> a volatile write cache. Which is the only good reason to use
> data=writethrough anyway - except for dealing with old guests that
> can't handle volatile writecache it's an absolutely stupid mode of
> operation.
>

You can lose an awful lot of data with cache=writeback because the host
page cache is volatile. In a perfect world, this would only be
non-critical data because everyone would be using fsync() properly but
1) even non-critical data is important when there's a lot of it 2) we
don't live in a perfect world. The fact of the matter is, there is a
huge amount of crappy filesystems and applications today that don't
submit barriers appropriately.

We make the situation much worse with virtualization because of the
shear size of the cache we introduce.

Regards,

Anthony Liguori