/linux-6.6.21/fs/f2fs/ |
D | inode.c | 279 static bool sanity_check_inode(struct inode *inode, struct page *node_page) in sanity_check_inode() argument 283 struct f2fs_inode *ri = F2FS_INODE(node_page); in sanity_check_inode() 286 iblocks = le64_to_cpu(F2FS_INODE(node_page)->i_blocks); in sanity_check_inode() 293 if (ino_of_node(node_page) != nid_of_node(node_page)) { in sanity_check_inode() 296 ino_of_node(node_page), nid_of_node(node_page)); in sanity_check_inode() 398 struct page *node_page; in do_read_inode() local 407 node_page = f2fs_get_node_page(sbi, inode->i_ino); in do_read_inode() 408 if (IS_ERR(node_page)) in do_read_inode() 409 return PTR_ERR(node_page); in do_read_inode() 411 ri = F2FS_INODE(node_page); in do_read_inode() [all …]
|
D | node.h | 239 static inline nid_t ino_of_node(struct page *node_page) in ino_of_node() argument 241 struct f2fs_node *rn = F2FS_NODE(node_page); in ino_of_node() 245 static inline nid_t nid_of_node(struct page *node_page) in nid_of_node() argument 247 struct f2fs_node *rn = F2FS_NODE(node_page); in nid_of_node() 251 static inline unsigned int ofs_of_node(struct page *node_page) in ofs_of_node() argument 253 struct f2fs_node *rn = F2FS_NODE(node_page); in ofs_of_node() 258 static inline __u64 cpver_of_node(struct page *node_page) in cpver_of_node() argument 260 struct f2fs_node *rn = F2FS_NODE(node_page); in cpver_of_node() 264 static inline block_t next_blkaddr_of_node(struct page *node_page) in next_blkaddr_of_node() argument 266 struct f2fs_node *rn = F2FS_NODE(node_page); in next_blkaddr_of_node() [all …]
|
D | recovery.c | 502 struct page *sum_page, *node_page; in check_index_in_prev_nodes() local 535 max_addrs = ADDRS_PER_PAGE(dn->node_page, dn->inode); in check_index_in_prev_nodes() 547 tdn.node_page = dn->inode_page; in check_index_in_prev_nodes() 556 node_page = f2fs_get_node_page(sbi, nid); in check_index_in_prev_nodes() 557 if (IS_ERR(node_page)) in check_index_in_prev_nodes() 558 return PTR_ERR(node_page); in check_index_in_prev_nodes() 560 offset = ofs_of_node(node_page); in check_index_in_prev_nodes() 561 ino = ino_of_node(node_page); in check_index_in_prev_nodes() 562 f2fs_put_page(node_page, 1); in check_index_in_prev_nodes() 657 f2fs_wait_on_page_writeback(dn.node_page, NODE, true, true); in do_recover_data() [all …]
|
D | gc.c | 1018 struct page *node_page; in gc_node_segment() local 1041 node_page = f2fs_get_node_page(sbi, nid); in gc_node_segment() 1042 if (IS_ERR(node_page)) in gc_node_segment() 1047 f2fs_put_page(node_page, 1); in gc_node_segment() 1052 f2fs_put_page(node_page, 1); in gc_node_segment() 1057 f2fs_put_page(node_page, 1); in gc_node_segment() 1061 err = f2fs_move_node_page(node_page, gc_type); in gc_node_segment() 1107 struct page *node_page; in is_alive() local 1115 node_page = f2fs_get_node_page(sbi, nid); in is_alive() 1116 if (IS_ERR(node_page)) in is_alive() [all …]
|
D | node.c | 850 dn->node_page = npage[level]; in f2fs_get_dnode_of_data() 863 blkaddr = data_blkaddr(dn->inode, dn->node_page, in f2fs_get_dnode_of_data() 880 dn->node_page = NULL; in f2fs_get_dnode_of_data() 911 clear_node_page_dirty(dn->node_page); in truncate_node() 914 index = dn->node_page->index; in truncate_node() 915 f2fs_put_page(dn->node_page, 1); in truncate_node() 920 dn->node_page = NULL; in truncate_node() 952 dn->node_page = page; in truncate_dnode() 1024 dn->node_page = page; in truncate_nodes() 1083 dn->node_page = pages[idx]; in truncate_partial_nodes() [all …]
|
D | file.c | 455 end_offset = ADDRS_PER_PAGE(dn.node_page, inode); in f2fs_seek_block() 569 if (IS_INODE(dn->node_page) && f2fs_has_extra_attr(dn->inode)) in f2fs_truncate_data_blocks_range() 572 raw_node = F2FS_NODE(dn->node_page); in f2fs_truncate_data_blocks_range() 602 if (dn->ofs_in_node == 0 && IS_INODE(dn->node_page)) in f2fs_truncate_data_blocks_range() 620 fofs = f2fs_start_bidx_of_node(ofs_of_node(dn->node_page), in f2fs_truncate_data_blocks_range() 707 count = ADDRS_PER_PAGE(dn.node_page, inode); in f2fs_do_truncate_blocks() 712 if (dn.ofs_in_node || IS_INODE(dn.node_page)) { in f2fs_do_truncate_blocks() 1096 end_offset = ADDRS_PER_PAGE(dn.node_page, inode); in f2fs_truncate_hole() 1191 done = min((pgoff_t)ADDRS_PER_PAGE(dn.node_page, inode) - in __read_out_blkaddrs() 1281 ADDRS_PER_PAGE(dn.node_page, dst_inode) - in __clone_blkaddrs() [all …]
|
D | compress.c | 913 block_t blkaddr = data_blkaddr(dn->inode, dn->node_page, in f2fs_sanity_check_cluster() 971 dn.node_page, dn.ofs_in_node + i); in __f2fs_cluster_blocks() 1267 if (data_blkaddr(dn.inode, dn.node_page, in f2fs_write_compressed_pages() 1298 fio.old_blkaddr = data_blkaddr(dn.inode, dn.node_page, in f2fs_write_compressed_pages() 1808 block_t first_blkaddr = data_blkaddr(dn->inode, dn->node_page, in f2fs_cluster_blocks_are_contiguous() 1812 block_t blkaddr = data_blkaddr(dn->inode, dn->node_page, in f2fs_cluster_blocks_are_contiguous()
|
D | f2fs.h | 962 struct page *node_page; /* cached direct node page */ member 978 dn->node_page = npage; in set_new_dnode() 2775 if (dn->node_page) in f2fs_put_dnode() 2776 f2fs_put_page(dn->node_page, 1); in f2fs_put_dnode() 2777 if (dn->inode_page && dn->node_page != dn->inode_page) in f2fs_put_dnode() 2779 dn->node_page = NULL; in f2fs_put_dnode() 2878 struct page *node_page, unsigned int offset) in data_blkaddr() argument 2883 bool is_inode = IS_INODE(node_page); in data_blkaddr() 2885 raw_node = F2FS_NODE(node_page); in data_blkaddr() 2901 return data_blkaddr(dn->inode, dn->node_page, dn->ofs_in_node); in f2fs_data_blkaddr() [all …]
|
D | data.c | 1184 struct f2fs_node *rn = F2FS_NODE(dn->node_page); in __set_data_blkaddr() 1188 if (IS_INODE(dn->node_page) && f2fs_has_extra_attr(dn->inode)) in __set_data_blkaddr() 1204 f2fs_wait_on_page_writeback(dn->node_page, NODE, true, true); in f2fs_set_data_blkaddr() 1206 if (set_page_dirty(dn->node_page)) in f2fs_set_data_blkaddr() 1234 f2fs_wait_on_page_writeback(dn->node_page, NODE, true, true); in f2fs_reserve_new_blocks() 1246 if (set_page_dirty(dn->node_page)) in f2fs_reserve_new_blocks() 1646 end_offset = ADDRS_PER_PAGE(dn.node_page, inode); in f2fs_map_blocks() 2306 blkaddr = from_dnode ? data_blkaddr(dn.inode, dn.node_page, in f2fs_read_multi_pages() 2340 blkaddr = from_dnode ? data_blkaddr(dn.inode, dn.node_page, in f2fs_read_multi_pages()
|
D | extent_cache.c | 880 ei.fofs = f2fs_start_bidx_of_node(ofs_of_node(dn->node_page), dn->inode) + in __update_extent_cache()
|
D | segment.c | 325 blen = min((pgoff_t)ADDRS_PER_PAGE(dn.node_page, cow_inode), in __f2fs_commit_atomic_write()
|