Lines Matching refs:node_blk
1910 struct f2fs_node *node_blk; in restore_node_summary() local
1916 node_blk = malloc(F2FS_BLKSIZE); in restore_node_summary()
1917 ASSERT(node_blk); in restore_node_summary()
1924 ret = dev_read_block(node_blk, addr); in restore_node_summary()
1926 sum_entry->nid = node_blk->footer.nid; in restore_node_summary()
1929 free(node_blk); in restore_node_summary()
2290 struct f2fs_node *node_blk = NULL; in update_data_blkaddr() local
2295 node_blk = (struct f2fs_node *)calloc(BLOCK_SZ, 1); in update_data_blkaddr()
2296 ASSERT(node_blk); in update_data_blkaddr()
2301 ret = dev_read_block(node_blk, ni.blk_addr); in update_data_blkaddr()
2305 if (node_blk->footer.nid == node_blk->footer.ino) { in update_data_blkaddr()
2306 int ofs = get_extra_isize(node_blk); in update_data_blkaddr()
2308 oldaddr = le32_to_cpu(node_blk->i.i_addr[ofs + ofs_in_node]); in update_data_blkaddr()
2309 node_blk->i.i_addr[ofs + ofs_in_node] = cpu_to_le32(newaddr); in update_data_blkaddr()
2310 ret = write_inode(node_blk, ni.blk_addr); in update_data_blkaddr()
2313 oldaddr = le32_to_cpu(node_blk->dn.addr[ofs_in_node]); in update_data_blkaddr()
2314 node_blk->dn.addr[ofs_in_node] = cpu_to_le32(newaddr); in update_data_blkaddr()
2315 ret = dev_write_block(node_blk, ni.blk_addr); in update_data_blkaddr()
2320 if (node_blk->footer.nid != node_blk->footer.ino) { in update_data_blkaddr()
2321 get_node_info(sbi, le32_to_cpu(node_blk->footer.ino), &ni); in update_data_blkaddr()
2324 ret = dev_read_block(node_blk, ni.blk_addr); in update_data_blkaddr()
2328 startaddr = le32_to_cpu(node_blk->i.i_ext.blk_addr); in update_data_blkaddr()
2329 endaddr = startaddr + le32_to_cpu(node_blk->i.i_ext.len); in update_data_blkaddr()
2331 node_blk->i.i_ext.len = 0; in update_data_blkaddr()
2334 ASSERT(write_inode(node_blk, ni.blk_addr) >= 0); in update_data_blkaddr()
2336 free(node_blk); in update_data_blkaddr()
3375 struct f2fs_node *node_blk; in find_fsync_inode() local
3386 node_blk = calloc(F2FS_BLKSIZE, 1); in find_fsync_inode()
3387 ASSERT(node_blk); in find_fsync_inode()
3395 err = dev_read_block(node_blk, blkaddr); in find_fsync_inode()
3399 if (!is_recoverable_dnode(sbi, node_blk)) in find_fsync_inode()
3402 if (!is_fsync_dnode(node_blk)) in find_fsync_inode()
3405 entry = get_fsync_inode(head, ino_of_node(node_blk)); in find_fsync_inode()
3407 entry = add_fsync_inode(head, ino_of_node(node_blk)); in find_fsync_inode()
3415 if (IS_INODE(node_blk) && is_dent_dnode(node_blk)) in find_fsync_inode()
3420 blkaddr == next_blkaddr_of_node(node_blk)) { in find_fsync_inode()
3423 next_blkaddr_of_node(node_blk)); in find_fsync_inode()
3428 blkaddr = next_blkaddr_of_node(node_blk); in find_fsync_inode()
3431 free(node_blk); in find_fsync_inode()
3436 struct f2fs_node *node_blk, in do_record_fsync_data() argument
3465 ino_of_node(node_blk), ofs_of_node(node_blk), blkaddr); in do_record_fsync_data()
3468 if (IS_INODE(node_blk) && (node_blk->i.i_inline & F2FS_INLINE_DATA)) in do_record_fsync_data()
3471 if (ofs_of_node(node_blk) == XATTR_NODE_OFFSET) in do_record_fsync_data()
3475 start = start_bidx_of_node(ofs_of_node(node_blk), node_blk); in do_record_fsync_data()
3476 end = start + ADDRS_PER_PAGE(sbi, node_blk, NULL); in do_record_fsync_data()
3479 blkaddr = datablock_addr(node_blk, ofs_in_node); in do_record_fsync_data()
3505 ino_of_node(node_blk), ofs_of_node(node_blk), blkaddr); in do_record_fsync_data()
3511 ino_of_node(node_blk), ofs_of_node(node_blk), in do_record_fsync_data()
3520 struct f2fs_node *node_blk; in traverse_dnodes() local
3528 node_blk = calloc(F2FS_BLKSIZE, 1); in traverse_dnodes()
3529 ASSERT(node_blk); in traverse_dnodes()
3537 err = dev_read_block(node_blk, blkaddr); in traverse_dnodes()
3541 if (!is_recoverable_dnode(sbi, node_blk)) in traverse_dnodes()
3545 ino_of_node(node_blk)); in traverse_dnodes()
3549 err = do_record_fsync_data(sbi, node_blk, blkaddr); in traverse_dnodes()
3556 blkaddr = next_blkaddr_of_node(node_blk); in traverse_dnodes()
3559 free(node_blk); in traverse_dnodes()