diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2014-07-24 22:11:43 -0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2014-07-30 17:13:23 -0400 |
commit | ea1aa12ca237149227ef68af50c9a1acf027b625 (patch) | |
tree | 12ac50b385998668bc2978e0949897e071b43ea3 /fs/f2fs/segment.h | |
parent | 6d99ba41a72c1213f2029e6fc66aa7943339b5db (diff) |
f2fs: enable in-place-update for fdatasync
This patch enforces in-place-updates only when fdatasync is requested.
If we adopt this in-place-updates for the fdatasync, we can skip to write the
recovery information.
Reviewed-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/segment.h')
-rw-r--r-- | fs/f2fs/segment.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h index ee5c75e08d9c..55973f7b0330 100644 --- a/fs/f2fs/segment.h +++ b/fs/f2fs/segment.h | |||
@@ -486,6 +486,10 @@ static inline bool need_inplace_update(struct inode *inode) | |||
486 | if (S_ISDIR(inode->i_mode)) | 486 | if (S_ISDIR(inode->i_mode)) |
487 | return false; | 487 | return false; |
488 | 488 | ||
489 | /* this is only set during fdatasync */ | ||
490 | if (is_inode_flag_set(F2FS_I(inode), FI_NEED_IPU)) | ||
491 | return true; | ||
492 | |||
489 | switch (SM_I(sbi)->ipu_policy) { | 493 | switch (SM_I(sbi)->ipu_policy) { |
490 | case F2FS_IPU_FORCE: | 494 | case F2FS_IPU_FORCE: |
491 | return true; | 495 | return true; |