Lines Matching refs:segno
21 #define GET_L2R_SEGNO(free_i, segno) (segno - free_i->start_segno) argument
22 #define GET_R2L_SEGNO(free_i, segno) (segno + free_i->start_segno) argument
28 ((seg == CURSEG_I(sbi, CURSEG_HOT_DATA)->segno) || \
29 (seg == CURSEG_I(sbi, CURSEG_WARM_DATA)->segno) || \
30 (seg == CURSEG_I(sbi, CURSEG_COLD_DATA)->segno) || \
31 (seg == CURSEG_I(sbi, CURSEG_HOT_NODE)->segno) || \
32 (seg == CURSEG_I(sbi, CURSEG_WARM_NODE)->segno) || \
33 (seg == CURSEG_I(sbi, CURSEG_COLD_NODE)->segno))
36 ((secno == CURSEG_I(sbi, CURSEG_HOT_DATA)->segno / \
38 (secno == CURSEG_I(sbi, CURSEG_WARM_DATA)->segno / \
40 (secno == CURSEG_I(sbi, CURSEG_COLD_DATA)->segno / \
42 (secno == CURSEG_I(sbi, CURSEG_HOT_NODE)->segno / \
44 (secno == CURSEG_I(sbi, CURSEG_WARM_NODE)->segno / \
46 (secno == CURSEG_I(sbi, CURSEG_COLD_NODE)->segno / \
62 #define START_BLOCK(sbi, segno) (SEG0_BLKADDR(sbi) + \ argument
63 (GET_R2L_SEGNO(FREE_I(sbi), segno) << sbi->log_blocks_per_seg))
66 (START_BLOCK(sbi, curseg->segno) + curseg->next_blkoff)
78 #define GET_SECNO(sbi, segno) \ argument
79 ((segno) / sbi->segs_per_sec)
80 #define GET_ZONENO_FROM_SEGNO(sbi, segno) \ argument
81 ((segno / sbi->segs_per_sec) / sbi->secs_per_zone)
83 #define GET_SUM_BLOCK(sbi, segno) \ argument
84 ((sbi->sm_info->ssa_blkaddr) + segno)
89 #define SIT_ENTRY_OFFSET(sit_i, segno) \ argument
90 (segno % sit_i->sents_per_block)
91 #define SIT_BLOCK_OFFSET(segno) \ argument
92 (segno / SIT_ENTRY_PER_BLOCK)
93 #define START_SEGNO(segno) \ argument
94 (SIT_BLOCK_OFFSET(segno) * SIT_ENTRY_PER_BLOCK)
261 unsigned int segno; /* current segment number */ member
282 unsigned int segno) in get_seg_entry() argument
285 return &sit_i->sentries[segno]; in get_seg_entry()
289 unsigned int segno) in get_sec_entry() argument
292 return &sit_i->sec_entries[GET_SECNO(sbi, segno)]; in get_sec_entry()
296 unsigned int segno, int section) in get_valid_blocks() argument
303 return get_sec_entry(sbi, segno)->valid_blocks; in get_valid_blocks()
305 return get_seg_entry(sbi, segno)->valid_blocks; in get_valid_blocks()
332 unsigned int max, unsigned int segno) in find_next_inuse() argument
336 ret = find_next_bit(free_i->free_segmap, max, segno); in find_next_inuse()
341 static inline void __set_free(struct f2fs_sb_info *sbi, unsigned int segno) in __set_free() argument
344 unsigned int secno = segno / sbi->segs_per_sec; in __set_free()
349 clear_bit(segno, free_i->free_segmap); in __set_free()
362 unsigned int segno) in __set_inuse() argument
365 unsigned int secno = segno / sbi->segs_per_sec; in __set_inuse()
366 set_bit(segno, free_i->free_segmap); in __set_inuse()
373 unsigned int segno) in __set_test_and_free() argument
376 unsigned int secno = segno / sbi->segs_per_sec; in __set_test_and_free()
381 if (test_and_clear_bit(segno, free_i->free_segmap)) { in __set_test_and_free()
395 unsigned int segno) in __set_test_and_inuse() argument
398 unsigned int secno = segno / sbi->segs_per_sec; in __set_test_and_inuse()
400 if (!test_and_set_bit(segno, free_i->free_segmap)) { in __set_test_and_inuse()
553 return curseg->segno; in curseg_segno()
569 static inline void check_seg_range(struct f2fs_sb_info *sbi, unsigned int segno) in check_seg_range() argument
571 f2fs_bug_on(sbi, segno > TOTAL_SEGS(sbi) - 1); in check_seg_range()
584 int segno, struct f2fs_sit_entry *raw_sit) in check_block_count() argument
609 || segno > TOTAL_SEGS(sbi) - 1); in check_block_count()