Lines Matching refs:cp
77 static void dbg_print_raw_ckpt_struct(struct f2fs_checkpoint *cp) in dbg_print_raw_ckpt_struct() argument
84 D_DISP_u64(cp, checkpoint_ver); in dbg_print_raw_ckpt_struct()
85 D_DISP_u64(cp, user_block_count); in dbg_print_raw_ckpt_struct()
86 D_DISP_u64(cp, valid_block_count); in dbg_print_raw_ckpt_struct()
87 D_DISP_u32(cp, rsvd_segment_count); in dbg_print_raw_ckpt_struct()
88 D_DISP_u32(cp, overprov_segment_count); in dbg_print_raw_ckpt_struct()
89 D_DISP_u32(cp, free_segment_count); in dbg_print_raw_ckpt_struct()
91 D_DISP_u32(cp, alloc_type[CURSEG_HOT_NODE]); in dbg_print_raw_ckpt_struct()
92 D_DISP_u32(cp, alloc_type[CURSEG_WARM_NODE]); in dbg_print_raw_ckpt_struct()
93 D_DISP_u32(cp, alloc_type[CURSEG_COLD_NODE]); in dbg_print_raw_ckpt_struct()
94 D_DISP_u32(cp, cur_node_segno[0]); in dbg_print_raw_ckpt_struct()
95 D_DISP_u32(cp, cur_node_segno[1]); in dbg_print_raw_ckpt_struct()
96 D_DISP_u32(cp, cur_node_segno[2]); in dbg_print_raw_ckpt_struct()
98 D_DISP_u32(cp, cur_node_blkoff[0]); in dbg_print_raw_ckpt_struct()
99 D_DISP_u32(cp, cur_node_blkoff[1]); in dbg_print_raw_ckpt_struct()
100 D_DISP_u32(cp, cur_node_blkoff[2]); in dbg_print_raw_ckpt_struct()
103 D_DISP_u32(cp, alloc_type[CURSEG_HOT_DATA]); in dbg_print_raw_ckpt_struct()
104 D_DISP_u32(cp, alloc_type[CURSEG_WARM_DATA]); in dbg_print_raw_ckpt_struct()
105 D_DISP_u32(cp, alloc_type[CURSEG_COLD_DATA]); in dbg_print_raw_ckpt_struct()
106 D_DISP_u32(cp, cur_data_segno[0]); in dbg_print_raw_ckpt_struct()
107 D_DISP_u32(cp, cur_data_segno[1]); in dbg_print_raw_ckpt_struct()
108 D_DISP_u32(cp, cur_data_segno[2]); in dbg_print_raw_ckpt_struct()
110 D_DISP_u32(cp, cur_data_blkoff[0]); in dbg_print_raw_ckpt_struct()
111 D_DISP_u32(cp, cur_data_blkoff[1]); in dbg_print_raw_ckpt_struct()
112 D_DISP_u32(cp, cur_data_blkoff[2]); in dbg_print_raw_ckpt_struct()
114 D_DISP_u32(cp, ckpt_flags); in dbg_print_raw_ckpt_struct()
115 D_DISP_u32(cp, cp_pack_total_block_count); in dbg_print_raw_ckpt_struct()
116 D_DISP_u32(cp, cp_pack_start_sum); in dbg_print_raw_ckpt_struct()
117 D_DISP_u32(cp, valid_node_count); in dbg_print_raw_ckpt_struct()
118 D_DISP_u32(cp, valid_inode_count); in dbg_print_raw_ckpt_struct()
119 D_DISP_u32(cp, next_free_nid); in dbg_print_raw_ckpt_struct()
120 D_DISP_u32(cp, sit_ver_bitmap_bytesize); in dbg_print_raw_ckpt_struct()
121 D_DISP_u32(cp, nat_ver_bitmap_bytesize); in dbg_print_raw_ckpt_struct()
122 D_DISP_u32(cp, checksum_offset); in dbg_print_raw_ckpt_struct()
123 D_DISP_u64(cp, elapsed_time); in dbg_print_raw_ckpt_struct()
125 D_DISP_u32(cp, sit_nat_version_bitmap[0]); in dbg_print_raw_ckpt_struct()
262 int get_valid_checkpoint_info(int fd, struct f2fs_super_block *sb, struct f2fs_checkpoint **cp, st… in get_valid_checkpoint_info() argument
302 *cp = cur_cp; in get_valid_checkpoint_info()
339 static inline int is_set_ckpt_flags(struct f2fs_checkpoint *cp, unsigned int f) in is_set_ckpt_flags() argument
341 unsigned int ckpt_flags = le32_to_cpu(cp->ckpt_flags); in is_set_ckpt_flags()
345 static inline uint64_t sum_blk_addr(struct f2fs_checkpoint *cp, struct f2fs_info *info, int base, i… in sum_blk_addr() argument
347 return info->cp_valid_cp_blkaddr + le32_to_cpu(cp->cp_pack_total_block_count) in sum_blk_addr()
351 static int get_sit_summary(int fd, struct f2fs_info *info, struct f2fs_checkpoint *cp) in get_sit_summary() argument
360 if (is_set_ckpt_flags(cp, CP_COMPACT_SUM_FLAG)) { in get_sit_summary()
361 …if (read_structure_blk(fd, info->cp_valid_cp_blkaddr + le32_to_cpu(cp->cp_pack_start_sum), buffer,… in get_sit_summary()
366 if (is_set_ckpt_flags(cp, CP_UMOUNT_FLAG)) in get_sit_summary()
367 blk_addr = sum_blk_addr(cp, info, NR_CURSEG_TYPE, CURSEG_COLD_DATA); in get_sit_summary()
369 blk_addr = sum_blk_addr(cp, info, NR_CURSEG_DATA_TYPE, CURSEG_COLD_DATA); in get_sit_summary()
382 struct f2fs_checkpoint *cp = NULL; in generate_f2fs_info() local
415 if (get_valid_checkpoint_info(fd, sb, &cp, info)) in generate_f2fs_info()
417 dbg_print_raw_ckpt_struct(cp); in generate_f2fs_info()
419 info->total_user_used = le32_to_cpu(cp->valid_block_count); in generate_f2fs_info()
421 u32 bmp_size = le32_to_cpu(cp->sit_ver_bitmap_bytesize); in generate_f2fs_info()
442 if (get_sit_summary(fd, info, cp)) { in generate_f2fs_info()
450 free(cp); in generate_f2fs_info()