Lines Matching refs:se

879 	struct seg_entry *se;  in f2fs_get_unusable_blocks()  local
884 se = get_seg_entry(sbi, segno); in f2fs_get_unusable_blocks()
885 if (IS_NODESEG(se->type)) in f2fs_get_unusable_blocks()
887 se->valid_blocks; in f2fs_get_unusable_blocks()
890 se->valid_blocks; in f2fs_get_unusable_blocks()
2004 struct seg_entry *se; in f2fs_issue_discard() local
2027 se = get_seg_entry(sbi, GET_SEGNO(sbi, i)); in f2fs_issue_discard()
2031 !f2fs_test_and_set_bit(offset, se->discard_map)) in f2fs_issue_discard()
2045 struct seg_entry *se = get_seg_entry(sbi, cpc->trim_start); in add_discard_addrs() local
2046 unsigned long *cur_map = (unsigned long *)se->cur_valid_map; in add_discard_addrs()
2047 unsigned long *ckpt_map = (unsigned long *)se->ckpt_valid_map; in add_discard_addrs()
2048 unsigned long *discard_map = (unsigned long *)se->discard_map; in add_discard_addrs()
2056 if (se->valid_blocks == max_blocks || !f2fs_hw_support_discard(sbi) || in add_discard_addrs()
2061 if (!f2fs_realtime_discard_enable(sbi) || !se->valid_blocks || in add_discard_addrs()
2349 struct seg_entry *se = get_seg_entry(sbi, segno); in __set_sit_entry_type() local
2351 se->type = type; in __set_sit_entry_type()
2369 struct seg_entry *se; in update_segment_mtime() local
2377 se = get_seg_entry(sbi, segno); in update_segment_mtime()
2379 if (!se->mtime) in update_segment_mtime()
2380 se->mtime = mtime; in update_segment_mtime()
2382 se->mtime = div_u64(se->mtime * se->valid_blocks + mtime, in update_segment_mtime()
2383 se->valid_blocks + 1); in update_segment_mtime()
2391 struct seg_entry *se; in update_sit_entry() local
2401 se = get_seg_entry(sbi, segno); in update_sit_entry()
2402 new_vblocks = se->valid_blocks + del; in update_sit_entry()
2408 se->valid_blocks = new_vblocks; in update_sit_entry()
2412 exist = f2fs_test_and_set_bit(offset, se->cur_valid_map); in update_sit_entry()
2415 se->cur_valid_map_mir); in update_sit_entry()
2426 se->valid_blocks--; in update_sit_entry()
2431 !f2fs_test_and_set_bit(offset, se->discard_map)) in update_sit_entry()
2439 if (!f2fs_test_and_set_bit(offset, se->ckpt_valid_map)) in update_sit_entry()
2440 se->ckpt_valid_blocks++; in update_sit_entry()
2443 exist = f2fs_test_and_clear_bit(offset, se->cur_valid_map); in update_sit_entry()
2446 se->cur_valid_map_mir); in update_sit_entry()
2457 se->valid_blocks++; in update_sit_entry()
2466 if (f2fs_test_bit(offset, se->ckpt_valid_map)) { in update_sit_entry()
2474 f2fs_test_and_clear_bit(offset, se->discard_map)) in update_sit_entry()
2477 if (!f2fs_test_bit(offset, se->ckpt_valid_map)) in update_sit_entry()
2478 se->ckpt_valid_blocks += del; in update_sit_entry()
2517 struct seg_entry *se; in f2fs_is_checkpointed_data() local
2526 se = get_seg_entry(sbi, segno); in f2fs_is_checkpointed_data()
2529 if (f2fs_test_bit(offset, se->ckpt_valid_map)) in f2fs_is_checkpointed_data()
2817 struct seg_entry *se = get_seg_entry(sbi, segno); in __next_free_blkoff() local
2820 unsigned long *ckpt_map = (unsigned long *)se->ckpt_valid_map; in __next_free_blkoff()
2821 unsigned long *cur_map = (unsigned long *)se->cur_valid_map; in __next_free_blkoff()
2889 struct seg_entry *se = get_seg_entry(sbi, curseg->next_segno); in get_atssr_segment() local
2891 curseg->seg_type = se->type; in get_atssr_segment()
3421 struct seg_entry *se = NULL; in f2fs_allocate_data_block() local
3431 se = get_seg_entry(sbi, GET_SEGNO(sbi, old_blkaddr)); in f2fs_allocate_data_block()
3432 sanity_check_seg_type(sbi, se->type); in f2fs_allocate_data_block()
3433 f2fs_bug_on(sbi, IS_NODESEG(se->type)); in f2fs_allocate_data_block()
3475 get_atssr_segment(sbi, type, se->type, in f2fs_allocate_data_block()
3476 AT_SSR, se->mtime); in f2fs_allocate_data_block()
3706 struct seg_entry *se; in f2fs_do_replace_block() local
3712 se = get_seg_entry(sbi, segno); in f2fs_do_replace_block()
3713 type = se->type; in f2fs_do_replace_block()
3719 if (se->valid_blocks == 0 && !IS_CURSEG(sbi, segno)) { in f2fs_do_replace_block()
4261 struct seg_entry *se; in f2fs_flush_sit_entries() local
4311 se = get_seg_entry(sbi, segno); in f2fs_flush_sit_entries()
4313 if (memcmp(se->cur_valid_map, se->cur_valid_map_mir, in f2fs_flush_sit_entries()
4330 seg_info_to_raw_sit(se, in f2fs_flush_sit_entries()
4336 seg_info_to_raw_sit(se, in f2fs_flush_sit_entries()
4552 struct seg_entry *se; in build_sit_entries() local
4571 se = &sit_i->sentries[start]; in build_sit_entries()
4582 seg_info_from_raw_sit(se, &sit); in build_sit_entries()
4584 if (se->type >= NR_PERSISTENT_LOG) { in build_sit_entries()
4586 se->type, start); in build_sit_entries()
4592 sit_valid_blocks[SE_PAGETYPE(se)] += se->valid_blocks; in build_sit_entries()
4597 memset(se->discard_map, 0xff, in build_sit_entries()
4600 memcpy(se->discard_map, in build_sit_entries()
4601 se->cur_valid_map, in build_sit_entries()
4605 se->valid_blocks; in build_sit_entries()
4611 se->valid_blocks; in build_sit_entries()
4629 se = &sit_i->sentries[start]; in build_sit_entries()
4632 old_valid_blocks = se->valid_blocks; in build_sit_entries()
4634 sit_valid_blocks[SE_PAGETYPE(se)] -= old_valid_blocks; in build_sit_entries()
4639 seg_info_from_raw_sit(se, &sit); in build_sit_entries()
4641 if (se->type >= NR_PERSISTENT_LOG) { in build_sit_entries()
4643 se->type, start); in build_sit_entries()
4649 sit_valid_blocks[SE_PAGETYPE(se)] += se->valid_blocks; in build_sit_entries()
4653 memset(se->discard_map, 0xff, SIT_VBLOCK_MAP_SIZE); in build_sit_entries()
4655 memcpy(se->discard_map, se->cur_valid_map, in build_sit_entries()
4658 sbi->discard_blks -= se->valid_blocks; in build_sit_entries()
4664 se->valid_blocks; in build_sit_entries()
4824 struct seg_entry *se = get_seg_entry(sbi, curseg->segno); in sanity_check_curseg() local
4841 if (f2fs_test_bit(blkofs, se->cur_valid_map)) in sanity_check_curseg()
4848 if (!f2fs_test_bit(blkofs, se->cur_valid_map)) in sanity_check_curseg()
4872 struct seg_entry *se; in check_zone_write_pointer() local
4902 se = get_seg_entry(sbi, segno); in check_zone_write_pointer()
4904 if (f2fs_test_bit(b, se->cur_valid_map)) { in check_zone_write_pointer()