]> git.baikalelectronics.ru Git - kernel.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)
commit1b874f9e7ac30870f60a738e67b2611273e9b446
treee20344e3d296d2271eea093c76fa728e1c341510
parent0f1bd98dce22326183e671dddd3fbb81acd8e0ce
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