Lines Matching refs:raw_super
1144 kvfree(sbi->raw_super); in f2fs_put_super()
1268 total_count = le64_to_cpu(sbi->raw_super->block_count); in f2fs_statfs()
1270 start_count = le32_to_cpu(sbi->raw_super->segment0_blkaddr); in f2fs_statfs()
2471 struct f2fs_super_block *raw_super = (struct f2fs_super_block *) in sanity_check_area_boundary() local
2474 u32 segment0_blkaddr = le32_to_cpu(raw_super->segment0_blkaddr); in sanity_check_area_boundary()
2475 u32 cp_blkaddr = le32_to_cpu(raw_super->cp_blkaddr); in sanity_check_area_boundary()
2476 u32 sit_blkaddr = le32_to_cpu(raw_super->sit_blkaddr); in sanity_check_area_boundary()
2477 u32 nat_blkaddr = le32_to_cpu(raw_super->nat_blkaddr); in sanity_check_area_boundary()
2478 u32 ssa_blkaddr = le32_to_cpu(raw_super->ssa_blkaddr); in sanity_check_area_boundary()
2479 u32 main_blkaddr = le32_to_cpu(raw_super->main_blkaddr); in sanity_check_area_boundary()
2480 u32 segment_count_ckpt = le32_to_cpu(raw_super->segment_count_ckpt); in sanity_check_area_boundary()
2481 u32 segment_count_sit = le32_to_cpu(raw_super->segment_count_sit); in sanity_check_area_boundary()
2482 u32 segment_count_nat = le32_to_cpu(raw_super->segment_count_nat); in sanity_check_area_boundary()
2483 u32 segment_count_ssa = le32_to_cpu(raw_super->segment_count_ssa); in sanity_check_area_boundary()
2484 u32 segment_count_main = le32_to_cpu(raw_super->segment_count_main); in sanity_check_area_boundary()
2485 u32 segment_count = le32_to_cpu(raw_super->segment_count); in sanity_check_area_boundary()
2486 u32 log_blocks_per_seg = le32_to_cpu(raw_super->log_blocks_per_seg); in sanity_check_area_boundary()
2542 raw_super->segment_count = cpu_to_le32((main_end_blkaddr - in sanity_check_area_boundary()
2568 struct f2fs_super_block *raw_super = (struct f2fs_super_block *) in sanity_check_raw_super() local
2574 if (le32_to_cpu(raw_super->magic) != F2FS_SUPER_MAGIC) { in sanity_check_raw_super()
2576 F2FS_SUPER_MAGIC, le32_to_cpu(raw_super->magic)); in sanity_check_raw_super()
2581 if (__F2FS_HAS_FEATURE(raw_super, F2FS_FEATURE_SB_CHKSUM)) { in sanity_check_raw_super()
2582 crc_offset = le32_to_cpu(raw_super->checksum_offset); in sanity_check_raw_super()
2589 crc = le32_to_cpu(raw_super->crc); in sanity_check_raw_super()
2590 if (!f2fs_crc_valid(sbi, crc, raw_super, crc_offset)) { in sanity_check_raw_super()
2604 blocksize = 1 << le32_to_cpu(raw_super->log_blocksize); in sanity_check_raw_super()
2612 if (le32_to_cpu(raw_super->log_blocks_per_seg) != 9) { in sanity_check_raw_super()
2614 le32_to_cpu(raw_super->log_blocks_per_seg)); in sanity_check_raw_super()
2619 if (le32_to_cpu(raw_super->log_sectorsize) > in sanity_check_raw_super()
2621 le32_to_cpu(raw_super->log_sectorsize) < in sanity_check_raw_super()
2624 le32_to_cpu(raw_super->log_sectorsize)); in sanity_check_raw_super()
2627 if (le32_to_cpu(raw_super->log_sectors_per_block) + in sanity_check_raw_super()
2628 le32_to_cpu(raw_super->log_sectorsize) != in sanity_check_raw_super()
2631 le32_to_cpu(raw_super->log_sectors_per_block), in sanity_check_raw_super()
2632 le32_to_cpu(raw_super->log_sectorsize)); in sanity_check_raw_super()
2636 segment_count = le32_to_cpu(raw_super->segment_count); in sanity_check_raw_super()
2637 segs_per_sec = le32_to_cpu(raw_super->segs_per_sec); in sanity_check_raw_super()
2638 secs_per_zone = le32_to_cpu(raw_super->secs_per_zone); in sanity_check_raw_super()
2639 total_sections = le32_to_cpu(raw_super->section_count); in sanity_check_raw_super()
2642 blocks_per_seg = 1 << le32_to_cpu(raw_super->log_blocks_per_seg); in sanity_check_raw_super()
2664 if (segment_count > (le64_to_cpu(raw_super->block_count) >> 9)) { in sanity_check_raw_super()
2666 segment_count, le64_to_cpu(raw_super->block_count)); in sanity_check_raw_super()
2690 if (le32_to_cpu(raw_super->extension_count) > F2FS_MAX_EXTENSION || in sanity_check_raw_super()
2691 raw_super->hot_ext_count > F2FS_MAX_EXTENSION || in sanity_check_raw_super()
2692 (le32_to_cpu(raw_super->extension_count) + in sanity_check_raw_super()
2693 raw_super->hot_ext_count) > F2FS_MAX_EXTENSION) { in sanity_check_raw_super()
2695 le32_to_cpu(raw_super->extension_count), in sanity_check_raw_super()
2696 raw_super->hot_ext_count, in sanity_check_raw_super()
2701 if (le32_to_cpu(raw_super->cp_payload) > in sanity_check_raw_super()
2704 le32_to_cpu(raw_super->cp_payload), in sanity_check_raw_super()
2710 if (le32_to_cpu(raw_super->node_ino) != 1 || in sanity_check_raw_super()
2711 le32_to_cpu(raw_super->meta_ino) != 2 || in sanity_check_raw_super()
2712 le32_to_cpu(raw_super->root_ino) != 3) { in sanity_check_raw_super()
2714 le32_to_cpu(raw_super->node_ino), in sanity_check_raw_super()
2715 le32_to_cpu(raw_super->meta_ino), in sanity_check_raw_super()
2716 le32_to_cpu(raw_super->root_ino)); in sanity_check_raw_super()
2730 struct f2fs_super_block *raw_super = F2FS_RAW_SUPER(sbi); in f2fs_sanity_check_ckpt() local
2743 total = le32_to_cpu(raw_super->segment_count); in f2fs_sanity_check_ckpt()
2744 fsmeta = le32_to_cpu(raw_super->segment_count_ckpt); in f2fs_sanity_check_ckpt()
2745 sit_segs = le32_to_cpu(raw_super->segment_count_sit); in f2fs_sanity_check_ckpt()
2747 nat_segs = le32_to_cpu(raw_super->segment_count_nat); in f2fs_sanity_check_ckpt()
2750 fsmeta += le32_to_cpu(raw_super->segment_count_ssa); in f2fs_sanity_check_ckpt()
2765 segment_count_main = le32_to_cpu(raw_super->segment_count_main); in f2fs_sanity_check_ckpt()
2766 log_blocks_per_seg = le32_to_cpu(raw_super->log_blocks_per_seg); in f2fs_sanity_check_ckpt()
2789 main_segs = le32_to_cpu(raw_super->segment_count_main); in f2fs_sanity_check_ckpt()
2870 struct f2fs_super_block *raw_super = sbi->raw_super; in init_sb_info() local
2874 le32_to_cpu(raw_super->log_sectors_per_block); in init_sb_info()
2875 sbi->log_blocksize = le32_to_cpu(raw_super->log_blocksize); in init_sb_info()
2877 sbi->log_blocks_per_seg = le32_to_cpu(raw_super->log_blocks_per_seg); in init_sb_info()
2879 sbi->segs_per_sec = le32_to_cpu(raw_super->segs_per_sec); in init_sb_info()
2880 sbi->secs_per_zone = le32_to_cpu(raw_super->secs_per_zone); in init_sb_info()
2881 sbi->total_sections = le32_to_cpu(raw_super->section_count); in init_sb_info()
2883 (le32_to_cpu(raw_super->segment_count_nat) / 2) in init_sb_info()
2885 sbi->root_ino_num = le32_to_cpu(raw_super->root_ino); in init_sb_info()
2886 sbi->node_ino_num = le32_to_cpu(raw_super->node_ino); in init_sb_info()
2887 sbi->meta_ino_num = le32_to_cpu(raw_super->meta_ino); in init_sb_info()
2995 struct f2fs_super_block **raw_super, in read_raw_super_block() argument
3028 if (!*raw_super) { in read_raw_super_block()
3032 *raw_super = super; in read_raw_super_block()
3038 if (!*raw_super) in read_raw_super_block()
3087 struct f2fs_super_block *raw_super = F2FS_RAW_SUPER(sbi); in f2fs_scan_devices() local
3129 le32_to_cpu(raw_super->segment0_blkaddr); in f2fs_scan_devices()
3191 if (f2fs_sb_read_encoding(sbi->raw_super, &encoding_info, in f2fs_setup_casefold()
3241 struct f2fs_super_block *raw_super; in f2fs_fill_super() local
3252 raw_super = NULL; in f2fs_fill_super()
3278 err = read_raw_super_block(sbi, &raw_super, &valid_super_block, in f2fs_fill_super()
3284 sbi->raw_super = raw_super; in f2fs_fill_super()
3288 sbi->s_chksum_seed = f2fs_chksum(sbi, ~0, raw_super->uuid, in f2fs_fill_super()
3289 sizeof(raw_super->uuid)); in f2fs_fill_super()
3317 le32_to_cpu(raw_super->log_blocksize); in f2fs_fill_super()
3350 memcpy(&sb->s_uuid, raw_super->uuid, sizeof(raw_super->uuid)); in f2fs_fill_super()
3690 kvfree(raw_super); in f2fs_fill_super()