diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-01-08 16:57:48 -0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-01-11 15:56:37 -0800 |
commit | d0239e1bf5204d602281f93c01d46bcf3531098d (patch) | |
tree | e95f1b3567398de0dbe532689671050325e79eb5 /fs/f2fs/segment.c | |
parent | 6beceb5427aa8731f958d2484e0fd8ff21d604dc (diff) | |
download | op-kernel-dev-d0239e1bf5204d602281f93c01d46bcf3531098d.zip op-kernel-dev-d0239e1bf5204d602281f93c01d46bcf3531098d.tar.gz |
f2fs: detect idle time depending on user behavior
This patch adds last time that user requested filesystem operations.
This information is used to detect whether system is idle or not later.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/segment.c')
-rw-r--r-- | fs/f2fs/segment.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index fed23d5..d8ad1ab 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -293,7 +293,7 @@ void f2fs_balance_fs_bg(struct f2fs_sb_info *sbi) if (!available_free_memory(sbi, NAT_ENTRIES) || excess_prefree_segs(sbi) || !available_free_memory(sbi, INO_ENTRIES) || - f2fs_time_over(sbi, CP_TIME)) { + (is_idle(sbi) && f2fs_time_over(sbi, CP_TIME))) { if (test_opt(sbi, DATA_FLUSH)) sync_dirty_inodes(sbi, FILE_INODE); f2fs_sync_fs(sbi->sb, true); |