Lines Matching refs:segno

201 static unsigned int get_cb_cost(struct f2fs_sb_info *sbi, unsigned int segno)  in get_cb_cost()  argument
204 unsigned int secno = GET_SECNO(sbi, segno); in get_cb_cost()
214 vblocks = get_valid_blocks(sbi, segno, sbi->segs_per_sec); in get_cb_cost()
234 unsigned int segno, struct victim_sel_policy *p) in get_gc_cost() argument
237 return get_seg_entry(sbi, segno)->ckpt_valid_blocks; in get_gc_cost()
241 return get_valid_blocks(sbi, segno, sbi->segs_per_sec); in get_gc_cost()
243 return get_cb_cost(sbi, segno); in get_gc_cost()
278 unsigned int segno; in get_victim_by_default() local
280 segno = find_next_bit(p.dirty_segmap, MAIN_SEGS(sbi), p.offset); in get_victim_by_default()
281 if (segno >= MAIN_SEGS(sbi)) { in get_victim_by_default()
290 p.offset = segno + p.ofs_unit; in get_victim_by_default()
292 p.offset -= segno % p.ofs_unit; in get_victim_by_default()
294 secno = GET_SECNO(sbi, segno); in get_victim_by_default()
301 cost = get_gc_cost(sbi, segno, &p); in get_victim_by_default()
304 p.min_segno = segno; in get_victim_by_default()
311 sbi->last_victim[p.gc_mode] = segno; in get_victim_by_default()
376 unsigned int segno, int offset) in check_valid_map() argument
383 sentry = get_seg_entry(sbi, segno); in check_valid_map()
395 struct f2fs_summary *sum, unsigned int segno, int gc_type) in gc_node_segment() argument
412 if (check_valid_map(sbi, segno, off) == 0) in gc_node_segment()
424 if (check_valid_map(sbi, segno, off) == 0) { in gc_node_segment()
458 if (get_valid_blocks(sbi, segno, 1) != 0) in gc_node_segment()
554 struct gc_inode_list *gc_list, unsigned int segno, int gc_type) in gc_data_segment() argument
562 start_addr = START_BLOCK(sbi, segno); in gc_data_segment()
578 if (check_valid_map(sbi, segno, off) == 0) in gc_data_segment()
639 if (get_valid_blocks(sbi, segno, 1) != 0) { in gc_data_segment()
659 static void do_garbage_collect(struct f2fs_sb_info *sbi, unsigned int segno, in do_garbage_collect() argument
667 sum_page = get_sum_page(sbi, segno); in do_garbage_collect()
675 gc_node_segment(sbi, sum->entries, segno, gc_type); in do_garbage_collect()
678 gc_data_segment(sbi, sum->entries, gc_list, segno, gc_type); in do_garbage_collect()
691 unsigned int segno, i; in f2fs_gc() local
713 if (!__get_victim(sbi, &segno, gc_type)) in f2fs_gc()
719 ra_meta_pages(sbi, GET_SUM_BLOCK(sbi, segno), sbi->segs_per_sec, in f2fs_gc()
723 do_garbage_collect(sbi, segno + i, &gc_list, gc_type); in f2fs_gc()
728 WARN_ON(get_valid_blocks(sbi, segno, sbi->segs_per_sec)); in f2fs_gc()