Lines Matching full:dn
488 block_t blkaddr, struct dnode_of_data *dn) in check_index_in_prev_nodes() argument
496 struct dnode_of_data tdn = *dn; in check_index_in_prev_nodes()
528 max_addrs = ADDRS_PER_PAGE(dn->node_page, dn->inode); in check_index_in_prev_nodes()
531 ofs_in_node, dn->inode->i_ino, nid, max_addrs); in check_index_in_prev_nodes()
536 if (dn->inode->i_ino == nid) { in check_index_in_prev_nodes()
538 if (!dn->inode_page_locked) in check_index_in_prev_nodes()
539 lock_page(dn->inode_page); in check_index_in_prev_nodes()
540 tdn.node_page = dn->inode_page; in check_index_in_prev_nodes()
543 } else if (dn->nid == nid) { in check_index_in_prev_nodes()
557 if (ino != dn->inode->i_ino) { in check_index_in_prev_nodes()
571 inode = dn->inode; in check_index_in_prev_nodes()
581 if (ino == dn->inode->i_ino && dn->inode_page_locked) in check_index_in_prev_nodes()
582 unlock_page(dn->inode_page); in check_index_in_prev_nodes()
593 if (ino != dn->inode->i_ino) in check_index_in_prev_nodes()
595 else if (dn->inode_page_locked) in check_index_in_prev_nodes()
596 lock_page(dn->inode_page); in check_index_in_prev_nodes()
602 if (dn->inode->i_ino == nid && !dn->inode_page_locked) in check_index_in_prev_nodes()
603 unlock_page(dn->inode_page); in check_index_in_prev_nodes()
607 static int f2fs_reserve_new_block_retry(struct dnode_of_data *dn) in f2fs_reserve_new_block_retry() argument
612 err = f2fs_reserve_new_block(dn); in f2fs_reserve_new_block_retry()
623 struct dnode_of_data dn; in do_recover_data() local
652 set_new_dnode(&dn, inode, NULL, NULL, 0); in do_recover_data()
654 err = f2fs_get_dnode_of_data(&dn, start, ALLOC_NODE); in do_recover_data()
663 f2fs_wait_on_page_writeback(dn.node_page, NODE, true, true); in do_recover_data()
665 err = f2fs_get_node_info(sbi, dn.nid, &ni, false); in do_recover_data()
671 if (ofs_of_node(dn.node_page) != ofs_of_node(page)) { in do_recover_data()
673 inode->i_ino, ofs_of_node(dn.node_page), in do_recover_data()
680 for (; start < end; start++, dn.ofs_in_node++) { in do_recover_data()
683 src = f2fs_data_blkaddr(&dn); in do_recover_data()
684 dest = data_blkaddr(dn.inode, page, dn.ofs_in_node); in do_recover_data()
704 f2fs_truncate_data_blocks_range(&dn, 1); in do_recover_data()
718 f2fs_truncate_data_blocks_range(&dn, 1); in do_recover_data()
720 err = f2fs_reserve_new_block_retry(&dn); in do_recover_data()
729 err = f2fs_reserve_new_block_retry(&dn); in do_recover_data()
735 err = check_index_in_prev_nodes(sbi, dest, &dn); in do_recover_data()
747 dest, inode->i_ino, dn.ofs_in_node); in do_recover_data()
753 f2fs_replace_block(sbi, &dn, src, dest, in do_recover_data()
759 copy_node_footer(dn.node_page, page); in do_recover_data()
760 fill_node_footer(dn.node_page, dn.nid, ni.ino, in do_recover_data()
762 set_page_dirty(dn.node_page); in do_recover_data()
764 f2fs_put_dnode(&dn); in do_recover_data()