Re: JFYI: ext4 bug triggerable by kvm

Christoph Hellwig
2010-08-17T09:07:57Z

On Mon, Aug 16, 2010 at 03:34:12PM -0500, Anthony Liguori wrote:
> On 08/16/2010 01:42 PM, Christoph Hellwig wrote:
> >On Mon, Aug 16, 2010 at 09:43:09AM -0500, Anthony Liguori wrote:
> >>>Also, ext4 is _very_ slow on O_SYNC writes (which is
> >>>used in kvm with default cache).
> >>Yeah, we probably need to switch to sync_file_range() to avoid the
> >>journal commit on every write.
> >>
> >No, we don't. sync_file_range does not actually provide any data
> >integrity.
>
> What do you mean by data integrity?

sync_file_range only does pagecache-level writeout of the file data.
It nevers calls into the actual filesystem, that means any block
allocations (for filling holes / converting preallocated space in normal
filesystems, or every write in COW-based filesstems like qcow2) never
get flushes to disk, and even more importantly the disk write cache is
never flushed.

In short it's completely worthless for any real filesystem.