summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/node.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk.kim@samsung.com>2014-03-18 12:40:49 +0900
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2014-03-18 13:58:59 +0900
commit87d6f890944d092c4ef5b84053f0d0d5d8137b0b (patch)
treeb66d6ff07f4e9d838f43e3ddb0eae916507ce343 /fs/f2fs/node.c
parentf8b2c1f940dca2843fe13b55ba5868bac8040551 (diff)
downloadlinux-87d6f890944d092c4ef5b84053f0d0d5d8137b0b.tar.gz
linux-87d6f890944d092c4ef5b84053f0d0d5d8137b0b.tar.bz2
linux-87d6f890944d092c4ef5b84053f0d0d5d8137b0b.zip
f2fs: avoid small data writes by skipping writepages
This patch introduces nr_pages_to_skip(sbi, type) to determine writepages can be skipped. The dentry, node, and meta pages can be conrolled by F2FS without breaking the FS consistency. Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/node.c')
-rw-r--r--fs/f2fs/node.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 3e36240d81c1..cb514f1896ab 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1198,12 +1198,6 @@ redirty_out:
return AOP_WRITEPAGE_ACTIVATE;
}
-/*
- * It is very important to gather dirty pages and write at once, so that we can
- * submit a big bio without interfering other data writes.
- * Be default, 512 pages (2MB) * 3 node types, is more reasonable.
- */
-#define COLLECT_DIRTY_NODES 1536
static int f2fs_write_node_pages(struct address_space *mapping,
struct writeback_control *wbc)
{
@@ -1214,7 +1208,7 @@ static int f2fs_write_node_pages(struct address_space *mapping,
f2fs_balance_fs_bg(sbi);
/* collect a number of dirty node pages and write together */
- if (get_pages(sbi, F2FS_DIRTY_NODES) < COLLECT_DIRTY_NODES)
+ if (get_pages(sbi, F2FS_DIRTY_NODES) < nr_pages_to_skip(sbi, NODE))
return 0;
/* if mounting is failed, skip writing node pages */