Lines Matching defs:gc_type

216 static int select_gc_type(struct f2fs_sb_info *sbi, int gc_type)
220 if (gc_type == BG_GC) {
245 static void select_policy(struct f2fs_sb_info *sbi, int gc_type,
261 p->gc_mode = select_gc_type(sbi, gc_type);
277 if (gc_type != FG_GC &&
319 * If the gc_type is FG_GC, we can select victim segments
723 static int f2fs_gc_pinned_control(struct inode *inode, int gc_type,
728 if (gc_type != FG_GC)
744 int gc_type, int type, char alloc_mode,
764 select_policy(sbi, gc_type, type, &p);
799 if (gc_type == FG_GC &&
809 if (p.alloc_mode == LFS && gc_type == FG_GC) {
873 if (gc_type == BG_GC && test_bit(secno, dirty_i->victim_secmap))
876 if (gc_type == FG_GC && f2fs_section_is_pinned(dirty_i, secno))
921 if (gc_type == FG_GC)
931 trace_f2fs_get_victim(sbi->sb, type, gc_type, &p,
997 struct f2fs_summary *sum, unsigned int segno, int gc_type)
1003 bool fggc = (gc_type == FG_GC);
1022 if (gc_type == BG_GC && has_not_enough_free_secs(sbi, 0, 0))
1060 err = f2fs_move_node_page(node_page, gc_type);
1061 if (!err && gc_type == FG_GC)
1063 stat_inc_node_blk_count(sbi, 1, gc_type);
1261 int gc_type, unsigned int segno, int off)
1280 int type = fio.sbi->am.atgc_enabled && (gc_type == BG_GC) &&
1294 err = f2fs_gc_pinned_control(inode, gc_type, segno);
1417 static int move_data_page(struct inode *inode, block_t bidx, int gc_type,
1432 err = f2fs_gc_pinned_control(inode, gc_type, segno);
1436 if (gc_type == BG_GC) {
1494 struct gc_inode_list *gc_list, unsigned int segno, int gc_type,
1523 if ((gc_type == BG_GC && has_not_enough_free_secs(sbi, 0, 0)) ||
1561 err = f2fs_gc_pinned_control(inode, gc_type, segno);
1630 gc_type, segno, off);
1632 err = move_data_page(inode, start_bidx, gc_type,
1635 if (!err && (gc_type == FG_GC ||
1644 stat_inc_data_blk_count(sbi, 1, gc_type);
1655 int gc_type)
1661 ret = f2fs_get_victim(sbi, victim, gc_type, NO_CHECK_TYPE, LFS, 0);
1668 struct gc_inode_list *gc_list, int gc_type,
1730 if (gc_type == BG_GC && __is_large_section(sbi) &&
1755 gc_type);
1758 segno, gc_type,
1761 stat_inc_gc_seg_count(sbi, data_type, gc_type);
1766 if (gc_type == FG_GC &&
1771 sbi->next_victim_seg[gc_type] =
1783 stat_inc_gc_sec_count(sbi, data_type, gc_type);
1790 int gc_type = gc_control->init_gc_type;
1802 trace_f2fs_gc_begin(sbi->sb, gc_type, gc_control->no_bg_gc,
1826 gc_type = FG_GC;
1844 if (gc_type == BG_GC && gc_control->no_bg_gc) {
1849 ret = __get_victim(sbi, &segno, gc_type);
1852 if (ret == -ENODATA && gc_type == FG_GC &&
1860 seg_freed = do_garbage_collect(sbi, segno, &gc_list, gc_type,
1872 if (gc_type == FG_GC) {
1917 if (gc_type == FG_GC)
2018 int gc_mode, gc_type;
2032 for (gc_type = BG_GC; gc_type <= FG_GC; gc_type++)
2033 if (sbi->next_victim_seg[gc_type] >= start)
2034 sbi->next_victim_seg[gc_type] = NULL_SEGNO;