diff options
author | Chao Yu <chao2.yu@samsung.com> | 2015-03-19 19:27:51 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-04-10 15:08:51 -0700 |
commit | 0bdee482509fe8c3cf0e66231ed37b8e70954093 (patch) | |
tree | 2477ba4cbcefcbf2fce8e860e1d7e70c6aafa524 /fs/f2fs/inode.c | |
parent | 028a41e89383e1208dff1afe3e260b8cb6d3431c (diff) | |
download | linux-0bdee482509fe8c3cf0e66231ed37b8e70954093.tar.bz2 |
f2fs: preserve extent info for extent cache
This patch tries to preserve last extent info in extent tree cache into on-disk
inode, so this can help us to reuse the last extent info next time for
performance.
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.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index 9e64d3efb2d2..07237ac2935e 100644 --- a/fs/f2fs/inode.c +++ b/fs/f2fs/inode.c @@ -343,7 +343,12 @@ void f2fs_evict_inode(struct inode *inode) no_delete: stat_dec_inline_dir(inode); stat_dec_inline_inode(inode); + + /* update extent info in inode */ + if (inode->i_nlink) + f2fs_preserve_extent_tree(inode); f2fs_destroy_extent_tree(inode); + invalidate_mapping_pages(NODE_MAPPING(sbi), inode->i_ino, inode->i_ino); if (xnid) invalidate_mapping_pages(NODE_MAPPING(sbi), xnid, xnid); |