]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
nilfs2: flush disk caches in syncing
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Thu, 31 May 2012 23:26:11 +0000 (16:26 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 1 Jun 2012 00:49:27 +0000 (17:49 -0700)
commit11475975dd3c0a8e639f1544ef6530373de5979e
treee20344e3d296d2271eea093c76fa728e1c341510
parenta1d494495c69ef0810cd008f59310d2b9db28e36
nilfs2: flush disk caches in syncing

There are two cases that the cache flush is needed to avoid data loss
against unexpected hang or power failure.  One is sync file function (i.e.
 nilfs_sync_file) and another is checkpointing ioctl.

This issues a cache flush request to device for such cases if barrier
mount option is enabled, and makes sure data really is on persistent
storage on their completion.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/nilfs2/file.c
fs/nilfs2/ioctl.c