Loading fs/f2fs/f2fs.h +1 −0 Original line number Diff line number Diff line Loading @@ -3172,6 +3172,7 @@ struct rb_entry *__lookup_rb_tree_ret(struct rb_root *root, bool __check_rb_tree_consistence(struct f2fs_sb_info *sbi, struct rb_root *root); unsigned int f2fs_shrink_extent_tree(struct f2fs_sb_info *sbi, int nr_shrink); unsigned long __count_extent_cache(struct f2fs_sb_info *sbi); bool f2fs_init_extent_tree(struct inode *inode, struct f2fs_extent *i_ext); void f2fs_drop_extent_tree(struct inode *inode); unsigned int f2fs_destroy_extent_node(struct inode *inode); Loading fs/f2fs/shrinker.c +1 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ static unsigned long __count_free_nids(struct f2fs_sb_info *sbi) return count > 0 ? count : 0; } static unsigned long __count_extent_cache(struct f2fs_sb_info *sbi) unsigned long __count_extent_cache(struct f2fs_sb_info *sbi) { return atomic_read(&sbi->total_zombie_tree) + atomic_read(&sbi->total_ext_node); Loading fs/f2fs/super.c +12 −1 Original line number Diff line number Diff line Loading @@ -2637,6 +2637,16 @@ static void f2fs_tuning_parameters(struct f2fs_sb_info *sbi) } } static void f2fs_cleanup_inodes(struct f2fs_sb_info *sbi) { struct super_block *sb = sbi->sb; sync_filesystem(sb); shrink_dcache_sb(sb); evict_inodes(sb); f2fs_shrink_extent_tree(sbi, __count_extent_cache(sbi)); } static int f2fs_fill_super(struct super_block *sb, void *data, int silent) { struct f2fs_sb_info *sbi; Loading Loading @@ -3011,6 +3021,8 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent) * falls into an infinite loop in sync_meta_pages(). */ truncate_inode_pages_final(META_MAPPING(sbi)); /* cleanup recovery and quota inodes */ f2fs_cleanup_inodes(sbi); #ifdef CONFIG_QUOTA free_sysfs: #endif Loading Loading @@ -3057,7 +3069,6 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent) /* give only one another chance */ if (retry) { retry = false; shrink_dcache_sb(sb); goto try_onemore; } return err; Loading Loading
fs/f2fs/f2fs.h +1 −0 Original line number Diff line number Diff line Loading @@ -3172,6 +3172,7 @@ struct rb_entry *__lookup_rb_tree_ret(struct rb_root *root, bool __check_rb_tree_consistence(struct f2fs_sb_info *sbi, struct rb_root *root); unsigned int f2fs_shrink_extent_tree(struct f2fs_sb_info *sbi, int nr_shrink); unsigned long __count_extent_cache(struct f2fs_sb_info *sbi); bool f2fs_init_extent_tree(struct inode *inode, struct f2fs_extent *i_ext); void f2fs_drop_extent_tree(struct inode *inode); unsigned int f2fs_destroy_extent_node(struct inode *inode); Loading
fs/f2fs/shrinker.c +1 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ static unsigned long __count_free_nids(struct f2fs_sb_info *sbi) return count > 0 ? count : 0; } static unsigned long __count_extent_cache(struct f2fs_sb_info *sbi) unsigned long __count_extent_cache(struct f2fs_sb_info *sbi) { return atomic_read(&sbi->total_zombie_tree) + atomic_read(&sbi->total_ext_node); Loading
fs/f2fs/super.c +12 −1 Original line number Diff line number Diff line Loading @@ -2637,6 +2637,16 @@ static void f2fs_tuning_parameters(struct f2fs_sb_info *sbi) } } static void f2fs_cleanup_inodes(struct f2fs_sb_info *sbi) { struct super_block *sb = sbi->sb; sync_filesystem(sb); shrink_dcache_sb(sb); evict_inodes(sb); f2fs_shrink_extent_tree(sbi, __count_extent_cache(sbi)); } static int f2fs_fill_super(struct super_block *sb, void *data, int silent) { struct f2fs_sb_info *sbi; Loading Loading @@ -3011,6 +3021,8 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent) * falls into an infinite loop in sync_meta_pages(). */ truncate_inode_pages_final(META_MAPPING(sbi)); /* cleanup recovery and quota inodes */ f2fs_cleanup_inodes(sbi); #ifdef CONFIG_QUOTA free_sysfs: #endif Loading Loading @@ -3057,7 +3069,6 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent) /* give only one another chance */ if (retry) { retry = false; shrink_dcache_sb(sb); goto try_onemore; } return err; Loading