Skip to content
Commit 5f3481e9 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Theodore Ts'o
Browse files

ext4: fix cache flush in ext4_sync_file



We need to flush the write cache unconditionally in ->fsync, otherwise
writes into already allocated blocks can get lost.  Writes into fully
allocated files are very common when using disk images for
virtualization, and without this fix can easily lose data after
an fdatasync, which is the typical implementation for a cache flush on
the virtual drive.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Acked-by: default avatarEric Sandeen <sandeen@redhat.com>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent d0646f7b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment