Lines Matching refs:segno
1147 se = get_seg_entry(sbi, curseg->segno); in reset_curseg()
1204 unsigned int segno, struct f2fs_summary_block *sum_blk) in restore_node_summary() argument
1216 addr = START_BLOCK(sbi, segno); in restore_node_summary()
1233 unsigned int segno = 0; in read_normal_summaries() local
1238 segno = get_cp(cur_data_segno[type]); in read_normal_summaries()
1244 segno = get_cp(cur_node_segno[type - CURSEG_HOT_NODE]); in read_normal_summaries()
1249 blk_addr = GET_SUM_BLKADDR(sbi, segno); in read_normal_summaries()
1257 restore_node_summary(sbi, segno, sum_blk); in read_normal_summaries()
1269 u32 segno, offset; in update_sum_entry() local
1273 segno = GET_SEGNO(sbi, blk_addr); in update_sum_entry()
1276 se = get_seg_entry(sbi, segno); in update_sum_entry()
1278 sum_blk = get_sum_block(sbi, segno, &type); in update_sum_entry()
1284 ret = dev_write_block(sum_blk, GET_SUM_BLKADDR(sbi, segno)); in update_sum_entry()
1310 unsigned int segno; in build_curseg() local
1323 segno = get_cp(cur_data_segno[i]); in build_curseg()
1327 segno = get_cp(cur_node_segno[i - CURSEG_HOT_NODE]); in build_curseg()
1329 ASSERT(segno < TOTAL_SEGS(sbi)); in build_curseg()
1332 array[i].segno = segno; in build_curseg()
1333 array[i].zone = GET_ZONENO_FROM_SEGNO(sbi, segno); in build_curseg()
1341 static inline void check_seg_range(struct f2fs_sb_info *sbi, unsigned int segno) in check_seg_range() argument
1344 ASSERT(segno <= end_segno); in check_seg_range()
1348 unsigned int segno) in get_current_sit_page() argument
1351 unsigned int offset = SIT_BLOCK_OFFSET(sit_i, segno); in get_current_sit_page()
1358 check_seg_range(sbi, segno); in get_current_sit_page()
1371 unsigned int segno, struct f2fs_sit_block *sit_blk) in rewrite_current_sit_page() argument
1374 unsigned int offset = SIT_BLOCK_OFFSET(sit_i, segno); in rewrite_current_sit_page()
1387 unsigned int segno, struct f2fs_sit_entry *raw_sit) in check_block_count() argument
1397 segno, GET_SIT_VBLOCKS(raw_sit)); in check_block_count()
1400 if (segno > end_segno) in check_block_count()
1401 ASSERT_MSG("Invalid SEGNO: 0x%x", segno); in check_block_count()
1409 segno, GET_SIT_VBLOCKS(raw_sit), valid_blocks); in check_block_count()
1413 segno, GET_SIT_TYPE(raw_sit)); in check_block_count()
1427 unsigned int segno) in get_seg_entry() argument
1430 return &sit_i->sentries[segno]; in get_seg_entry()
1434 unsigned int segno, int *ret_type) in get_sum_block() argument
1444 ssa_blk = GET_SUM_BLKADDR(sbi, segno); in get_sum_block()
1446 if (segno == get_cp(cur_node_segno[type])) { in get_sum_block()
1451 segno); in get_sum_block()
1461 if (segno == get_cp(cur_data_segno[type])) { in get_sum_block()
1466 segno); in get_sum_block()
1493 u32 segno, offset; in get_sum_entry() local
1496 segno = GET_SEGNO(sbi, blk_addr); in get_sum_entry()
1499 sum_blk = get_sum_block(sbi, segno, &type); in get_sum_entry()
1632 unsigned int i, segno; in build_sit_entries() local
1634 for (segno = 0; segno < TOTAL_SEGS(sbi); segno++) { in build_sit_entries()
1635 se = &sit_i->sentries[segno]; in build_sit_entries()
1638 sit_blk = get_current_sit_page(sbi, segno); in build_sit_entries()
1639 sit = sit_blk->entries[SIT_ENTRY_OFFSET(sit_i, segno)]; in build_sit_entries()
1642 check_block_count(sbi, segno, &sit); in build_sit_entries()
1647 segno = le32_to_cpu(segno_in_journal(journal, i)); in build_sit_entries()
1648 se = &sit_i->sentries[segno]; in build_sit_entries()
1651 check_block_count(sbi, segno, &sit); in build_sit_entries()
1690 unsigned int segno = 0; in build_sit_area_bitmap() local
1703 for (segno = 0; segno < TOTAL_SEGS(sbi); segno++) { in build_sit_area_bitmap()
1704 se = get_seg_entry(sbi, segno); in build_sit_area_bitmap()
1710 if (le32_to_cpu(sbi->ckpt->cur_node_segno[0]) == segno || in build_sit_area_bitmap()
1711 le32_to_cpu(sbi->ckpt->cur_data_segno[0]) == segno || in build_sit_area_bitmap()
1712 le32_to_cpu(sbi->ckpt->cur_node_segno[1]) == segno || in build_sit_area_bitmap()
1713 le32_to_cpu(sbi->ckpt->cur_data_segno[1]) == segno || in build_sit_area_bitmap()
1714 le32_to_cpu(sbi->ckpt->cur_node_segno[2]) == segno || in build_sit_area_bitmap()
1715 le32_to_cpu(sbi->ckpt->cur_data_segno[2]) == segno) { in build_sit_area_bitmap()
1737 unsigned int segno = 0; in rewrite_sit_area_bitmap() local
1746 for (segno = 0; segno < TOTAL_SEGS(sbi); segno++) { in rewrite_sit_area_bitmap()
1754 sit_blk = get_current_sit_page(sbi, segno); in rewrite_sit_area_bitmap()
1755 sit = &sit_blk->entries[SIT_ENTRY_OFFSET(sit_i, segno)]; in rewrite_sit_area_bitmap()
1762 se = get_seg_entry(sbi, segno); in rewrite_sit_area_bitmap()
1768 segno, valid_blocks); in rewrite_sit_area_bitmap()
1773 rewrite_current_sit_page(sbi, segno, sit_blk); in rewrite_sit_area_bitmap()
1785 unsigned int segno; in flush_sit_journal_entries() local
1793 segno = segno_in_journal(journal, i); in flush_sit_journal_entries()
1794 se = get_seg_entry(sbi, segno); in flush_sit_journal_entries()
1796 sit_blk = get_current_sit_page(sbi, segno); in flush_sit_journal_entries()
1797 sit = &sit_blk->entries[SIT_ENTRY_OFFSET(sit_i, segno)]; in flush_sit_journal_entries()
1804 rewrite_current_sit_page(sbi, segno, sit_blk); in flush_sit_journal_entries()
1862 unsigned int segno = 0; in flush_sit_entries() local
1866 for (segno = 0; segno < TOTAL_SEGS(sbi); segno++) { in flush_sit_entries()
1871 se = get_seg_entry(sbi, segno); in flush_sit_entries()
1876 sit_blk = get_current_sit_page(sbi, segno); in flush_sit_entries()
1877 sit = &sit_blk->entries[SIT_ENTRY_OFFSET(sit_i, segno)]; in flush_sit_entries()
1881 rewrite_current_sit_page(sbi, segno, sit_blk); in flush_sit_entries()
1885 !IS_CUR_SEGNO(sbi, segno, NO_CHECK_TYPE)) in flush_sit_entries()
1896 u32 segno; in find_next_free_block() local
1906 segno = GET_SEGNO(sbi, *to); in find_next_free_block()
1909 se = get_seg_entry(sbi, segno); in find_next_free_block()
1912 IS_CUR_SEGNO(sbi, segno, type)) { in find_next_free_block()
1913 *to = left ? START_BLOCK(sbi, segno) - 1: in find_next_free_block()
1914 START_BLOCK(sbi, segno + 1); in find_next_free_block()
1919 *to = left ? START_BLOCK(sbi, segno) - 1: in find_next_free_block()
1920 START_BLOCK(sbi, segno + 1); in find_next_free_block()
1924 if (se->valid_blocks == 0 && !(segno % sbi->segs_per_sec)) { in find_next_free_block()
1929 se2 = get_seg_entry(sbi, segno + i); in find_next_free_block()
1958 ssa_blk = GET_SUM_BLKADDR(sbi, curseg->segno); in move_curseg_info()
1966 old_segno = curseg->segno; in move_curseg_info()
1967 curseg->segno = GET_SEGNO(sbi, to); in move_curseg_info()
1972 ssa_blk = GET_SUM_BLKADDR(sbi, curseg->segno); in move_curseg_info()
1982 i, old_segno, curseg->segno, from); in move_curseg_info()
2002 set_cp(cur_data_segno[i], CURSEG_I(sbi, i)->segno); in write_curseg_info()
2008 set_cp(cur_node_segno[n], CURSEG_I(sbi, i)->segno); in write_curseg_info()
2123 ssa_blk = GET_SUM_BLKADDR(sbi, curseg->segno); in write_checkpoint()