Lines Matching refs:sbi
34 void nat_dump(struct f2fs_sb_info *sbi, nid_t start_nat, nid_t end_nat) in nat_dump() argument
54 if(nid == 0 || nid == F2FS_NODE_INO(sbi) || in nat_dump()
55 nid == F2FS_META_INO(sbi)) in nat_dump()
59 block_addr = current_nat_addr(sbi, nid, &pack); in nat_dump()
61 if (lookup_nat_in_journal(sbi, nid, &raw_nat) >= 0) { in nat_dump()
106 void sit_dump(struct f2fs_sb_info *sbi, unsigned int start_sit, in sit_dump() argument
110 struct sit_info *sit_i = SIT_I(sbi); in sit_dump()
128 se = get_seg_entry(sbi, segno); in sit_dump()
166 SM_I(sbi)->main_segments - free_segs, in sit_dump()
174 void ssa_dump(struct f2fs_sb_info *sbi, int start_ssa, int end_ssa) in ssa_dump() argument
186 sbi->sm_info->main_blkaddr); in ssa_dump()
191 sum_blk = get_sum_block(sbi, segno, &type); in ssa_dump()
230 static void dump_data_blk(struct f2fs_sb_info *sbi, __u64 offset, u32 blkaddr) in dump_data_blk() argument
238 if (blkaddr == NEW_ADDR || !IS_VALID_BLK_ADDR(sbi, blkaddr)) { in dump_data_blk()
250 static void dump_node_blk(struct f2fs_sb_info *sbi, int ntype, in dump_node_blk() argument
277 get_node_info(sbi, nid, &ni); in dump_node_blk()
287 dump_data_blk(sbi, *ofs * F2FS_BLKSIZE, in dump_node_blk()
291 dump_node_blk(sbi, TYPE_DIRECT_NODE, in dump_node_blk()
295 dump_node_blk(sbi, TYPE_INDIRECT_NODE, in dump_node_blk()
304 static void dump_xattr(struct f2fs_sb_info *sbi, struct f2fs_node *node_blk) in dump_xattr() argument
311 xattr = read_all_xattrs(sbi, node_blk); in dump_xattr()
364 static void dump_xattr(struct f2fs_sb_info *UNUSED(sbi), in dump_xattr() argument
371 static void dump_inode_blk(struct f2fs_sb_info *sbi, u32 nid, in dump_inode_blk() argument
387 dump_data_blk(sbi, ofs * F2FS_BLKSIZE, le32_to_cpu( in dump_inode_blk()
393 dump_node_blk(sbi, TYPE_DIRECT_NODE, in dump_inode_blk()
396 dump_node_blk(sbi, TYPE_INDIRECT_NODE, in dump_inode_blk()
399 dump_node_blk(sbi, TYPE_DOUBLE_INDIRECT_NODE, in dump_inode_blk()
405 dump_xattr(sbi, node_blk); in dump_inode_blk()
408 static void dump_file(struct f2fs_sb_info *sbi, struct node_info *ni, in dump_file() argument
450 dump_inode_blk(sbi, ni->ino, node_blk); in dump_file()
460 static bool is_sit_bitmap_set(struct f2fs_sb_info *sbi, u32 blk_addr) in is_sit_bitmap_set() argument
465 se = get_seg_entry(sbi, GET_SEGNO(sbi, blk_addr)); in is_sit_bitmap_set()
466 offset = OFFSET_IN_SEG(sbi, blk_addr); in is_sit_bitmap_set()
472 void dump_node(struct f2fs_sb_info *sbi, nid_t nid, int force) in dump_node() argument
477 get_node_info(sbi, nid, &ni); in dump_node()
491 else if (!is_sit_bitmap_set(sbi, ni.blk_addr)) in dump_node()
499 print_node_info(sbi, node_blk, force); in dump_node()
502 dump_file(sbi, &ni, node_blk, force); in dump_node()
504 print_node_info(sbi, node_blk, force); in dump_node()
511 static void dump_node_from_blkaddr(struct f2fs_sb_info *sbi, u32 blk_addr) in dump_node_from_blkaddr() argument
523 print_node_info(sbi, node_blk, 0); in dump_node_from_blkaddr()
525 print_inode_info(sbi, node_blk, 1); in dump_node_from_blkaddr()
674 int dump_info_from_blkaddr(struct f2fs_sb_info *sbi, u32 blk_addr) in dump_info_from_blkaddr() argument
685 if (blk_addr < SM_I(sbi)->seg0_blkaddr) { in dump_info_from_blkaddr()
688 } else if (blk_addr < SIT_I(sbi)->sit_base_addr) { in dump_info_from_blkaddr()
691 } else if (blk_addr < NM_I(sbi)->nat_blkaddr) { in dump_info_from_blkaddr()
694 } else if (blk_addr < SM_I(sbi)->ssa_blkaddr) { in dump_info_from_blkaddr()
697 } else if (blk_addr < SM_I(sbi)->main_blkaddr) { in dump_info_from_blkaddr()
700 } else if (blk_addr > __end_block_addr(sbi)) { in dump_info_from_blkaddr()
707 SM_I(sbi)->main_blkaddr, in dump_info_from_blkaddr()
708 __end_block_addr(sbi)); in dump_info_from_blkaddr()
712 if (!is_sit_bitmap_set(sbi, blk_addr)) in dump_info_from_blkaddr()
715 type = get_sum_entry(sbi, blk_addr, &sum_entry); in dump_info_from_blkaddr()
718 get_node_info(sbi, nid, &ni); in dump_info_from_blkaddr()
722 DBG(1, " - Segno [0x%x]\n", GET_SEGNO(sbi, blk_addr)); in dump_info_from_blkaddr()
723 DBG(1, " - Offset [0x%x]\n", OFFSET_IN_SEG(sbi, blk_addr)); in dump_info_from_blkaddr()
733 get_node_info(sbi, ni.ino, &ino_ni); in dump_info_from_blkaddr()
744 dump_node_from_blkaddr(sbi, ino_ni.blk_addr); in dump_info_from_blkaddr()
752 dump_node_from_blkaddr(sbi, ino_ni.blk_addr); in dump_info_from_blkaddr()
763 dump_node_from_blkaddr(sbi, ino_ni.blk_addr); in dump_info_from_blkaddr()
772 dump_node_from_blkaddr(sbi, ino_ni.blk_addr); in dump_info_from_blkaddr()