diff options
author | Chao Yu <chao2.yu@samsung.com> | 2014-03-22 14:57:23 +0800 |
---|---|---|
committer | Andreas Blaesius <skate4life@gmx.de> | 2016-06-05 21:21:24 +0200 |
commit | e7ea74936b4ac63e0e0a904d373c0f7c98caee73 (patch) | |
tree | 0ff2174f01f620ef1bd0f1a65d3a277429d7aca2 /fs/f2fs/super.c | |
parent | c22d9045c2f43ccec993d452090b5aa5ab87827f (diff) | |
download | kernel_samsung_espresso10-e7ea74936b4ac63e0e0a904d373c0f7c98caee73.zip kernel_samsung_espresso10-e7ea74936b4ac63e0e0a904d373c0f7c98caee73.tar.gz kernel_samsung_espresso10-e7ea74936b4ac63e0e0a904d373c0f7c98caee73.tar.bz2 |
f2fs: avoid unnecessary bio submit when wait page writeback
This patch introduce is_merged_page() to check whether current page is merged
in f2fs bio cache. When page is not in cache, we can avoid submitting bio cache,
resulting in having more chance to merge pages.
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r-- | fs/f2fs/super.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index de3692f..fee1f7f 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -902,11 +902,11 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent) sbi->por_doing = false; spin_lock_init(&sbi->stat_lock); - mutex_init(&sbi->read_io.io_mutex); + init_rwsem(&sbi->read_io.io_rwsem); sbi->read_io.sbi = sbi; sbi->read_io.bio = NULL; for (i = 0; i < NR_PAGE_TYPE; i++) { - mutex_init(&sbi->write_io[i].io_mutex); + init_rwsem(&sbi->write_io[i].io_rwsem); sbi->write_io[i].sbi = sbi; sbi->write_io[i].bio = NULL; } |