diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-12-31 13:49:17 -0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-12-31 13:49:17 -0800 |
commit | c46a155bdf3c8877719aa63d1bf1d6e79e2a9764 (patch) | |
tree | 5e2388b5ca095d0dfc51b5f4297e5418ba3e5ba7 | |
parent | 8d4ea29b6426470456ee9daee64bac55a3b13289 (diff) | |
download | linux-c46a155bdf3c8877719aa63d1bf1d6e79e2a9764.tar.gz linux-c46a155bdf3c8877719aa63d1bf1d6e79e2a9764.tar.bz2 linux-c46a155bdf3c8877719aa63d1bf1d6e79e2a9764.zip |
f2fs: use IPU for fdatasync
This patch fixes missing IPU condition when fdatasync is called.
With this patch, fdatasync is able to avoid additional node writes for recovery.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r-- | fs/f2fs/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index b04ab40ddc73..e3d32f6b4b4f 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -202,7 +202,7 @@ int f2fs_sync_file(struct file *file, loff_t start, loff_t end, int datasync) trace_f2fs_sync_file_enter(inode); /* if fdatasync is triggered, let's do in-place-update */ - if (get_dirty_pages(inode) <= SM_I(sbi)->min_fsync_blocks) + if (datasync || get_dirty_pages(inode) <= SM_I(sbi)->min_fsync_blocks) set_inode_flag(fi, FI_NEED_IPU); ret = filemap_write_and_wait_range(inode->i_mapping, start, end); clear_inode_flag(fi, FI_NEED_IPU); |