summaryrefslogtreecommitdiff
path: root/fs/f2fs/node.c
diff options
context:
space:
mode:
authorChao Yu <chao2.yu@samsung.com>2016-01-18 18:32:58 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2016-02-22 16:07:23 -0800
commit2304cb0c4438829c88bed69f57374b80ae31f0ba (patch)
tree6558a73688e39def7c8049a5aa4eb5de8560afd5 /fs/f2fs/node.c
parent7d768d2c264eec44941a13cb92200565e8c754d0 (diff)
downloadlwn-2304cb0c4438829c88bed69f57374b80ae31f0ba.tar.gz
lwn-2304cb0c4438829c88bed69f57374b80ae31f0ba.zip
f2fs: export dirty_nats_ratio in sysfs
This patch exports a new sysfs entry 'dirty_nat_ratio' to control threshold of dirty nat entries, if current ratio exceeds configured threshold, checkpoint will be triggered in f2fs_balance_fs_bg for flushing dirty nats. Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/node.c')
-rw-r--r--fs/f2fs/node.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 342597a5897f..636928195224 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -2000,6 +2000,7 @@ static int init_node_manager(struct f2fs_sb_info *sbi)
nm_i->nat_cnt = 0;
nm_i->ram_thresh = DEF_RAM_THRESHOLD;
nm_i->ra_nid_pages = DEF_RA_NID_PAGES;
+ nm_i->dirty_nats_ratio = DEF_DIRTY_NAT_RATIO_THRESHOLD;
INIT_RADIX_TREE(&nm_i->free_nid_root, GFP_ATOMIC);
INIT_LIST_HEAD(&nm_i->free_nid_list);