Lines Matching refs:blk_addr
145 u32 blk_addr) in is_valid_ssa_node_blk() argument
158 segno = GET_SEGNO(sbi, blk_addr); in is_valid_ssa_node_blk()
159 offset = OFFSET_IN_SEG(sbi, blk_addr); in is_valid_ssa_node_blk()
187 DBG(0, "target blk_addr [0x%x]\n", blk_addr); in is_valid_ssa_node_blk()
190 GET_SEGNO(sbi, blk_addr))); in is_valid_ssa_node_blk()
192 GET_SEGNO(sbi, blk_addr), in is_valid_ssa_node_blk()
193 OFFSET_IN_SEG(sbi, blk_addr)); in is_valid_ssa_node_blk()
201 segno, nid, blk_addr); in is_valid_ssa_node_blk()
222 u32 blk_addr) in is_valid_summary() argument
239 if (!IS_VALID_BLK_ADDR(sbi, ni.blk_addr)) in is_valid_summary()
243 ret = dev_read_block(node_blk, ni.blk_addr); in is_valid_summary()
262 if (blk_addr == le32_to_cpu(target_blk_addr)) in is_valid_summary()
269 static int is_valid_ssa_data_blk(struct f2fs_sb_info *sbi, u32 blk_addr, in is_valid_ssa_data_blk() argument
283 segno = GET_SEGNO(sbi, blk_addr); in is_valid_ssa_data_blk()
284 offset = OFFSET_IN_SEG(sbi, blk_addr); in is_valid_ssa_data_blk()
325 DBG(0, "Target data block addr [0x%x]\n", blk_addr); in is_valid_ssa_data_blk()
328 } else if (is_valid_summary(sbi, sum_entry, blk_addr)) { in is_valid_ssa_data_blk()
408 if (ni->blk_addr == NEW_ADDR) { in sanity_check_nid()
413 if (!IS_VALID_BLK_ADDR(sbi, ni->blk_addr)) { in sanity_check_nid()
414 ASSERT_MSG("blkaddress is not valid. [0x%x]", ni->blk_addr); in sanity_check_nid()
418 ret = dev_read_block(node_blk, ni->blk_addr); in sanity_check_nid()
443 nid, ni->blk_addr, in sanity_check_nid()
461 if (f2fs_test_main_bitmap(sbi, ni->blk_addr) != 0) { in sanity_check_nid()
463 nid, ni->blk_addr); in sanity_check_nid()
486 if (is_valid_ssa_node_blk(sbi, nid, ni->blk_addr)) { in sanity_check_nid()
491 if (f2fs_test_sit_bitmap(sbi, ni->blk_addr) == 0) in sanity_check_nid()
493 ni->blk_addr); in sanity_check_nid()
495 if (f2fs_test_main_bitmap(sbi, ni->blk_addr) == 0) { in sanity_check_nid()
546 f2fs_set_main_bitmap(sbi, ni.blk_addr, CURSEG_COLD_NODE); in fsck_chk_xattr_blk()
576 f2fs_set_main_bitmap(sbi, ni.blk_addr, in fsck_chk_node_blk()
582 f2fs_set_main_bitmap(sbi, ni.blk_addr, in fsck_chk_node_blk()
588 f2fs_set_main_bitmap(sbi, ni.blk_addr, in fsck_chk_node_blk()
608 ext->blk = le32_to_cpu(i_ext->blk_addr); in get_extent_info()
671 if (IS_VALID_BLK_ADDR(sbi, ni.blk_addr)) in fsck_reada_node_block()
672 dev_reada_block(ni.blk_addr); in fsck_reada_node_block()
736 if (f2fs_test_main_bitmap(sbi, ni->blk_addr) == 0) in fsck_chk_inode_blk()
740 f2fs_set_main_bitmap(sbi, ni->blk_addr, CURSEG_HOT_NODE); in fsck_chk_inode_blk()
744 if (f2fs_test_main_bitmap(sbi, ni->blk_addr) == 0) { in fsck_chk_inode_blk()
745 f2fs_set_main_bitmap(sbi, ni->blk_addr, in fsck_chk_inode_blk()
1191 ret = dev_write_block(node_blk, ni->blk_addr); in fsck_chk_inode_blk()
1255 ret = dev_write_block(node_blk, ni->blk_addr); in fsck_chk_dnode_blk()
1297 ret = dev_write_block(node_blk, ni.blk_addr); in fsck_chk_idnode_blk()
1340 ret = dev_write_block(node_blk, ni.blk_addr); in fsck_chk_didnode_blk()
1602 if (IS_VALID_BLK_ADDR(sbi, ni.blk_addr)) { in __chk_dentries()
1603 dev_reada_block(ni.blk_addr); in __chk_dentries()
1796 int fsck_chk_dentry_blk(struct f2fs_sb_info *sbi, int casefolded, u32 blk_addr, in fsck_chk_dentry_blk() argument
1808 ret = dev_read_block(de_blk, blk_addr); in fsck_chk_dentry_blk()
1825 ret = dev_write_block(de_blk, blk_addr); in fsck_chk_dentry_blk()
1828 fsck->dentry_depth, blk_addr); in fsck_chk_dentry_blk()
1832 fsck->dentry_depth, blk_addr, dentries, in fsck_chk_dentry_blk()
1845 u32 blk_addr, struct child_info *child, int last_blk, in fsck_chk_data_blk() argument
1852 if (blk_addr == NEW_ADDR) { in fsck_chk_data_blk()
1857 if (!IS_VALID_BLK_ADDR(sbi, blk_addr)) { in fsck_chk_data_blk()
1858 ASSERT_MSG("blkaddress is not valid. [0x%x]", blk_addr); in fsck_chk_data_blk()
1862 if (is_valid_ssa_data_blk(sbi, blk_addr, parent_nid, in fsck_chk_data_blk()
1869 if (f2fs_test_sit_bitmap(sbi, blk_addr) == 0) in fsck_chk_data_blk()
1870 ASSERT_MSG("SIT bitmap is 0x0. blk_addr[0x%x]", blk_addr); in fsck_chk_data_blk()
1872 if (f2fs_test_main_bitmap(sbi, blk_addr) != 0) in fsck_chk_data_blk()
1874 blk_addr, parent_nid, idx_in_node); in fsck_chk_data_blk()
1879 f2fs_set_main_bitmap(sbi, blk_addr, CURSEG_HOT_DATA); in fsck_chk_data_blk()
1880 return fsck_chk_dentry_blk(sbi, casefolded, blk_addr, child, in fsck_chk_data_blk()
1883 f2fs_set_main_bitmap(sbi, blk_addr, CURSEG_WARM_DATA); in fsck_chk_data_blk()
1929 !IS_VALID_BLK_ADDR(sbi, ni.blk_addr)) { in fsck_chk_orphan_node()
1987 !IS_VALID_BLK_ADDR(sbi, ni.blk_addr)) in fsck_chk_quota_node()
2242 ret = dev_write_block(node_blk, ni.blk_addr); in fix_hard_links()
2634 err = dev_read_block(node, ni.blk_addr); in fsck_get_lpf()
2641 err = dev_read_block(node, ni.blk_addr); in fsck_get_lpf()
2644 lpf_ino, ni.blk_addr); in fsck_get_lpf()
2671 err = dev_read_block(node, ni.blk_addr); in fsck_get_lpf()
2674 de.ino, ni.blk_addr); in fsck_get_lpf()
2707 ino, ftype, ni.blk_addr, 0); in fsck_do_reconnect_file()
2718 ret = dev_write_block(fnode, ni.blk_addr); in fsck_do_reconnect_file()
2738 err = dev_read_block(node, ni.blk_addr); in fsck_failed_reconnect_file_dnode()
2743 f2fs_clear_main_bitmap(sbi, ni.blk_addr); in fsck_failed_reconnect_file_dnode()
2771 err = dev_read_block(node, ni.blk_addr); in fsck_failed_reconnect_file_idnode()
2776 f2fs_clear_main_bitmap(sbi, ni.blk_addr); in fsck_failed_reconnect_file_idnode()
2801 err = dev_read_block(node, ni.blk_addr); in fsck_failed_reconnect_file_didnode()
2806 f2fs_clear_main_bitmap(sbi, ni.blk_addr); in fsck_failed_reconnect_file_didnode()
2835 err = dev_read_block(node, ni.blk_addr); in fsck_failed_reconnect_file()
2842 f2fs_clear_main_bitmap(sbi, ni.blk_addr); in fsck_failed_reconnect_file()
2850 f2fs_clear_main_bitmap(sbi, ni.blk_addr); in fsck_failed_reconnect_file()
2925 err = dev_read_block(node, ni.blk_addr); in fsck_reconnect_file()
2966 err = dev_read_block(node, ni.blk_addr); in fsck_reconnect_file()
3214 i, ni.blk_addr); in fsck_verify()