]> 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)
commit5e73f2e58f86afafda470b1d0a5b9b24b55ba785
treee20344e3d296d2271eea093c76fa728e1c341510
parent69f702f9367bac883cdfe687159ee220ac1da1b6
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