Lines Matching refs:raw_node

1135 	struct f2fs_node *raw_node;  in f2fs_discard_obsolete_dnode()  local
1145 raw_node = calloc(sizeof(struct f2fs_node), 1); in f2fs_discard_obsolete_dnode()
1146 if (raw_node == NULL) { in f2fs_discard_obsolete_dnode()
1162 if (dev_read_block(raw_node, offset)) { in f2fs_discard_obsolete_dnode()
1164 free(raw_node); in f2fs_discard_obsolete_dnode()
1168 next_blkaddr = le32_to_cpu(raw_node->footer.next_blkaddr); in f2fs_discard_obsolete_dnode()
1169 memset(raw_node, 0, F2FS_BLKSIZE); in f2fs_discard_obsolete_dnode()
1172 if (dev_write_block(raw_node, offset)) { in f2fs_discard_obsolete_dnode()
1174 free(raw_node); in f2fs_discard_obsolete_dnode()
1183 free(raw_node); in f2fs_discard_obsolete_dnode()
1190 struct f2fs_node *raw_node = NULL; in f2fs_write_root_inode() local
1194 raw_node = calloc(F2FS_BLKSIZE, 1); in f2fs_write_root_inode()
1195 if (raw_node == NULL) { in f2fs_write_root_inode()
1200 raw_node->footer.nid = sb->root_ino; in f2fs_write_root_inode()
1201 raw_node->footer.ino = sb->root_ino; in f2fs_write_root_inode()
1202 raw_node->footer.cp_ver = cpu_to_le64(1); in f2fs_write_root_inode()
1203 raw_node->footer.next_blkaddr = cpu_to_le32( in f2fs_write_root_inode()
1208 raw_node->i.i_mode = cpu_to_le16(0x41ed); in f2fs_write_root_inode()
1210 raw_node->i.i_links = cpu_to_le32(3); in f2fs_write_root_inode()
1212 raw_node->i.i_links = cpu_to_le32(2); in f2fs_write_root_inode()
1213 raw_node->i.i_uid = cpu_to_le32(c.root_uid); in f2fs_write_root_inode()
1214 raw_node->i.i_gid = cpu_to_le32(c.root_gid); in f2fs_write_root_inode()
1217 raw_node->i.i_size = cpu_to_le64(1 * blk_size_bytes); /* dentry */ in f2fs_write_root_inode()
1218 raw_node->i.i_blocks = cpu_to_le64(2); in f2fs_write_root_inode()
1220 raw_node->i.i_atime = cpu_to_le32(mkfs_time); in f2fs_write_root_inode()
1221 raw_node->i.i_atime_nsec = 0; in f2fs_write_root_inode()
1222 raw_node->i.i_ctime = cpu_to_le32(mkfs_time); in f2fs_write_root_inode()
1223 raw_node->i.i_ctime_nsec = 0; in f2fs_write_root_inode()
1224 raw_node->i.i_mtime = cpu_to_le32(mkfs_time); in f2fs_write_root_inode()
1225 raw_node->i.i_mtime_nsec = 0; in f2fs_write_root_inode()
1226 raw_node->i.i_generation = 0; in f2fs_write_root_inode()
1227 raw_node->i.i_xattr_nid = 0; in f2fs_write_root_inode()
1228 raw_node->i.i_flags = 0; in f2fs_write_root_inode()
1229 raw_node->i.i_current_depth = cpu_to_le32(1); in f2fs_write_root_inode()
1230 raw_node->i.i_dir_level = DEF_DIR_LEVEL; in f2fs_write_root_inode()
1233 raw_node->i.i_inline = F2FS_EXTRA_ATTR; in f2fs_write_root_inode()
1234 raw_node->i.i_extra_isize = cpu_to_le16(calc_extra_isize()); in f2fs_write_root_inode()
1238 raw_node->i.i_projid = cpu_to_le32(F2FS_DEF_PROJID); in f2fs_write_root_inode()
1241 raw_node->i.i_crtime = cpu_to_le32(mkfs_time); in f2fs_write_root_inode()
1242 raw_node->i.i_crtime_nsec = 0; in f2fs_write_root_inode()
1246 raw_node->i.i_compress_algrithm = 0; in f2fs_write_root_inode()
1247 raw_node->i.i_log_cluster_size = 0; in f2fs_write_root_inode()
1248 raw_node->i.i_padding = 0; in f2fs_write_root_inode()
1253 raw_node->i.i_addr[get_extra_isize(raw_node)] = cpu_to_le32(data_blk_nor); in f2fs_write_root_inode()
1255 raw_node->i.i_ext.fofs = 0; in f2fs_write_root_inode()
1256 raw_node->i.i_ext.blk_addr = 0; in f2fs_write_root_inode()
1257 raw_node->i.i_ext.len = 0; in f2fs_write_root_inode()
1267 if (write_inode(raw_node, main_area_node_seg_blk_offset) < 0) { in f2fs_write_root_inode()
1269 free(raw_node); in f2fs_write_root_inode()
1273 free(raw_node); in f2fs_write_root_inode()
1350 struct f2fs_node *raw_node = NULL; in f2fs_write_qf_inode() local
1356 raw_node = calloc(F2FS_BLKSIZE, 1); in f2fs_write_qf_inode()
1357 if (raw_node == NULL) { in f2fs_write_qf_inode()
1362 raw_node->footer.nid = sb->qf_ino[qtype]; in f2fs_write_qf_inode()
1363 raw_node->footer.ino = sb->qf_ino[qtype]; in f2fs_write_qf_inode()
1364 raw_node->footer.cp_ver = cpu_to_le64(1); in f2fs_write_qf_inode()
1365 raw_node->footer.next_blkaddr = cpu_to_le32( in f2fs_write_qf_inode()
1370 raw_node->i.i_mode = cpu_to_le16(0x8180); in f2fs_write_qf_inode()
1371 raw_node->i.i_links = cpu_to_le32(1); in f2fs_write_qf_inode()
1372 raw_node->i.i_uid = cpu_to_le32(c.root_uid); in f2fs_write_qf_inode()
1373 raw_node->i.i_gid = cpu_to_le32(c.root_gid); in f2fs_write_qf_inode()
1375 raw_node->i.i_size = cpu_to_le64(1024 * 6); /* Hard coded */ in f2fs_write_qf_inode()
1376 raw_node->i.i_blocks = cpu_to_le64(1 + QUOTA_DATA(qtype)); in f2fs_write_qf_inode()
1378 raw_node->i.i_atime = cpu_to_le32(mkfs_time); in f2fs_write_qf_inode()
1379 raw_node->i.i_atime_nsec = 0; in f2fs_write_qf_inode()
1380 raw_node->i.i_ctime = cpu_to_le32(mkfs_time); in f2fs_write_qf_inode()
1381 raw_node->i.i_ctime_nsec = 0; in f2fs_write_qf_inode()
1382 raw_node->i.i_mtime = cpu_to_le32(mkfs_time); in f2fs_write_qf_inode()
1383 raw_node->i.i_mtime_nsec = 0; in f2fs_write_qf_inode()
1384 raw_node->i.i_generation = 0; in f2fs_write_qf_inode()
1385 raw_node->i.i_xattr_nid = 0; in f2fs_write_qf_inode()
1386 raw_node->i.i_flags = FS_IMMUTABLE_FL; in f2fs_write_qf_inode()
1387 raw_node->i.i_current_depth = cpu_to_le32(0); in f2fs_write_qf_inode()
1388 raw_node->i.i_dir_level = DEF_DIR_LEVEL; in f2fs_write_qf_inode()
1391 raw_node->i.i_inline = F2FS_EXTRA_ATTR; in f2fs_write_qf_inode()
1392 raw_node->i.i_extra_isize = cpu_to_le16(calc_extra_isize()); in f2fs_write_qf_inode()
1396 raw_node->i.i_projid = cpu_to_le32(F2FS_DEF_PROJID); in f2fs_write_qf_inode()
1405 raw_id = raw_node->i.i_uid; in f2fs_write_qf_inode()
1407 raw_id = raw_node->i.i_gid; in f2fs_write_qf_inode()
1409 raw_id = raw_node->i.i_projid; in f2fs_write_qf_inode()
1415 free(raw_node); in f2fs_write_qf_inode()
1420 raw_node->i.i_addr[get_extra_isize(raw_node) + i] = in f2fs_write_qf_inode()
1422 raw_node->i.i_ext.fofs = 0; in f2fs_write_qf_inode()
1423 raw_node->i.i_ext.blk_addr = 0; in f2fs_write_qf_inode()
1424 raw_node->i.i_ext.len = 0; in f2fs_write_qf_inode()
1434 if (write_inode(raw_node, main_area_node_seg_blk_offset) < 0) { in f2fs_write_qf_inode()
1436 free(raw_node); in f2fs_write_qf_inode()
1440 free(raw_node); in f2fs_write_qf_inode()
1543 struct f2fs_node *raw_node; in f2fs_write_lpf_inode() local
1550 raw_node = calloc(F2FS_BLKSIZE, 1); in f2fs_write_lpf_inode()
1551 if (raw_node == NULL) { in f2fs_write_lpf_inode()
1556 raw_node->footer.nid = cpu_to_le32(c.lpf_ino); in f2fs_write_lpf_inode()
1557 raw_node->footer.ino = raw_node->footer.nid; in f2fs_write_lpf_inode()
1558 raw_node->footer.cp_ver = cpu_to_le64(1); in f2fs_write_lpf_inode()
1559 raw_node->footer.next_blkaddr = cpu_to_le32( in f2fs_write_lpf_inode()
1564 raw_node->i.i_mode = cpu_to_le16(0x41c0); /* 0700 */ in f2fs_write_lpf_inode()
1565 raw_node->i.i_links = cpu_to_le32(2); in f2fs_write_lpf_inode()
1566 raw_node->i.i_uid = cpu_to_le32(c.root_uid); in f2fs_write_lpf_inode()
1567 raw_node->i.i_gid = cpu_to_le32(c.root_gid); in f2fs_write_lpf_inode()
1570 raw_node->i.i_size = cpu_to_le64(1 * blk_size_bytes); in f2fs_write_lpf_inode()
1571 raw_node->i.i_blocks = cpu_to_le64(2); in f2fs_write_lpf_inode()
1573 raw_node->i.i_atime = cpu_to_le32(mkfs_time); in f2fs_write_lpf_inode()
1574 raw_node->i.i_atime_nsec = 0; in f2fs_write_lpf_inode()
1575 raw_node->i.i_ctime = cpu_to_le32(mkfs_time); in f2fs_write_lpf_inode()
1576 raw_node->i.i_ctime_nsec = 0; in f2fs_write_lpf_inode()
1577 raw_node->i.i_mtime = cpu_to_le32(mkfs_time); in f2fs_write_lpf_inode()
1578 raw_node->i.i_mtime_nsec = 0; in f2fs_write_lpf_inode()
1579 raw_node->i.i_generation = 0; in f2fs_write_lpf_inode()
1580 raw_node->i.i_xattr_nid = 0; in f2fs_write_lpf_inode()
1581 raw_node->i.i_flags = 0; in f2fs_write_lpf_inode()
1582 raw_node->i.i_pino = le32_to_cpu(sb->root_ino); in f2fs_write_lpf_inode()
1583 raw_node->i.i_namelen = le32_to_cpu(strlen(LPF)); in f2fs_write_lpf_inode()
1584 memcpy(raw_node->i.i_name, LPF, strlen(LPF)); in f2fs_write_lpf_inode()
1585 raw_node->i.i_current_depth = cpu_to_le32(1); in f2fs_write_lpf_inode()
1586 raw_node->i.i_dir_level = DEF_DIR_LEVEL; in f2fs_write_lpf_inode()
1589 raw_node->i.i_inline = F2FS_EXTRA_ATTR; in f2fs_write_lpf_inode()
1590 raw_node->i.i_extra_isize = cpu_to_le16(calc_extra_isize()); in f2fs_write_lpf_inode()
1594 raw_node->i.i_projid = cpu_to_le32(F2FS_DEF_PROJID); in f2fs_write_lpf_inode()
1597 raw_node->i.i_crtime = cpu_to_le32(mkfs_time); in f2fs_write_lpf_inode()
1598 raw_node->i.i_crtime_nsec = 0; in f2fs_write_lpf_inode()
1602 raw_node->i.i_compress_algrithm = 0; in f2fs_write_lpf_inode()
1603 raw_node->i.i_log_cluster_size = 0; in f2fs_write_lpf_inode()
1604 raw_node->i.i_padding = 0; in f2fs_write_lpf_inode()
1613 raw_node->i.i_addr[get_extra_isize(raw_node)] = cpu_to_le32(data_blk_nor); in f2fs_write_lpf_inode()
1623 if (write_inode(raw_node, main_area_node_seg_blk_offset) < 0) { in f2fs_write_lpf_inode()
1631 free(raw_node); in f2fs_write_lpf_inode()