diff options
author | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2014-03-18 12:40:49 +0900 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2014-03-18 13:58:59 +0900 |
commit | 87d6f890944d092c4ef5b84053f0d0d5d8137b0b (patch) | |
tree | b66d6ff07f4e9d838f43e3ddb0eae916507ce343 /fs/f2fs/data.c | |
parent | f8b2c1f940dca2843fe13b55ba5868bac8040551 (diff) | |
download | op-kernel-dev-87d6f890944d092c4ef5b84053f0d0d5d8137b0b.zip op-kernel-dev-87d6f890944d092c4ef5b84053f0d0d5d8137b0b.tar.gz |
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/data.c')
-rw-r--r-- | fs/f2fs/data.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 101b4cd..e3b7cfa 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -868,6 +868,10 @@ static int f2fs_write_data_pages(struct address_space *mapping, if (!mapping->a_ops->writepage) return 0; + if (S_ISDIR(inode->i_mode) && wbc->sync_mode == WB_SYNC_NONE && + get_dirty_dents(inode) < nr_pages_to_skip(sbi, DATA)) + return 0; + if (wbc->nr_to_write < MAX_DESIRED_PAGES_WP) { desired_nrtw = MAX_DESIRED_PAGES_WP; excess_nrtw = desired_nrtw - wbc->nr_to_write; |