diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-07-12 20:07:52 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-07-16 00:21:20 +0200 |
commit | 5f281fab9b9a30073616c5e25da2111dec2fe482 (patch) | |
tree | fcb4562c2ee2ea20b313401b034b67df789f69c5 /fs/f2fs/extent_cache.c | |
parent | f2fs: refactor __exchange_data_block for speed up (diff) | |
download | linux-5f281fab9b9a30073616c5e25da2111dec2fe482.tar.xz linux-5f281fab9b9a30073616c5e25da2111dec2fe482.zip |
f2fs: disable extent_cache for fcollapse/finsert inodes
This reduces the elapsed time to do xfstests/generic/017.
Before: 458 s
After: 390 s
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/extent_cache.c')
-rw-r--r-- | fs/f2fs/extent_cache.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/f2fs/extent_cache.c b/fs/f2fs/extent_cache.c index 5b4b6d426ebb..2b06d4fcd954 100644 --- a/fs/f2fs/extent_cache.c +++ b/fs/f2fs/extent_cache.c @@ -631,6 +631,19 @@ unsigned int f2fs_destroy_extent_node(struct inode *inode) return node_cnt; } +void f2fs_drop_extent_tree(struct inode *inode) +{ + struct f2fs_sb_info *sbi = F2FS_I_SB(inode); + struct extent_tree *et = F2FS_I(inode)->extent_tree; + + set_inode_flag(inode, FI_NO_EXTENT); + + write_lock(&et->lock); + __free_extent_tree(sbi, et); + __drop_largest_extent(inode, 0, UINT_MAX); + write_unlock(&et->lock); +} + void f2fs_destroy_extent_tree(struct inode *inode) { struct f2fs_sb_info *sbi = F2FS_I_SB(inode); |