diff options
author | Chao Yu <chao@kernel.org> | 2021-09-16 12:09:03 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2021-09-21 02:12:51 +0300 |
commit | 287b1406dde2bc80f468c73708e7f7a87be390ea (patch) | |
tree | 03af6116817af3d882f5df61bd3c39c2fd598cd0 /fs/f2fs/node.h | |
parent | c02599f210d90c76e42e2eb544511a47cceb60c9 (diff) | |
download | linux-287b1406dde2bc80f468c73708e7f7a87be390ea.tar.xz |
f2fs: introduce excess_dirty_threshold()
This patch enables f2fs_balance_fs_bg() to check all metadatas' dirty
threshold rather than just checking node block's, so that checkpoint()
from background can be triggered more frequently to avoid heaping up
too much dirty metadatas.
Threshold value by default:
race with foreground ops single type global
No 16MB 24MB
Yes 24MB 36MB
In addtion, let f2fs_balance_fs_bg() be aware of roll-forward sapce
as well as fsync().
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/node.h')
-rw-r--r-- | fs/f2fs/node.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h index ff14a6e5ac1c..18b98cf0465b 100644 --- a/fs/f2fs/node.h +++ b/fs/f2fs/node.h @@ -138,11 +138,6 @@ static inline bool excess_cached_nats(struct f2fs_sb_info *sbi) return NM_I(sbi)->nat_cnt[TOTAL_NAT] >= DEF_NAT_CACHE_THRESHOLD; } -static inline bool excess_dirty_nodes(struct f2fs_sb_info *sbi) -{ - return get_pages(sbi, F2FS_DIRTY_NODES) >= sbi->blocks_per_seg * 8; -} - enum mem_type { FREE_NIDS, /* indicates the free nid list */ NAT_ENTRIES, /* indicates the cached nat entry */ |