Lines Matching refs:segno
20 #define GET_L2R_SEGNO(free_i, segno) (segno - free_i->start_segno) argument
21 #define GET_R2L_SEGNO(free_i, segno) (segno + free_i->start_segno) argument
27 ((seg == CURSEG_I(sbi, CURSEG_HOT_DATA)->segno) || \
28 (seg == CURSEG_I(sbi, CURSEG_WARM_DATA)->segno) || \
29 (seg == CURSEG_I(sbi, CURSEG_COLD_DATA)->segno) || \
30 (seg == CURSEG_I(sbi, CURSEG_HOT_NODE)->segno) || \
31 (seg == CURSEG_I(sbi, CURSEG_WARM_NODE)->segno) || \
32 (seg == CURSEG_I(sbi, CURSEG_COLD_NODE)->segno))
35 ((secno == CURSEG_I(sbi, CURSEG_HOT_DATA)->segno / \
37 (secno == CURSEG_I(sbi, CURSEG_WARM_DATA)->segno / \
39 (secno == CURSEG_I(sbi, CURSEG_COLD_DATA)->segno / \
41 (secno == CURSEG_I(sbi, CURSEG_HOT_NODE)->segno / \
43 (secno == CURSEG_I(sbi, CURSEG_WARM_NODE)->segno / \
45 (secno == CURSEG_I(sbi, CURSEG_COLD_NODE)->segno / \
61 #define START_BLOCK(sbi, segno) (SEG0_BLKADDR(sbi) + \ argument
62 (GET_R2L_SEGNO(FREE_I(sbi), segno) << sbi->log_blocks_per_seg))
65 (START_BLOCK(sbi, curseg->segno) + curseg->next_blkoff)
77 #define GET_SECNO(sbi, segno) \ argument
78 ((segno) / sbi->segs_per_sec)
79 #define GET_ZONENO_FROM_SEGNO(sbi, segno) \ argument
80 ((segno / sbi->segs_per_sec) / sbi->secs_per_zone)
82 #define GET_SUM_BLOCK(sbi, segno) \ argument
83 ((sbi->sm_info->ssa_blkaddr) + segno)
88 #define SIT_ENTRY_OFFSET(sit_i, segno) \ argument
89 (segno % sit_i->sents_per_block)
90 #define SIT_BLOCK_OFFSET(segno) \ argument
91 (segno / SIT_ENTRY_PER_BLOCK)
92 #define START_SEGNO(segno) \ argument
93 (SIT_BLOCK_OFFSET(segno) * SIT_ENTRY_PER_BLOCK)
248 unsigned int segno; /* current segment number */ member
269 unsigned int segno) in get_seg_entry() argument
272 return &sit_i->sentries[segno]; in get_seg_entry()
276 unsigned int segno) in get_sec_entry() argument
279 return &sit_i->sec_entries[GET_SECNO(sbi, segno)]; in get_sec_entry()
283 unsigned int segno, int section) in get_valid_blocks() argument
290 return get_sec_entry(sbi, segno)->valid_blocks; in get_valid_blocks()
292 return get_seg_entry(sbi, segno)->valid_blocks; in get_valid_blocks()
319 unsigned int max, unsigned int segno) in find_next_inuse() argument
323 ret = find_next_bit(free_i->free_segmap, max, segno); in find_next_inuse()
328 static inline void __set_free(struct f2fs_sb_info *sbi, unsigned int segno) in __set_free() argument
331 unsigned int secno = segno / sbi->segs_per_sec; in __set_free()
336 clear_bit(segno, free_i->free_segmap); in __set_free()
349 unsigned int segno) in __set_inuse() argument
352 unsigned int secno = segno / sbi->segs_per_sec; in __set_inuse()
353 set_bit(segno, free_i->free_segmap); in __set_inuse()
360 unsigned int segno) in __set_test_and_free() argument
363 unsigned int secno = segno / sbi->segs_per_sec; in __set_test_and_free()
368 if (test_and_clear_bit(segno, free_i->free_segmap)) { in __set_test_and_free()
382 unsigned int segno) in __set_test_and_inuse() argument
385 unsigned int secno = segno / sbi->segs_per_sec; in __set_test_and_inuse()
387 if (!test_and_set_bit(segno, free_i->free_segmap)) { in __set_test_and_inuse()
540 return curseg->segno; in curseg_segno()
557 static inline void check_seg_range(struct f2fs_sb_info *sbi, unsigned int segno) in check_seg_range() argument
559 BUG_ON(segno > TOTAL_SEGS(sbi) - 1); in check_seg_range()
572 int segno, struct f2fs_sit_entry *raw_sit) in check_block_count() argument
582 BUG_ON(segno > TOTAL_SEGS(sbi) - 1); in check_block_count()
601 static inline void check_seg_range(struct f2fs_sb_info *sbi, unsigned int segno) in check_seg_range() argument
603 if (segno > TOTAL_SEGS(sbi) - 1) in check_seg_range()
617 int segno, struct f2fs_sit_entry *raw_sit) in check_block_count() argument
624 if (segno > TOTAL_SEGS(sbi) - 1) in check_block_count()