summaryrefslogtreecommitdiff
path: root/fs/f2fs/segment.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/f2fs/segment.h')
-rw-r--r--fs/f2fs/segment.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h
index bed0dc967f29..013aed2f3539 100644
--- a/fs/f2fs/segment.h
+++ b/fs/f2fs/segment.h
@@ -472,15 +472,20 @@ static inline int utilization(struct f2fs_sb_info *sbi)
* F2FS_IPU_UTIL - if FS utilization is over threashold,
* F2FS_IPU_SSR_UTIL - if SSR mode is activated and FS utilization is over
* threashold,
+ * F2FS_IPU_FSYNC - activated in fsync path only for high performance flash
+ * storages. IPU will be triggered only if the # of dirty
+ * pages over min_fsync_blocks.
* F2FS_IPUT_DISABLE - disable IPU. (=default option)
*/
#define DEF_MIN_IPU_UTIL 70
+#define DEF_MIN_FSYNC_BLOCKS 8
enum {
F2FS_IPU_FORCE,
F2FS_IPU_SSR,
F2FS_IPU_UTIL,
F2FS_IPU_SSR_UTIL,
+ F2FS_IPU_FSYNC,
F2FS_IPU_DISABLE,
};
@@ -492,10 +497,6 @@ static inline bool need_inplace_update(struct inode *inode)
if (S_ISDIR(inode->i_mode))
return false;
- /* this is only set during fdatasync */
- if (is_inode_flag_set(F2FS_I(inode), FI_NEED_IPU))
- return true;
-
switch (SM_I(sbi)->ipu_policy) {
case F2FS_IPU_FORCE:
return true;
@@ -511,6 +512,11 @@ static inline bool need_inplace_update(struct inode *inode)
if (need_SSR(sbi) && utilization(sbi) > SM_I(sbi)->min_ipu_util)
return true;
break;
+ case F2FS_IPU_FSYNC:
+ /* this is only set during fdatasync */
+ if (is_inode_flag_set(F2FS_I(inode), FI_NEED_IPU))
+ return true;
+ break;
case F2FS_IPU_DISABLE:
break;
}