]> Git Repo - linux.git/commit - fs/libfs.c
fs/libfs.c: add generic data flush to fsync
authorFabian Frederick <[email protected]>
Wed, 4 Jun 2014 23:06:27 +0000 (16:06 -0700)
committerLinus Torvalds <[email protected]>
Wed, 4 Jun 2014 23:53:55 +0000 (16:53 -0700)
commitac13a829f6adb674015ab399594c089990104af7
tree29f0b78758080bac01307e705371283a406b41c4
parentfd2916bd77109b69891573fd1e1205ecc619893e
fs/libfs.c: add generic data flush to fsync

Description by Jan Kara:
 "A lot of older filesystems don't properly flush volatile disk caches
  on fsync(2) which can lead to loss of fsynced data after power failure.

This patch makes generic_file_fsync() issue proper cache flush to fix the
problem.  Sysadmin can use /sys/devices/.../cache_type to tell the system
it should not send the cache flush."

[[email protected]: nuke ifdef]
[[email protected]: fix warning]
Signed-off-by: Fabian Frederick <[email protected]>
Suggested-by: Jan Kara <[email protected]>
Suggested-by: Christoph Hellwig <[email protected]>
Cc: Jan Kara <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Alexander Viro <[email protected]>
Cc: "Theodore Ts'o" <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/libfs.c
include/linux/blkdev.h
include/linux/fs.h
This page took 0.061219 seconds and 4 git commands to generate.