diff options
author | Chao Yu <chao2.yu@samsung.com> | 2014-07-03 12:58:39 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2014-07-31 08:28:37 +0200 |
commit | b3582c68920105e29d219714d8a6fbde25a43379 (patch) | |
tree | 200ab9ca194921c8baad9954fee36eee072a772f /fs/f2fs/super.c | |
parent | f2fs: fix coding style (diff) | |
download | linux-b3582c68920105e29d219714d8a6fbde25a43379.tar.xz linux-b3582c68920105e29d219714d8a6fbde25a43379.zip |
f2fs: reduce competition among node page writes
We do not need to block on ->node_write among different node page writers e.g.
fsync/flush, unless we have a node page writer from write_checkpoint.
So it's better use rw_semaphore instead of mutex type for ->node_write to
promote performance.
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r-- | fs/f2fs/super.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index f253e222dcea..657582fc7601 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -953,7 +953,7 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent) mutex_init(&sbi->gc_mutex); mutex_init(&sbi->writepages); mutex_init(&sbi->cp_mutex); - mutex_init(&sbi->node_write); + init_rwsem(&sbi->node_write); sbi->por_doing = false; spin_lock_init(&sbi->stat_lock); |