Lines Matching refs:node_blk

193 			struct f2fs_node *node_blk,  in sanity_check_nid()  argument
221 ret = dev_read_block(node_blk, ni->blk_addr); in sanity_check_nid()
225 node_blk->footer.nid != node_blk->footer.ino) { in sanity_check_nid()
227 nid, le32_to_cpu(node_blk->footer.nid), in sanity_check_nid()
228 le32_to_cpu(node_blk->footer.ino)); in sanity_check_nid()
232 node_blk->footer.nid == node_blk->footer.ino) { in sanity_check_nid()
234 nid, le32_to_cpu(node_blk->footer.nid), in sanity_check_nid()
235 le32_to_cpu(node_blk->footer.ino)); in sanity_check_nid()
239 if (le32_to_cpu(node_blk->footer.nid) != nid) { in sanity_check_nid()
242 le32_to_cpu(node_blk->footer.nid)); in sanity_check_nid()
247 u32 flag = le32_to_cpu(node_blk->footer.flag); in sanity_check_nid()
288 struct f2fs_node *node_blk = NULL; in fsck_chk_xattr_blk() local
295 node_blk = (struct f2fs_node *)calloc(BLOCK_SZ, 1); in fsck_chk_xattr_blk()
296 ASSERT(node_blk != NULL); in fsck_chk_xattr_blk()
299 if (sanity_check_nid(sbi, x_nid, node_blk, in fsck_chk_xattr_blk()
309 free(node_blk); in fsck_chk_xattr_blk()
318 struct f2fs_node *node_blk = NULL; in fsck_chk_node_blk() local
320 node_blk = (struct f2fs_node *)calloc(BLOCK_SZ, 1); in fsck_chk_node_blk()
321 ASSERT(node_blk != NULL); in fsck_chk_node_blk()
323 if (sanity_check_nid(sbi, nid, node_blk, ftype, ntype, &ni)) in fsck_chk_node_blk()
327 fsck_chk_inode_blk(sbi, nid, ftype, node_blk, blk_cnt, &ni); in fsck_chk_node_blk()
333 fsck_chk_dnode_blk(sbi, inode, nid, ftype, node_blk, in fsck_chk_node_blk()
339 fsck_chk_idnode_blk(sbi, inode, ftype, node_blk, in fsck_chk_node_blk()
345 fsck_chk_didnode_blk(sbi, inode, ftype, node_blk, in fsck_chk_node_blk()
352 free(node_blk); in fsck_chk_node_blk()
355 free(node_blk); in fsck_chk_node_blk()
361 enum FILE_TYPE ftype, struct f2fs_node *node_blk, in fsck_chk_inode_blk() argument
367 u32 i_links = le32_to_cpu(node_blk->i.i_links); in fsck_chk_inode_blk()
368 u64 i_blocks = le64_to_cpu(node_blk->i.i_blocks); in fsck_chk_inode_blk()
393 node_blk->i.i_links = in fsck_chk_inode_blk()
408 le32_to_cpu(node_blk->i.i_xattr_nid), blk_cnt) && in fsck_chk_inode_blk()
410 node_blk->i.i_xattr_nid = 0; in fsck_chk_inode_blk()
413 nid, le32_to_cpu(node_blk->i.i_xattr_nid)); in fsck_chk_inode_blk()
420 if((node_blk->i.i_inline & F2FS_INLINE_DATA)) { in fsck_chk_inode_blk()
421 if (le32_to_cpu(node_blk->i.i_addr[0]) != 0) { in fsck_chk_inode_blk()
424 le32_to_cpu(node_blk->i.i_addr[0])); in fsck_chk_inode_blk()
425 node_blk->i.i_addr[0] = 0; in fsck_chk_inode_blk()
426 node_blk->i.i_blocks = cpu_to_le64(*blk_cnt); in fsck_chk_inode_blk()
429 if (!(node_blk->i.i_inline & F2FS_DATA_EXIST)) { in fsck_chk_inode_blk()
433 if (memcmp(buf, &node_blk->i.i_addr[1], in fsck_chk_inode_blk()
436 node_blk->i.i_inline |= F2FS_DATA_EXIST; in fsck_chk_inode_blk()
443 if((node_blk->i.i_inline & F2FS_INLINE_DENTRY)) { in fsck_chk_inode_blk()
445 ret = fsck_chk_inline_dentries(sbi, node_blk, in fsck_chk_inode_blk()
456 u32 nid = le32_to_cpu(node_blk->i.i_nid[idx]); in fsck_chk_inode_blk()
468 for (idx = 0; idx < ADDRS_PER_INODE(&node_blk->i); idx++) { in fsck_chk_inode_blk()
469 if (le32_to_cpu(node_blk->i.i_addr[idx]) != 0) { in fsck_chk_inode_blk()
471 le32_to_cpu(node_blk->i.i_addr[idx]), in fsck_chk_inode_blk()
478 node_blk->i.i_addr[idx] = 0; in fsck_chk_inode_blk()
496 if (le32_to_cpu(node_blk->i.i_nid[idx]) != 0) { in fsck_chk_inode_blk()
497 ret = fsck_chk_node_blk(sbi, &node_blk->i, in fsck_chk_inode_blk()
498 le32_to_cpu(node_blk->i.i_nid[idx]), in fsck_chk_inode_blk()
503 node_blk->i.i_nid[idx] = 0; in fsck_chk_inode_blk()
512 le32_to_cpu(node_blk->footer.ino), in fsck_chk_inode_blk()
513 node_blk->i.i_name, in fsck_chk_inode_blk()
514 le32_to_cpu(node_blk->i.i_current_depth), in fsck_chk_inode_blk()
518 le32_to_cpu(node_blk->footer.ino), in fsck_chk_inode_blk()
519 node_blk->i.i_name, in fsck_chk_inode_blk()
527 node_blk->i.i_blocks = cpu_to_le64(*blk_cnt); in fsck_chk_inode_blk()
537 node_blk->i.i_links = cpu_to_le32(child_cnt); in fsck_chk_inode_blk()
548 ret = dev_write_block(node_blk, ni->blk_addr); in fsck_chk_inode_blk()
554 u32 nid, enum FILE_TYPE ftype, struct f2fs_node *node_blk, in fsck_chk_dnode_blk() argument
562 if (le32_to_cpu(node_blk->dn.addr[idx]) == 0x0) in fsck_chk_dnode_blk()
565 le32_to_cpu(node_blk->dn.addr[idx]), in fsck_chk_dnode_blk()
572 node_blk->dn.addr[idx] = 0; in fsck_chk_dnode_blk()
578 ret = dev_write_block(node_blk, ni->blk_addr); in fsck_chk_dnode_blk()
585 enum FILE_TYPE ftype, struct f2fs_node *node_blk, u32 *blk_cnt) in fsck_chk_idnode_blk() argument
591 if (le32_to_cpu(node_blk->in.nid[i]) == 0x0) in fsck_chk_idnode_blk()
594 le32_to_cpu(node_blk->in.nid[i]), in fsck_chk_idnode_blk()
605 enum FILE_TYPE ftype, struct f2fs_node *node_blk, u32 *blk_cnt) in fsck_chk_didnode_blk() argument
611 if (le32_to_cpu(node_blk->in.nid[i]) == 0x0) in fsck_chk_didnode_blk()
614 le32_to_cpu(node_blk->in.nid[i]), in fsck_chk_didnode_blk()
795 struct f2fs_node *node_blk, u32 *child_cnt, u32 *child_files) in fsck_chk_inline_dentries() argument
801 de_blk = inline_data_addr(node_blk); in fsck_chk_inline_dentries()