Lines Matching refs:type
355 .type = DATA, in __commit_inmem_pages()
743 enum dirty_type t = sentry->type; in __locate_dirty_segment()
764 enum dirty_type t = sentry->type; in __remove_dirty_segment()
1007 dpolicy->type = discard_type; in __init_discard_policy()
1041 struct list_head *wait_list = (dpolicy->type == DPOLICY_FSTRIM) ? in __submit_discard_cmd()
1350 struct list_head *wait_list = (dpolicy->type == DPOLICY_FSTRIM) ? in __wait_discard_cmd_range()
1848 static void __set_sit_entry_type(struct f2fs_sb_info *sbi, int type, in __set_sit_entry_type() argument
1852 se->type = type; in __set_sit_entry_type()
1906 if (IS_NODESEG(se->type)) { in update_sit_entry()
1993 static void __add_sum_entry(struct f2fs_sb_info *sbi, int type, in __add_sum_entry() argument
1996 struct curseg_info *curseg = CURSEG_I(sbi, type); in __add_sum_entry()
2056 int type, block_t blk_addr) in write_current_sum_page() argument
2058 struct curseg_info *curseg = CURSEG_I(sbi, type); in write_current_sum_page()
2080 static int is_next_segment_free(struct f2fs_sb_info *sbi, int type) in is_next_segment_free() argument
2082 struct curseg_info *curseg = CURSEG_I(sbi, type); in is_next_segment_free()
2182 static void reset_curseg(struct f2fs_sb_info *sbi, int type, int modified) in reset_curseg() argument
2184 struct curseg_info *curseg = CURSEG_I(sbi, type); in reset_curseg()
2194 if (IS_DATASEG(type)) in reset_curseg()
2196 if (IS_NODESEG(type)) in reset_curseg()
2198 __set_sit_entry_type(sbi, type, curseg->segno, modified); in reset_curseg()
2201 static unsigned int __get_next_segno(struct f2fs_sb_info *sbi, int type) in __get_next_segno() argument
2205 return CURSEG_I(sbi, type)->segno; in __get_next_segno()
2208 (type == CURSEG_HOT_DATA || IS_NODESEG(type))) in __get_next_segno()
2218 return CURSEG_I(sbi, type)->segno; in __get_next_segno()
2225 static void new_curseg(struct f2fs_sb_info *sbi, int type, bool new_sec) in new_curseg() argument
2227 struct curseg_info *curseg = CURSEG_I(sbi, type); in new_curseg()
2233 if (type == CURSEG_WARM_DATA || type == CURSEG_COLD_DATA) in new_curseg()
2239 segno = __get_next_segno(sbi, type); in new_curseg()
2242 reset_curseg(sbi, type, 1); in new_curseg()
2282 static void change_curseg(struct f2fs_sb_info *sbi, int type) in change_curseg() argument
2285 struct curseg_info *curseg = CURSEG_I(sbi, type); in change_curseg()
2299 reset_curseg(sbi, type, 1); in change_curseg()
2309 static int get_ssr_segment(struct f2fs_sb_info *sbi, int type) in get_ssr_segment() argument
2311 struct curseg_info *curseg = CURSEG_I(sbi, type); in get_ssr_segment()
2318 if (v_ops->get_victim(sbi, &segno, BG_GC, type, SSR)) { in get_ssr_segment()
2324 if (IS_NODESEG(type)) { in get_ssr_segment()
2325 if (type >= CURSEG_WARM_NODE) { in get_ssr_segment()
2333 if (type >= CURSEG_WARM_DATA) { in get_ssr_segment()
2343 if (i == type) in get_ssr_segment()
2358 int type, bool force) in allocate_segment_by_default() argument
2360 struct curseg_info *curseg = CURSEG_I(sbi, type); in allocate_segment_by_default()
2363 new_curseg(sbi, type, true); in allocate_segment_by_default()
2365 type == CURSEG_WARM_NODE) in allocate_segment_by_default()
2366 new_curseg(sbi, type, false); in allocate_segment_by_default()
2367 else if (curseg->alloc_type == LFS && is_next_segment_free(sbi, type)) in allocate_segment_by_default()
2368 new_curseg(sbi, type, false); in allocate_segment_by_default()
2369 else if (need_SSR(sbi) && get_ssr_segment(sbi, type)) in allocate_segment_by_default()
2370 change_curseg(sbi, type); in allocate_segment_by_default()
2372 new_curseg(sbi, type, false); in allocate_segment_by_default()
2541 static bool __has_curseg_space(struct f2fs_sb_info *sbi, int type) in __has_curseg_space() argument
2543 struct curseg_info *curseg = CURSEG_I(sbi, type); in __has_curseg_space()
2623 enum page_type type, enum temp_type temp) in io_type_to_rw_hint() argument
2626 if (type == DATA) { in io_type_to_rw_hint()
2637 if (type == DATA) { in io_type_to_rw_hint()
2644 } else if (type == NODE) { in io_type_to_rw_hint()
2649 } else if (type == META) { in io_type_to_rw_hint()
2658 if (fio->type == DATA) in __get_segment_type_2()
2666 if (fio->type == DATA) { in __get_segment_type_4()
2683 if (fio->type == DATA) { in __get_segment_type_6()
2703 int type = 0; in __get_segment_type() local
2707 type = __get_segment_type_2(fio); in __get_segment_type()
2710 type = __get_segment_type_4(fio); in __get_segment_type()
2713 type = __get_segment_type_6(fio); in __get_segment_type()
2719 if (IS_HOT(type)) in __get_segment_type()
2721 else if (IS_WARM(type)) in __get_segment_type()
2725 return type; in __get_segment_type()
2730 struct f2fs_summary *sum, int type, in allocate_data_block() argument
2734 struct curseg_info *curseg = CURSEG_I(sbi, type); in allocate_data_block()
2750 __add_sum_entry(sbi, type, sum); in allocate_data_block()
2764 if (!__has_curseg_space(sbi, type)) in allocate_data_block()
2765 sit_i->s_ops->allocate_segment(sbi, type, false); in allocate_data_block()
2777 if (page && IS_NODESEG(type)) { in allocate_data_block()
2788 io = sbi->write_io[fio->type] + fio->temp; in allocate_data_block()
2822 int type = __get_segment_type(fio); in do_write_page() local
2827 &fio->new_blkaddr, sum, type, fio, true); in do_write_page()
2844 .type = META, in write_meta_page()
2900 GET_SEGNO(sbi, fio->new_blkaddr))->type)); in rewrite_data_page()
2933 int type; in __f2fs_replace_block() local
2938 type = se->type; in __f2fs_replace_block()
2946 type = CURSEG_COLD_DATA; in __f2fs_replace_block()
2948 type = CURSEG_WARM_DATA; in __f2fs_replace_block()
2953 type = __f2fs_get_curseg(sbi, segno); in __f2fs_replace_block()
2954 f2fs_bug_on(sbi, type == NO_CHECK_TYPE); in __f2fs_replace_block()
2956 type = CURSEG_WARM_DATA; in __f2fs_replace_block()
2960 f2fs_bug_on(sbi, !IS_DATASEG(type)); in __f2fs_replace_block()
2961 curseg = CURSEG_I(sbi, type); in __f2fs_replace_block()
2972 change_curseg(sbi, type); in __f2fs_replace_block()
2976 __add_sum_entry(sbi, type, sum); in __f2fs_replace_block()
2991 change_curseg(sbi, type); in __f2fs_replace_block()
3017 enum page_type type, bool ordered) in f2fs_wait_on_page_writeback() argument
3023 0, page->index, type); in f2fs_wait_on_page_writeback()
3104 static int read_normal_summaries(struct f2fs_sb_info *sbi, int type) in read_normal_summaries() argument
3115 if (IS_DATASEG(type)) { in read_normal_summaries()
3116 segno = le32_to_cpu(ckpt->cur_data_segno[type]); in read_normal_summaries()
3117 blk_off = le16_to_cpu(ckpt->cur_data_blkoff[type - in read_normal_summaries()
3120 blk_addr = sum_blk_addr(sbi, NR_CURSEG_TYPE, type); in read_normal_summaries()
3122 blk_addr = sum_blk_addr(sbi, NR_CURSEG_DATA_TYPE, type); in read_normal_summaries()
3124 segno = le32_to_cpu(ckpt->cur_node_segno[type - in read_normal_summaries()
3126 blk_off = le16_to_cpu(ckpt->cur_node_blkoff[type - in read_normal_summaries()
3130 type - CURSEG_HOT_NODE); in read_normal_summaries()
3138 if (IS_NODESEG(type)) { in read_normal_summaries()
3152 curseg = CURSEG_I(sbi, type); in read_normal_summaries()
3163 reset_curseg(sbi, type, 0); in read_normal_summaries()
3164 curseg->alloc_type = ckpt->alloc_type[type]; in read_normal_summaries()
3175 int type = CURSEG_HOT_DATA; in restore_curseg_summaries() local
3187 type = CURSEG_HOT_NODE; in restore_curseg_summaries()
3191 ra_meta_pages(sbi, sum_blk_addr(sbi, NR_CURSEG_TYPE, type), in restore_curseg_summaries()
3192 NR_CURSEG_TYPE - type, META_CP, true); in restore_curseg_summaries()
3194 for (; type <= CURSEG_COLD_NODE; type++) { in restore_curseg_summaries()
3195 err = read_normal_summaries(sbi, type); in restore_curseg_summaries()
3265 block_t blkaddr, int type) in write_normal_summaries() argument
3268 if (IS_DATASEG(type)) in write_normal_summaries()
3269 end = type + NR_CURSEG_DATA_TYPE; in write_normal_summaries()
3271 end = type + NR_CURSEG_NODE_TYPE; in write_normal_summaries()
3273 for (i = type; i < end; i++) in write_normal_summaries()
3274 write_current_sum_page(sbi, i, blkaddr + (i - type)); in write_normal_summaries()
3290 int lookup_journal_in_cursum(struct f2fs_journal *journal, int type, in lookup_journal_in_cursum() argument
3295 if (type == NAT_JOURNAL) { in lookup_journal_in_cursum()
3302 } else if (type == SIT_JOURNAL) { in lookup_journal_in_cursum()
3783 int type; in init_free_segmap() local
3795 for (type = CURSEG_HOT_DATA; type <= CURSEG_COLD_NODE; type++) { in init_free_segmap()
3796 struct curseg_info *curseg_t = CURSEG_I(sbi, type); in init_free_segmap()