Lines Matching refs:se

844 	struct seg_entry *se;  in f2fs_get_unusable_blocks()  local
849 se = get_seg_entry(sbi, segno); in f2fs_get_unusable_blocks()
850 if (IS_NODESEG(se->type)) in f2fs_get_unusable_blocks()
852 se->valid_blocks; in f2fs_get_unusable_blocks()
855 se->valid_blocks; in f2fs_get_unusable_blocks()
1782 struct seg_entry *se; in f2fs_issue_discard() local
1805 se = get_seg_entry(sbi, GET_SEGNO(sbi, i)); in f2fs_issue_discard()
1809 !f2fs_test_and_set_bit(offset, se->discard_map)) in f2fs_issue_discard()
1823 struct seg_entry *se = get_seg_entry(sbi, cpc->trim_start); in add_discard_addrs() local
1824 unsigned long *cur_map = (unsigned long *)se->cur_valid_map; in add_discard_addrs()
1825 unsigned long *ckpt_map = (unsigned long *)se->ckpt_valid_map; in add_discard_addrs()
1826 unsigned long *discard_map = (unsigned long *)se->discard_map; in add_discard_addrs()
1834 if (se->valid_blocks == max_blocks || !f2fs_hw_support_discard(sbi) || in add_discard_addrs()
1839 if (!f2fs_realtime_discard_enable(sbi) || !se->valid_blocks || in add_discard_addrs()
2123 struct seg_entry *se = get_seg_entry(sbi, segno); in __set_sit_entry_type() local
2125 se->type = type; in __set_sit_entry_type()
2143 struct seg_entry *se; in update_segment_mtime() local
2151 se = get_seg_entry(sbi, segno); in update_segment_mtime()
2153 if (!se->mtime) in update_segment_mtime()
2154 se->mtime = mtime; in update_segment_mtime()
2156 se->mtime = div_u64(se->mtime * se->valid_blocks + mtime, in update_segment_mtime()
2157 se->valid_blocks + 1); in update_segment_mtime()
2165 struct seg_entry *se; in update_sit_entry() local
2175 se = get_seg_entry(sbi, segno); in update_sit_entry()
2176 new_vblocks = se->valid_blocks + del; in update_sit_entry()
2182 se->valid_blocks = new_vblocks; in update_sit_entry()
2186 exist = f2fs_test_and_set_bit(offset, se->cur_valid_map); in update_sit_entry()
2189 se->cur_valid_map_mir); in update_sit_entry()
2200 se->valid_blocks--; in update_sit_entry()
2205 !f2fs_test_and_set_bit(offset, se->discard_map)) in update_sit_entry()
2213 if (!f2fs_test_and_set_bit(offset, se->ckpt_valid_map)) in update_sit_entry()
2214 se->ckpt_valid_blocks++; in update_sit_entry()
2217 exist = f2fs_test_and_clear_bit(offset, se->cur_valid_map); in update_sit_entry()
2220 se->cur_valid_map_mir); in update_sit_entry()
2231 se->valid_blocks++; in update_sit_entry()
2240 if (f2fs_test_bit(offset, se->ckpt_valid_map)) { in update_sit_entry()
2248 f2fs_test_and_clear_bit(offset, se->discard_map)) in update_sit_entry()
2251 if (!f2fs_test_bit(offset, se->ckpt_valid_map)) in update_sit_entry()
2252 se->ckpt_valid_blocks += del; in update_sit_entry()
2291 struct seg_entry *se; in f2fs_is_checkpointed_data() local
2300 se = get_seg_entry(sbi, segno); in f2fs_is_checkpointed_data()
2303 if (f2fs_test_bit(offset, se->ckpt_valid_map)) in f2fs_is_checkpointed_data()
2599 struct seg_entry *se = get_seg_entry(sbi, segno); in __next_free_blkoff() local
2602 unsigned long *ckpt_map = (unsigned long *)se->ckpt_valid_map; in __next_free_blkoff()
2603 unsigned long *cur_map = (unsigned long *)se->cur_valid_map; in __next_free_blkoff()
2693 struct seg_entry *se = get_seg_entry(sbi, curseg->next_segno); in get_atssr_segment() local
2695 curseg->seg_type = se->type; in get_atssr_segment()
3224 struct seg_entry *se = NULL; in f2fs_allocate_data_block() local
3233 se = get_seg_entry(sbi, GET_SEGNO(sbi, old_blkaddr)); in f2fs_allocate_data_block()
3234 sanity_check_seg_type(sbi, se->type); in f2fs_allocate_data_block()
3235 f2fs_bug_on(sbi, IS_NODESEG(se->type)); in f2fs_allocate_data_block()
3272 get_atssr_segment(sbi, type, se->type, in f2fs_allocate_data_block()
3273 AT_SSR, se->mtime); in f2fs_allocate_data_block()
3494 struct seg_entry *se; in f2fs_do_replace_block() local
3500 se = get_seg_entry(sbi, segno); in f2fs_do_replace_block()
3501 type = se->type; in f2fs_do_replace_block()
3507 if (se->valid_blocks == 0 && !IS_CURSEG(sbi, segno)) { in f2fs_do_replace_block()
4056 struct seg_entry *se; in f2fs_flush_sit_entries() local
4106 se = get_seg_entry(sbi, segno); in f2fs_flush_sit_entries()
4108 if (memcmp(se->cur_valid_map, se->cur_valid_map_mir, in f2fs_flush_sit_entries()
4125 seg_info_to_raw_sit(se, in f2fs_flush_sit_entries()
4131 seg_info_to_raw_sit(se, in f2fs_flush_sit_entries()
4350 struct seg_entry *se; in build_sit_entries() local
4369 se = &sit_i->sentries[start]; in build_sit_entries()
4380 seg_info_from_raw_sit(se, &sit); in build_sit_entries()
4382 if (se->type >= NR_PERSISTENT_LOG) { in build_sit_entries()
4384 se->type, start); in build_sit_entries()
4390 sit_valid_blocks[SE_PAGETYPE(se)] += se->valid_blocks; in build_sit_entries()
4395 memset(se->discard_map, 0xff, in build_sit_entries()
4398 memcpy(se->discard_map, in build_sit_entries()
4399 se->cur_valid_map, in build_sit_entries()
4403 se->valid_blocks; in build_sit_entries()
4409 se->valid_blocks; in build_sit_entries()
4427 se = &sit_i->sentries[start]; in build_sit_entries()
4430 old_valid_blocks = se->valid_blocks; in build_sit_entries()
4432 sit_valid_blocks[SE_PAGETYPE(se)] -= old_valid_blocks; in build_sit_entries()
4437 seg_info_from_raw_sit(se, &sit); in build_sit_entries()
4439 if (se->type >= NR_PERSISTENT_LOG) { in build_sit_entries()
4441 se->type, start); in build_sit_entries()
4447 sit_valid_blocks[SE_PAGETYPE(se)] += se->valid_blocks; in build_sit_entries()
4451 memset(se->discard_map, 0xff, SIT_VBLOCK_MAP_SIZE); in build_sit_entries()
4453 memcpy(se->discard_map, se->cur_valid_map, in build_sit_entries()
4456 sbi->discard_blks -= se->valid_blocks; in build_sit_entries()
4462 se->valid_blocks; in build_sit_entries()
4622 struct seg_entry *se = get_seg_entry(sbi, curseg->segno); in sanity_check_curseg() local
4639 if (f2fs_test_bit(blkofs, se->cur_valid_map)) in sanity_check_curseg()
4646 if (!f2fs_test_bit(blkofs, se->cur_valid_map)) in sanity_check_curseg()
4670 struct seg_entry *se; in check_zone_write_pointer() local
4700 se = get_seg_entry(sbi, segno); in check_zone_write_pointer()
4702 if (f2fs_test_bit(b, se->cur_valid_map)) { in check_zone_write_pointer()