fsck: introduce generic function f2fs_fsync_device
authorYunlei He <heyunlei@huawei.com>
Tue, 17 Oct 2017 07:03:51 +0000 (15:03 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 26 Oct 2017 10:25:27 +0000 (12:25 +0200)
commit1797a5f092f5a16c004d63ff66aa7c70e5260897
treea157fb7d2753952cfae2c4447c78b56d376206c0
parentb449febe90e141bf44ccc8cc9f82daaedfb85fa9
fsck: introduce generic function f2fs_fsync_device

We use f2fs_finalize_device to fsync previous data in
checkpoint area before write last CP pack, in order to avoid
cp corruption in sudden-power-off case. But this function will
close the device, so this patch introduce a function to call
fsync() only.

Signed-off-by: Yunlei He <heyunlei@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fsck/mount.c
include/f2fs_fs.h
lib/libf2fs_io.c