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/checkpoint.c | |
parent | f8b2c1f940dca2843fe13b55ba5868bac8040551 (diff) | |
download | linux-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/checkpoint.c')
-rw-r--r-- | fs/f2fs/checkpoint.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index 4c0e98ddf3db..1f52b70ff9d1 100644 --- a/fs/f2fs/checkpoint.c +++ b/fs/f2fs/checkpoint.c @@ -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 { /* |