summaryrefslogtreecommitdiff
path: root/fs/f2fs/inode.c
diff options
context:
space:
mode:
authorChao Yu <chao2.yu@samsung.com>2015-03-19 19:26:02 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2015-04-10 15:08:50 -0700
commit028a41e89383e1208dff1afe3e260b8cb6d3431c (patch)
tree657e0dd1fd94bd848faa03b1d39eebf775906c74 /fs/f2fs/inode.c
parent93dfc52656e9ae1009ccba67e67ff69285b7743f (diff)
f2fs: initialize extent tree with on-disk extent info of inode
With normal extent info cache, we records largest extent mapping between logical block and physical block into extent info, and we persist extent info in on-disk inode. When we enable extent tree cache, if extent info of on-disk inode is exist, and the extent is not a small fragmented mapping extent. We'd better to load the extent info into extent tree cache when inode is loaded. By this way we can have more chance to hit extent tree cache rather than taking more time to read dnode page for block address. Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/inode.c')
-rw-r--r--fs/f2fs/inode.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
index bb5800969bcc..9e64d3efb2d2 100644
--- a/fs/f2fs/inode.c
+++ b/fs/f2fs/inode.c
@@ -137,9 +137,7 @@ static int do_read_inode(struct inode *inode)
fi->i_pino = le32_to_cpu(ri->i_pino);
fi->i_dir_level = ri->i_dir_level;
- write_lock(&fi->ext_lock);
- get_extent_info(&fi->ext, ri->i_ext);
- write_unlock(&fi->ext_lock);
+ f2fs_init_extent_cache(inode, &ri->i_ext);
get_inline_info(fi, ri);