• Home
  • Raw
  • Download

Lines Matching refs:segno

24 #define GET_L2R_SEGNO(free_i, segno)	((segno) - (free_i)->start_segno)  argument
25 #define GET_R2L_SEGNO(free_i, segno) ((segno) + (free_i)->start_segno) argument
35 (((seg) == CURSEG_I(sbi, CURSEG_HOT_DATA)->segno) || \
36 ((seg) == CURSEG_I(sbi, CURSEG_WARM_DATA)->segno) || \
37 ((seg) == CURSEG_I(sbi, CURSEG_COLD_DATA)->segno) || \
38 ((seg) == CURSEG_I(sbi, CURSEG_HOT_NODE)->segno) || \
39 ((seg) == CURSEG_I(sbi, CURSEG_WARM_NODE)->segno) || \
40 ((seg) == CURSEG_I(sbi, CURSEG_COLD_NODE)->segno))
43 (((secno) == CURSEG_I(sbi, CURSEG_HOT_DATA)->segno / \
45 ((secno) == CURSEG_I(sbi, CURSEG_WARM_DATA)->segno / \
47 ((secno) == CURSEG_I(sbi, CURSEG_COLD_DATA)->segno / \
49 ((secno) == CURSEG_I(sbi, CURSEG_HOT_NODE)->segno / \
51 ((secno) == CURSEG_I(sbi, CURSEG_WARM_NODE)->segno / \
53 ((secno) == CURSEG_I(sbi, CURSEG_COLD_NODE)->segno / \
75 #define START_BLOCK(sbi, segno) (SEG0_BLKADDR(sbi) + \ argument
76 (GET_R2L_SEGNO(FREE_I(sbi), segno) << (sbi)->log_blocks_per_seg))
79 (START_BLOCK(sbi, (curseg)->segno) + (curseg)->next_blkoff)
93 #define GET_SEC_FROM_SEG(sbi, segno) \ argument
94 ((segno) / (sbi)->segs_per_sec)
99 #define GET_ZONE_FROM_SEG(sbi, segno) \ argument
100 GET_ZONE_FROM_SEC(sbi, GET_SEC_FROM_SEG(sbi, segno))
102 #define GET_SUM_BLOCK(sbi, segno) \ argument
103 ((sbi)->sm_info->ssa_blkaddr + (segno))
108 #define SIT_ENTRY_OFFSET(sit_i, segno) \ argument
109 ((segno) % (sit_i)->sents_per_block)
110 #define SIT_BLOCK_OFFSET(segno) \ argument
111 ((segno) / SIT_ENTRY_PER_BLOCK)
112 #define START_SEGNO(segno) \ argument
113 (SIT_BLOCK_OFFSET(segno) * SIT_ENTRY_PER_BLOCK)
296 unsigned int segno; /* current segment number */ member
317 unsigned int segno) in get_seg_entry() argument
320 return &sit_i->sentries[segno]; in get_seg_entry()
324 unsigned int segno) in get_sec_entry() argument
327 return &sit_i->sec_entries[GET_SEC_FROM_SEG(sbi, segno)]; in get_sec_entry()
331 unsigned int segno, bool use_section) in get_valid_blocks() argument
338 return get_sec_entry(sbi, segno)->valid_blocks; in get_valid_blocks()
340 return get_seg_entry(sbi, segno)->valid_blocks; in get_valid_blocks()
395 unsigned int max, unsigned int segno) in find_next_inuse() argument
399 ret = find_next_bit(free_i->free_segmap, max, segno); in find_next_inuse()
404 static inline void __set_free(struct f2fs_sb_info *sbi, unsigned int segno) in __set_free() argument
407 unsigned int secno = GET_SEC_FROM_SEG(sbi, segno); in __set_free()
412 clear_bit(segno, free_i->free_segmap); in __set_free()
425 unsigned int segno) in __set_inuse() argument
428 unsigned int secno = GET_SEC_FROM_SEG(sbi, segno); in __set_inuse()
430 set_bit(segno, free_i->free_segmap); in __set_inuse()
437 unsigned int segno) in __set_test_and_free() argument
440 unsigned int secno = GET_SEC_FROM_SEG(sbi, segno); in __set_test_and_free()
445 if (test_and_clear_bit(segno, free_i->free_segmap)) { in __set_test_and_free()
462 unsigned int segno) in __set_test_and_inuse() argument
465 unsigned int secno = GET_SEC_FROM_SEG(sbi, segno); in __set_test_and_inuse()
468 if (!test_and_set_bit(segno, free_i->free_segmap)) { in __set_test_and_inuse()
539 unsigned int segno, left_blocks; in has_curseg_enough_space() local
544 segno = CURSEG_I(sbi, i)->segno; in has_curseg_enough_space()
546 get_seg_entry(sbi, segno)->ckpt_valid_blocks; in has_curseg_enough_space()
553 segno = CURSEG_I(sbi, CURSEG_HOT_DATA)->segno; in has_curseg_enough_space()
555 get_seg_entry(sbi, segno)->ckpt_valid_blocks; in has_curseg_enough_space()
623 return curseg->segno; in curseg_segno()
639 static inline void check_seg_range(struct f2fs_sb_info *sbi, unsigned int segno) in check_seg_range() argument
641 f2fs_bug_on(sbi, segno > TOTAL_SEGS(sbi) - 1); in check_seg_range()
661 int segno, struct f2fs_sit_entry *raw_sit) in check_block_count() argument
692 || segno > TOTAL_SEGS(sbi) - 1)) { in check_block_count()
695 GET_SIT_VBLOCKS(raw_sit), segno); in check_block_count()