Home | History | Annotate | Download | only in mkfs

Lines Matching defs:cp

26 struct f2fs_checkpoint *cp;
62 #define set_cp_le64(member, val) (cp->member = cpu_to_le64(val))
63 #define set_cp_le32(member, val) (cp->member = cpu_to_le32(val))
64 #define set_cp_le16(member, val) (cp->member = cpu_to_le16(val))
65 #define get_cp_le64(member) le64_to_cpu(cp->member)
66 #define get_cp_le32(member) le32_to_cpu(cp->member)
67 #define get_cp_le16(member) le16_to_cpu(cp->member)
71 typeof(cp->member) t; \
81 typeof(cp->member) t; \
245 * This number resizes NAT bitmap area in a CP page.
246 * So the threshold is determined not to overflow one CP page
258 * When sit is too large, we should expand cp area. It requires more pages for cp.
450 cp = calloc(F2FS_BLKSIZE, 1);
451 if (cp == NULL) {
475 /* 1. cp page 1 of checkpoint pack 1 */
502 /* cp page (2), data summaries (1), node summaries (3) */
517 crc = f2fs_cal_crc32(F2FS_SUPER_MAGIC, cp, CHECKSUM_OFFSET);
518 *((__le32 *)((unsigned char *)cp + CHECKSUM_OFFSET)) =
525 DBG(1, "\tWriting main segments, cp at offset 0x%08"PRIx64"\n", cp_seg_blk_offset);
526 if (dev_write(cp, cp_seg_blk_offset, blk_size_bytes)) {
527 MSG(1, "\tError: While writing the cp to disk!!!\n");
572 sum->sit_j.entries[0].segno = cp->cur_node_segno[0];
575 sum->sit_j.entries[1].segno = cp->cur_node_segno[1];
577 sum->sit_j.entries[2].segno = cp->cur_node_segno[2];
581 sum->sit_j.entries[3].segno = cp->cur_data_segno[0];
584 sum->sit_j.entries[4].segno = cp->cur_data_segno[1];
586 sum->sit_j.entries[5].segno = cp->cur_data_segno[2];
645 /* cp page2 */
647 DBG(1, "\tWriting cp page2, at offset 0x%08"PRIx64"\n", cp_seg_blk_offset);
648 if (dev_write(cp, cp_seg_blk_offset, blk_size_bytes)) {
649 MSG(1, "\tError: While writing the cp to disk!!!\n");
653 /* cp page 1 of check point pack 2
656 cp->checkpoint_ver = 0;
658 crc = f2fs_cal_crc32(F2FS_SUPER_MAGIC, cp, CHECKSUM_OFFSET);
659 *((__le32 *)((unsigned char *)cp + CHECKSUM_OFFSET)) =
664 DBG(1, "\tWriting cp page 1 of checkpoint pack 2, at offset 0x%08"PRIx64"\n", cp_seg_blk_offset);
665 if (dev_write(cp, cp_seg_blk_offset, blk_size_bytes)) {
666 MSG(1, "\tError: While writing the cp to disk!!!\n");
679 /* cp page 2 of check point pack 2 */
680 cp_seg_blk_offset += blk_size_bytes * (le32_to_cpu(cp->cp_pack_total_block_count)
682 DBG(1, "\tWriting cp page 2 of checkpoint pack 2, at offset 0x%08"PRIx64"\n", cp_seg_blk_offset);
683 if (dev_write(cp, cp_seg_blk_offset, blk_size_bytes)) {
684 MSG(1, "\tError: While writing the cp to disk!!!\n");
697 free(cp);