diff options
author | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2014-03-20 19:10:08 +0900 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2014-03-20 22:10:11 +0900 |
commit | d928bfbfe77aa457b765c19e9db8cd4cc72b3c89 (patch) | |
tree | f56763175e0fbee1e2079c9a330f3d73f971bc5c /fs/f2fs/super.c | |
parent | 58c410351eba3d24f741c85a0eb9eaf15c94047d (diff) | |
download | blackbird-op-linux-d928bfbfe77aa457b765c19e9db8cd4cc72b3c89.tar.gz blackbird-op-linux-d928bfbfe77aa457b765c19e9db8cd4cc72b3c89.zip |
f2fs: introduce fi->i_sem to protect fi's info
This patch introduces fi->i_sem to protect fi's info that includes xattr_ver,
pino, i_nlink.
This enables to remove i_mutex during f2fs_sync_file, resulting in performance
improvement when a number of fsync calls are triggered from many concurrent
threads.
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r-- | fs/f2fs/super.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 34c47b2010bc..89ea046c846d 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -360,6 +360,7 @@ static struct inode *f2fs_alloc_inode(struct super_block *sb) fi->i_current_depth = 1; fi->i_advise = 0; rwlock_init(&fi->ext.ext_lock); + init_rwsem(&fi->i_sem); set_inode_flag(fi, FI_NEW_INODE); |