Searched refs:node_blk (Results 1 – 9 of 9) sorted by relevance
/third_party/f2fs-tools/fsck/ |
D | dump.c | 254 struct f2fs_node *node_blk; in dump_node_blk() local 260 node_blk = calloc(BLOCK_SZ, 1); in dump_node_blk() 261 ASSERT(node_blk); in dump_node_blk() 263 dev_read_block(node_blk, ni.blk_addr); in dump_node_blk() 267 skip = idx = ADDRS_PER_BLOCK(&node_blk->i); in dump_node_blk() 271 skip = idx * ADDRS_PER_BLOCK(&node_blk->i); in dump_node_blk() 288 le32_to_cpu(node_blk->dn.addr[i])); in dump_node_blk() 292 le32_to_cpu(node_blk->in.nid[i]), ofs); in dump_node_blk() 296 le32_to_cpu(node_blk->in.nid[i]), ofs); in dump_node_blk() 300 free(node_blk); in dump_node_blk() [all …]
|
D | node.h | 27 struct f2fs_node *node_blk, struct f2fs_node *inode_blk) in ADDRS_PER_PAGE() argument 29 nid_t ino = le32_to_cpu(node_blk->footer.ino); in ADDRS_PER_PAGE() 32 if (IS_INODE(node_blk)) in ADDRS_PER_PAGE() 33 return ADDRS_PER_INODE(&node_blk->i); in ADDRS_PER_PAGE() 98 dn->node_blk = nblk; in set_new_dnode() 128 static inline nid_t ino_of_node(struct f2fs_node *node_blk) in ino_of_node() argument 130 return le32_to_cpu(node_blk->footer.ino); in ino_of_node() 133 static inline __u64 cpver_of_node(struct f2fs_node *node_blk) in cpver_of_node() argument 135 return le64_to_cpu(node_blk->footer.cp_ver); in cpver_of_node() 139 struct f2fs_node *node_blk) in is_recoverable_dnode() argument [all …]
|
D | dir.c | 37 void make_dentry_ptr(struct f2fs_dentry_ptr *d, struct f2fs_node *node_blk, in make_dentry_ptr() argument 48 int entry_cnt = NR_INLINE_DENTRY(node_blk); in make_dentry_ptr() 49 int bitmap_size = INLINE_DENTRY_BITMAP_SIZE(node_blk); in make_dentry_ptr() 50 int reserved_size = INLINE_RESERVED_SIZE(node_blk); in make_dentry_ptr() 139 if (dn.node_blk && dn.node_blk != dn.inode_blk) in find_in_level() 140 free(dn.node_blk); in find_in_level() 159 if (dn.node_blk && dn.node_blk != dn.inode_blk) in find_in_level() 160 free(dn.node_blk); in find_in_level() 268 if (dn.node_blk && dn.node_blk != dn.inode_blk) in f2fs_add_link() 269 free(dn.node_blk); in f2fs_add_link() [all …]
|
D | node.c | 46 struct f2fs_node *node_blk = dn->node_blk; in set_data_blkaddr() local 49 addr_array = blkaddr_in_node(node_blk); in set_data_blkaddr() 51 if (dn->node_blk != dn->inode_blk) in set_data_blkaddr() 65 struct f2fs_node *node_blk; in new_node_block() local 75 node_blk = calloc(BLOCK_SZ, 1); in new_node_block() 76 ASSERT(node_blk); in new_node_block() 78 node_blk->footer.nid = cpu_to_le32(dn->nid); in new_node_block() 79 node_blk->footer.ino = f2fs_inode->footer.ino; in new_node_block() 80 node_blk->footer.flag = cpu_to_le32(ofs << OFFSET_BIT_SHIFT); in new_node_block() 81 node_blk->footer.cp_ver = ckpt->checkpoint_ver; in new_node_block() [all …]
|
D | fsck.c | 222 struct f2fs_node *node_blk = NULL; in is_valid_summary() local 227 node_blk = (struct f2fs_node *)calloc(BLOCK_SZ, 1); in is_valid_summary() 228 ASSERT(node_blk != NULL); in is_valid_summary() 239 ret = dev_read_block(node_blk, ni.blk_addr); in is_valid_summary() 242 if (le32_to_cpu(node_blk->footer.nid) != nid) in is_valid_summary() 246 if (node_blk->footer.nid == node_blk->footer.ino) { in is_valid_summary() 247 int ofs = get_extra_isize(node_blk); in is_valid_summary() 249 target_blk_addr = node_blk->i.i_addr[ofs + ofs_in_node]; in is_valid_summary() 251 target_blk_addr = node_blk->dn.addr[ofs_in_node]; in is_valid_summary() 257 free(node_blk); in is_valid_summary() [all …]
|
D | segment.c | 106 unsigned int blkaddr = datablock_addr(dn->node_blk, dn->ofs_in_node); in new_data_block() 109 ASSERT(dn->node_blk); in new_data_block() 191 index_node = (dn.node_blk == dn.inode_blk) ? in f2fs_read() 192 NULL : dn.node_blk; in f2fs_read() 194 dn.node_blk, dn.inode_blk); in f2fs_read() 198 blkaddr = datablock_addr(dn.node_blk, dn.ofs_in_node); in f2fs_read() 270 index_node = (dn.node_blk == dn.inode_blk) ? in f2fs_write() 271 NULL : dn.node_blk; in f2fs_write() 273 dn.node_blk, dn.inode_blk); in f2fs_write() 277 blkaddr = datablock_addr(dn.node_blk, dn.ofs_in_node); in f2fs_write() [all …]
|
D | xattr.c | 28 struct f2fs_node *node_blk = NULL; in read_all_xattrs() local 32 node_blk = (struct f2fs_node *)calloc(BLOCK_SZ, 1); in read_all_xattrs() 33 ASSERT(node_blk != NULL); in read_all_xattrs() 35 ret = fsck_sanity_check_nid(sbi, xnid, node_blk, in read_all_xattrs() 37 free(node_blk); in read_all_xattrs() 107 ASSERT(dn.node_blk); in write_all_xattrs() 108 xattr_node = dn.node_blk; in write_all_xattrs()
|
D | mount.c | 1822 struct f2fs_node *node_blk; in restore_node_summary() local 1828 node_blk = malloc(F2FS_BLKSIZE); in restore_node_summary() 1829 ASSERT(node_blk); in restore_node_summary() 1836 ret = dev_read_block(node_blk, addr); in restore_node_summary() 1838 sum_entry->nid = node_blk->footer.nid; in restore_node_summary() 1841 free(node_blk); in restore_node_summary() 2198 struct f2fs_node *node_blk = NULL; in update_data_blkaddr() local 2203 node_blk = (struct f2fs_node *)calloc(BLOCK_SZ, 1); in update_data_blkaddr() 2204 ASSERT(node_blk); in update_data_blkaddr() 2209 ret = dev_read_block(node_blk, ni.blk_addr); in update_data_blkaddr() [all …]
|
D | f2fs.h | 229 struct f2fs_node *node_blk; /* cached direct node page */ member 311 static inline void *inline_data_addr(struct f2fs_node *node_blk) in inline_data_addr() argument 313 int ofs = get_extra_isize(node_blk) + DEF_INLINE_RESERVED_SIZE; in inline_data_addr() 315 return (void *)&(node_blk->i.i_addr[ofs]); in inline_data_addr() 318 static inline unsigned int ofs_of_node(struct f2fs_node *node_blk) in ofs_of_node() argument 320 unsigned flag = le32_to_cpu(node_blk->footer.flag); in ofs_of_node()
|