Re: JFYI: ext4 bug triggerable by kvm

Christoph Hellwig
2010-08-17T14:45:08Z

On Tue, Aug 17, 2010 at 09:39:15AM -0500, Anthony Liguori wrote:
> The type of cache we present to the guest only should relate to how
> the hypervisor caches the storage. It should be independent of how
> data is cached by the disk.

It is.

> There can be many levels of caching in a storage hierarchy and each
> hierarchy cached independently of the next level.
>
> If the user has a disk with a writeback cache, if we expose a
> writethrough cache to the guest, it's not our responsibility to make
> sure that we break through the writeback cache on the disk.

The users doesn't know or have to care about the caching. The
users uses O_SYNC/fsync to tell it wants data on disk, and it's the
operating systems job to make that happen. The situation with qemu
is the same - if we tell the guest that we do not have a volatile write
cache that needs explicit management the guest can rely on the fact
that it does not have to do manual cache management.