Lines Matching refs:raw_node

726 	struct f2fs_node *raw_node = NULL;  in f2fs_write_root_inode()  local
730 raw_node = calloc(F2FS_BLKSIZE, 1); in f2fs_write_root_inode()
731 if (raw_node == NULL) { in f2fs_write_root_inode()
736 raw_node->footer.nid = sb.root_ino; in f2fs_write_root_inode()
737 raw_node->footer.ino = sb.root_ino; in f2fs_write_root_inode()
738 raw_node->footer.cp_ver = cpu_to_le64(1); in f2fs_write_root_inode()
739 raw_node->footer.next_blkaddr = cpu_to_le32( in f2fs_write_root_inode()
744 raw_node->i.i_mode = cpu_to_le16(0x41ed); in f2fs_write_root_inode()
745 raw_node->i.i_links = cpu_to_le32(2); in f2fs_write_root_inode()
746 raw_node->i.i_uid = cpu_to_le32(getuid()); in f2fs_write_root_inode()
747 raw_node->i.i_gid = cpu_to_le32(getgid()); in f2fs_write_root_inode()
750 raw_node->i.i_size = cpu_to_le64(1 * blk_size_bytes); /* dentry */ in f2fs_write_root_inode()
751 raw_node->i.i_blocks = cpu_to_le64(2); in f2fs_write_root_inode()
753 raw_node->i.i_atime = cpu_to_le32(time(NULL)); in f2fs_write_root_inode()
754 raw_node->i.i_atime_nsec = 0; in f2fs_write_root_inode()
755 raw_node->i.i_ctime = cpu_to_le32(time(NULL)); in f2fs_write_root_inode()
756 raw_node->i.i_ctime_nsec = 0; in f2fs_write_root_inode()
757 raw_node->i.i_mtime = cpu_to_le32(time(NULL)); in f2fs_write_root_inode()
758 raw_node->i.i_mtime_nsec = 0; in f2fs_write_root_inode()
759 raw_node->i.i_generation = 0; in f2fs_write_root_inode()
760 raw_node->i.i_xattr_nid = 0; in f2fs_write_root_inode()
761 raw_node->i.i_flags = 0; in f2fs_write_root_inode()
762 raw_node->i.i_current_depth = cpu_to_le32(1); in f2fs_write_root_inode()
763 raw_node->i.i_dir_level = DEF_DIR_LEVEL; in f2fs_write_root_inode()
767 raw_node->i.i_addr[0] = cpu_to_le32(data_blk_nor); in f2fs_write_root_inode()
769 raw_node->i.i_ext.fofs = 0; in f2fs_write_root_inode()
770 raw_node->i.i_ext.blk_addr = cpu_to_le32(data_blk_nor); in f2fs_write_root_inode()
771 raw_node->i.i_ext.len = cpu_to_le32(1); in f2fs_write_root_inode()
779 if (dev_write(raw_node, main_area_node_seg_blk_offset, F2FS_BLKSIZE)) { in f2fs_write_root_inode()
781 free(raw_node); in f2fs_write_root_inode()
785 memset(raw_node, 0xff, sizeof(struct f2fs_node)); in f2fs_write_root_inode()
794 if (dev_write(raw_node, main_area_node_seg_blk_offset, F2FS_BLKSIZE)) { in f2fs_write_root_inode()
796 free(raw_node); in f2fs_write_root_inode()
799 free(raw_node); in f2fs_write_root_inode()