From 5f281fab9b9a30073616c5e25da2111dec2fe482 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Tue, 12 Jul 2016 11:07:52 -0700 Subject: 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 --- fs/f2fs/extent_cache.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'fs/f2fs/extent_cache.c') diff --git a/fs/f2fs/extent_cache.c b/fs/f2fs/extent_cache.c index 5b4b6d4..2b06d4f 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); -- cgit v1.1