Lines Matching refs:dn
444 block_t blkaddr, struct dnode_of_data *dn) in check_index_in_prev_nodes() argument
452 struct dnode_of_data tdn = *dn; in check_index_in_prev_nodes()
482 if (dn->inode->i_ino == nid) { in check_index_in_prev_nodes()
484 if (!dn->inode_page_locked) in check_index_in_prev_nodes()
485 lock_page(dn->inode_page); in check_index_in_prev_nodes()
486 tdn.node_page = dn->inode_page; in check_index_in_prev_nodes()
489 } else if (dn->nid == nid) { in check_index_in_prev_nodes()
503 if (ino != dn->inode->i_ino) { in check_index_in_prev_nodes()
517 inode = dn->inode; in check_index_in_prev_nodes()
527 if (ino == dn->inode->i_ino && dn->inode_page_locked) in check_index_in_prev_nodes()
528 unlock_page(dn->inode_page); in check_index_in_prev_nodes()
539 if (ino != dn->inode->i_ino) in check_index_in_prev_nodes()
541 else if (dn->inode_page_locked) in check_index_in_prev_nodes()
542 lock_page(dn->inode_page); in check_index_in_prev_nodes()
548 if (dn->inode->i_ino == nid && !dn->inode_page_locked) in check_index_in_prev_nodes()
549 unlock_page(dn->inode_page); in check_index_in_prev_nodes()
556 struct dnode_of_data dn; in do_recover_data() local
585 set_new_dnode(&dn, inode, NULL, NULL, 0); in do_recover_data()
587 err = f2fs_get_dnode_of_data(&dn, start, ALLOC_NODE); in do_recover_data()
596 f2fs_wait_on_page_writeback(dn.node_page, NODE, true, true); in do_recover_data()
598 err = f2fs_get_node_info(sbi, dn.nid, &ni); in do_recover_data()
604 if (ofs_of_node(dn.node_page) != ofs_of_node(page)) { in do_recover_data()
606 inode->i_ino, ofs_of_node(dn.node_page), in do_recover_data()
612 for (; start < end; start++, dn.ofs_in_node++) { in do_recover_data()
615 src = f2fs_data_blkaddr(&dn); in do_recover_data()
616 dest = data_blkaddr(dn.inode, page, dn.ofs_in_node); in do_recover_data()
636 f2fs_truncate_data_blocks_range(&dn, 1); in do_recover_data()
650 f2fs_truncate_data_blocks_range(&dn, 1); in do_recover_data()
651 f2fs_reserve_new_block(&dn); in do_recover_data()
659 err = f2fs_reserve_new_block(&dn); in do_recover_data()
662 err = f2fs_reserve_new_block(&dn); in do_recover_data()
670 err = check_index_in_prev_nodes(sbi, dest, &dn); in do_recover_data()
681 f2fs_replace_block(sbi, &dn, src, dest, in do_recover_data()
687 copy_node_footer(dn.node_page, page); in do_recover_data()
688 fill_node_footer(dn.node_page, dn.nid, ni.ino, in do_recover_data()
690 set_page_dirty(dn.node_page); in do_recover_data()
692 f2fs_put_dnode(&dn); in do_recover_data()