Lines Matching full:dn
495 block_t blkaddr, struct dnode_of_data *dn) in check_index_in_prev_nodes() argument
503 struct dnode_of_data tdn = *dn; in check_index_in_prev_nodes()
535 max_addrs = ADDRS_PER_PAGE(dn->node_page, dn->inode); in check_index_in_prev_nodes()
538 ofs_in_node, dn->inode->i_ino, nid, max_addrs); in check_index_in_prev_nodes()
543 if (dn->inode->i_ino == nid) { in check_index_in_prev_nodes()
545 if (!dn->inode_page_locked) in check_index_in_prev_nodes()
546 lock_page(dn->inode_page); in check_index_in_prev_nodes()
547 tdn.node_page = dn->inode_page; in check_index_in_prev_nodes()
550 } else if (dn->nid == nid) { in check_index_in_prev_nodes()
564 if (ino != dn->inode->i_ino) { in check_index_in_prev_nodes()
578 inode = dn->inode; in check_index_in_prev_nodes()
588 if (ino == dn->inode->i_ino && dn->inode_page_locked) in check_index_in_prev_nodes()
589 unlock_page(dn->inode_page); in check_index_in_prev_nodes()
600 if (ino != dn->inode->i_ino) in check_index_in_prev_nodes()
602 else if (dn->inode_page_locked) in check_index_in_prev_nodes()
603 lock_page(dn->inode_page); in check_index_in_prev_nodes()
609 if (dn->inode->i_ino == nid && !dn->inode_page_locked) in check_index_in_prev_nodes()
610 unlock_page(dn->inode_page); in check_index_in_prev_nodes()
614 static int f2fs_reserve_new_block_retry(struct dnode_of_data *dn) in f2fs_reserve_new_block_retry() argument
619 err = f2fs_reserve_new_block(dn); in f2fs_reserve_new_block_retry()
630 struct dnode_of_data dn; in do_recover_data() local
659 set_new_dnode(&dn, inode, NULL, NULL, 0); in do_recover_data()
661 err = f2fs_get_dnode_of_data(&dn, start, ALLOC_NODE); in do_recover_data()
670 f2fs_wait_on_page_writeback(dn.node_page, NODE, true, true); in do_recover_data()
672 err = f2fs_get_node_info(sbi, dn.nid, &ni, false); in do_recover_data()
678 if (ofs_of_node(dn.node_page) != ofs_of_node(page)) { in do_recover_data()
680 inode->i_ino, ofs_of_node(dn.node_page), in do_recover_data()
687 for (; start < end; start++, dn.ofs_in_node++) { in do_recover_data()
690 src = f2fs_data_blkaddr(&dn); in do_recover_data()
691 dest = data_blkaddr(dn.inode, page, dn.ofs_in_node); in do_recover_data()
713 f2fs_truncate_data_blocks_range(&dn, 1); in do_recover_data()
727 f2fs_truncate_data_blocks_range(&dn, 1); in do_recover_data()
729 err = f2fs_reserve_new_block_retry(&dn); in do_recover_data()
738 err = f2fs_reserve_new_block_retry(&dn); in do_recover_data()
744 err = check_index_in_prev_nodes(sbi, dest, &dn); in do_recover_data()
756 dest, inode->i_ino, dn.ofs_in_node); in do_recover_data()
764 f2fs_replace_block(sbi, &dn, src, dest, in do_recover_data()
770 copy_node_footer(dn.node_page, page); in do_recover_data()
771 fill_node_footer(dn.node_page, dn.nid, ni.ino, in do_recover_data()
773 set_page_dirty(dn.node_page); in do_recover_data()
775 f2fs_put_dnode(&dn); in do_recover_data()