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>
This commit is contained in:
Jaegeuk Kim
2014-03-18 12:40:49 +09:00
parent f8b2c1f940
commit 87d6f89094
4 changed files with 26 additions and 9 deletions

View File

@@ -187,7 +187,7 @@ static int f2fs_write_meta_pages(struct address_space *mapping,
struct writeback_control *wbc)
{
struct f2fs_sb_info *sbi = F2FS_SB(mapping->host->i_sb);
int nrpages = MAX_BIO_BLOCKS(max_hw_blocks(sbi));
int nrpages = nr_pages_to_skip(sbi, META);
long written;
if (wbc->for_kupdate)
@@ -682,7 +682,7 @@ retry:
inode = igrab(entry->inode);
spin_unlock(&sbi->dir_inode_lock);
if (inode) {
filemap_flush(inode->i_mapping);
filemap_fdatawrite(inode->i_mapping);
iput(inode);
} else {
/*