Lines Matching refs:get_sb
677 if (get_sb(feature) & F2FS_FEATURE_SB_CHKSUM) { in update_superblock()
678 old_crc = get_sb(crc); in update_superblock()
701 u32 segment0_blkaddr = get_sb(segment0_blkaddr); in sanity_check_area_boundary()
702 u32 cp_blkaddr = get_sb(cp_blkaddr); in sanity_check_area_boundary()
703 u32 sit_blkaddr = get_sb(sit_blkaddr); in sanity_check_area_boundary()
704 u32 nat_blkaddr = get_sb(nat_blkaddr); in sanity_check_area_boundary()
705 u32 ssa_blkaddr = get_sb(ssa_blkaddr); in sanity_check_area_boundary()
706 u32 main_blkaddr = get_sb(main_blkaddr); in sanity_check_area_boundary()
707 u32 segment_count_ckpt = get_sb(segment_count_ckpt); in sanity_check_area_boundary()
708 u32 segment_count_sit = get_sb(segment_count_sit); in sanity_check_area_boundary()
709 u32 segment_count_nat = get_sb(segment_count_nat); in sanity_check_area_boundary()
710 u32 segment_count_ssa = get_sb(segment_count_ssa); in sanity_check_area_boundary()
711 u32 segment_count_main = get_sb(segment_count_main); in sanity_check_area_boundary()
712 u32 segment_count = get_sb(segment_count); in sanity_check_area_boundary()
713 u32 log_blocks_per_seg = get_sb(log_blocks_per_seg); in sanity_check_area_boundary()
780 if (SB_CHKSUM_OFFSET != get_sb(checksum_offset)) { in verify_sb_chksum()
782 get_sb(checksum_offset)); in verify_sb_chksum()
785 if (f2fs_crc_valid(get_sb(crc), sb, in verify_sb_chksum()
786 get_sb(checksum_offset))) { in verify_sb_chksum()
787 MSG(0, "\tInvalid SB CRC: 0x%x\n", get_sb(crc)); in verify_sb_chksum()
799 if ((get_sb(feature) & F2FS_FEATURE_SB_CHKSUM) && in sanity_check_raw_super()
803 if (F2FS_SUPER_MAGIC != get_sb(magic)) { in sanity_check_raw_super()
805 F2FS_SUPER_MAGIC, get_sb(magic)); in sanity_check_raw_super()
815 blocksize = 1 << get_sb(log_blocksize); in sanity_check_raw_super()
823 if (get_sb(log_blocks_per_seg) != 9) { in sanity_check_raw_super()
825 get_sb(log_blocks_per_seg)); in sanity_check_raw_super()
830 if (get_sb(log_sectorsize) > F2FS_MAX_LOG_SECTOR_SIZE || in sanity_check_raw_super()
831 get_sb(log_sectorsize) < F2FS_MIN_LOG_SECTOR_SIZE) { in sanity_check_raw_super()
832 MSG(0, "Invalid log sectorsize (%u)\n", get_sb(log_sectorsize)); in sanity_check_raw_super()
836 if (get_sb(log_sectors_per_block) + get_sb(log_sectorsize) != in sanity_check_raw_super()
839 get_sb(log_sectors_per_block), in sanity_check_raw_super()
840 get_sb(log_sectorsize)); in sanity_check_raw_super()
844 segment_count = get_sb(segment_count); in sanity_check_raw_super()
845 segs_per_sec = get_sb(segs_per_sec); in sanity_check_raw_super()
846 secs_per_zone = get_sb(secs_per_zone); in sanity_check_raw_super()
847 total_sections = get_sb(section_count); in sanity_check_raw_super()
850 blocks_per_seg = 1 << get_sb(log_blocks_per_seg); in sanity_check_raw_super()
872 if (segment_count > (get_sb(block_count) >> 9)) { in sanity_check_raw_super()
874 segment_count, get_sb(block_count)); in sanity_check_raw_super()
898 if (get_sb(extension_count) > F2FS_MAX_EXTENSION || in sanity_check_raw_super()
900 get_sb(extension_count) + in sanity_check_raw_super()
903 get_sb(extension_count), in sanity_check_raw_super()
909 if (get_sb(cp_payload) > (blocks_per_seg - F2FS_CP_PACKS)) { in sanity_check_raw_super()
911 get_sb(cp_payload), blocks_per_seg - F2FS_CP_PACKS); in sanity_check_raw_super()
916 if (get_sb(node_ino) != 1 || get_sb(meta_ino) != 2 || in sanity_check_raw_super()
917 get_sb(root_ino) != 3) { in sanity_check_raw_super()
919 get_sb(node_ino), get_sb(meta_ino), get_sb(root_ino)); in sanity_check_raw_super()
993 sbi->log_sectors_per_block = get_sb(log_sectors_per_block); in init_sb_info()
994 sbi->log_blocksize = get_sb(log_blocksize); in init_sb_info()
996 sbi->log_blocks_per_seg = get_sb(log_blocks_per_seg); in init_sb_info()
998 sbi->segs_per_sec = get_sb(segs_per_sec); in init_sb_info()
999 sbi->secs_per_zone = get_sb(secs_per_zone); in init_sb_info()
1000 sbi->total_sections = get_sb(section_count); in init_sb_info()
1001 sbi->total_node_count = (get_sb(segment_count_nat) / 2) * in init_sb_info()
1003 sbi->root_ino_num = get_sb(root_ino); in init_sb_info()
1004 sbi->node_ino_num = get_sb(node_ino); in init_sb_info()
1005 sbi->meta_ino_num = get_sb(meta_ino); in init_sb_info()
1030 c.devices[i].end_blkaddr += get_sb(segment0_blkaddr); in init_sb_info()
1039 total_sectors = get_sb(block_count) << sbi->log_sectors_per_block; in init_sb_info()
1042 (20 - get_sb(log_sectorsize))); in init_sb_info()
1134 cp_payload = get_sb(cp_payload); in get_valid_checkpoint()
1146 cp_start_blk_no = get_sb(cp_blkaddr); in get_valid_checkpoint()
1150 cp_start_blk_no += 1 << get_sb(log_blocks_per_seg); in get_valid_checkpoint()
1182 cp_blk_no = get_sb(cp_blkaddr); in get_valid_checkpoint()
1184 cp_blk_no += 1 << get_sb(log_blocks_per_seg); in get_valid_checkpoint()
1241 total = get_sb(segment_count); in sanity_check_ckpt()
1242 fsmeta = get_sb(segment_count_ckpt); in sanity_check_ckpt()
1243 sit_segs = get_sb(segment_count_sit); in sanity_check_ckpt()
1245 nat_segs = get_sb(segment_count_nat); in sanity_check_ckpt()
1248 fsmeta += get_sb(segment_count_ssa); in sanity_check_ckpt()
1263 segment_count_main = get_sb(segment_count_main); in sanity_check_ckpt()
1264 log_blocks_per_seg = get_sb(log_blocks_per_seg); in sanity_check_ckpt()
1276 u32 seg_cnt_main = get_sb(segment_count) - in sanity_check_ckpt()
1277 (get_sb(segment_count_ckpt) + in sanity_check_ckpt()
1278 get_sb(segment_count_sit) + in sanity_check_ckpt()
1279 get_sb(segment_count_nat) + in sanity_check_ckpt()
1280 get_sb(segment_count_ssa)); in sanity_check_ckpt()
1283 if (seg_cnt_main != get_sb(segment_count_main)) { in sanity_check_ckpt()
1288 valid_user_block_cnt = ((get_sb(segment_count_main) - in sanity_check_ckpt()
1297 main_segs = get_sb(segment_count_main); in sanity_check_ckpt()
1328 if ((get_sb(feature) & F2FS_FEATURE_SB_CHKSUM)) in sanity_check_ckpt()
1456 nat_bits_bytes = get_sb(segment_count_nat) << 5; in update_nat_bits_flags()
1460 (1 << get_sb(log_blocks_per_seg)) - nat_bits_blocks) in update_nat_bits_flags()
1473 u_int32_t nat_blocks = get_sb(segment_count_nat) << in write_nat_bits()
1474 (get_sb(log_blocks_per_seg) - 1); in write_nat_bits()
1497 int seg_off = i >> get_sb(log_blocks_per_seg); in write_nat_bits()
1500 blkaddr = (pgoff_t)(get_sb(nat_blkaddr) + in write_nat_bits()
1501 (seg_off << get_sb(log_blocks_per_seg) << 1) + in write_nat_bits()
1502 (i & ((1 << get_sb(log_blocks_per_seg)) - 1))); in write_nat_bits()
1510 blkaddr += (1 << get_sb(log_blocks_per_seg)); in write_nat_bits()
1528 blkaddr = get_sb(segment0_blkaddr) + (set << in write_nat_bits()
1529 get_sb(log_blocks_per_seg)) - nat_bits_blocks; in write_nat_bits()
1546 u_int32_t nat_blocks = get_sb(segment_count_nat) << in check_nat_bits()
1547 (get_sb(log_blocks_per_seg) - 1); in check_nat_bits()
1564 blkaddr = get_sb(segment0_blkaddr) + (sbi->cur_cp << in check_nat_bits()
1565 get_sb(log_blocks_per_seg)) - nat_bits_blocks; in check_nat_bits()
1629 nm_i->nat_blkaddr = get_sb(nat_blkaddr); in init_node_manager()
1632 nat_segs = get_sb(segment_count_nat) >> 1; in init_node_manager()
1633 nm_i->nat_blocks = nat_segs << get_sb(log_blocks_per_seg); in init_node_manager()
1716 sit_segs = get_sb(segment_count_sit) >> 1; in build_sit_info()
1728 sit_i->sit_base_addr = get_sb(sit_blkaddr); in build_sit_info()
2372 sm_info->seg0_blkaddr = get_sb(segment0_blkaddr); in early_build_segment_manager()
2373 sm_info->main_blkaddr = get_sb(main_blkaddr); in early_build_segment_manager()
2374 sm_info->segment_count = get_sb(segment_count); in early_build_segment_manager()
2377 sm_info->main_segments = get_sb(segment_count_main); in early_build_segment_manager()
2378 sm_info->ssa_blkaddr = get_sb(ssa_blkaddr); in early_build_segment_manager()
2703 u64 end_blkaddr = (get_sb(segment_count_main) << in find_next_free_block()
2704 get_sb(log_blocks_per_seg)) + get_sb(main_blkaddr); in find_next_free_block()
2913 unsigned int seg_size = 1 << get_sb(log_blocks_per_seg); in duplicate_checkpoint()
2923 src = get_sb(cp_blkaddr); in duplicate_checkpoint()
2926 dst = get_sb(cp_blkaddr); in duplicate_checkpoint()
2986 set_cp(cp_pack_total_block_count, 8 + orphan_blks + get_sb(cp_payload)); in write_checkpoint()
2995 cp_blk_no = get_sb(cp_blkaddr); in write_checkpoint()
2997 cp_blk_no += 1 << get_sb(log_blocks_per_seg); in write_checkpoint()
3004 cp_blk_no += get_sb(cp_payload); in write_checkpoint()
3068 nr_nat_blks = (get_sb(segment_count_nat) / 2) << in build_nat_area_bitmap()
3191 if (log_sectorsize == get_sb(log_sectorsize) && in check_sector_size()
3192 log_sectors_per_block == get_sb(log_sectors_per_block)) in check_sector_size()
3624 u_int32_t seg_size = 1 << get_sb(log_blocks_per_seg); in f2fs_sparse_initialize_meta()
3630 sit_seg_addr = get_sb(sit_blkaddr); in f2fs_sparse_initialize_meta()
3631 sit_seg_count = get_sb(segment_count_sit); in f2fs_sparse_initialize_meta()
3644 nat_seg_addr = get_sb(nat_blkaddr); in f2fs_sparse_initialize_meta()
3645 nat_seg_count = get_sb(segment_count_nat); in f2fs_sparse_initialize_meta()
3658 payload_addr = get_sb(segment0_blkaddr) + 1; in f2fs_sparse_initialize_meta()
3661 payload_addr, get_sb(cp_payload)); in f2fs_sparse_initialize_meta()
3663 get_sb(cp_payload) * F2FS_BLKSIZE); in f2fs_sparse_initialize_meta()
3673 payload_addr, get_sb(cp_payload)); in f2fs_sparse_initialize_meta()
3675 get_sb(cp_payload) * F2FS_BLKSIZE); in f2fs_sparse_initialize_meta()