f2fs-tools: cleanup debug statement
authorChangman Lee <cm224.lee@samsung.com>
Tue, 30 Jul 2013 07:39:04 +0000 (16:39 +0900)
committerJaegeuk Kim <jaegeuk.kim@samsung.com>
Tue, 30 Jul 2013 08:06:44 +0000 (17:06 +0900)
The debug message is too verbose therefore decrease message.

Signed-off-by: Changman Lee <cm224.lee@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
fsck/dump.c
fsck/mount.c

index 4c113dd..1b19bbc 100644 (file)
@@ -170,7 +170,7 @@ read_node_blk:
        ino = le32_to_cpu(node_blk->footer.ino);
        nid = le32_to_cpu(node_blk->footer.nid);
        if (ino == nid) {
-               print_inode_info(&node_blk->i);
+               print_node_info(node_blk);
        } else {
                ret = get_node_info(sbi, ino, &ni);
                goto read_node_blk;
index 13a3ef1..d936600 100644 (file)
@@ -88,6 +88,10 @@ void print_node_info(struct f2fs_node *node_block)
 void print_raw_sb_info(struct f2fs_sb_info *sbi)
 {
        struct f2fs_super_block *sb = F2FS_RAW_SUPER(sbi);
+
+       if (!config.dbg_lv)
+               return;
+
        printf("\n");
        printf("+--------------------------------------------------------+\n");
        printf("| Super block                                            |\n");
@@ -132,6 +136,9 @@ void print_ckpt_info(struct f2fs_sb_info *sbi)
 {
        struct f2fs_checkpoint *cp = F2FS_CKPT(sbi);
 
+       if (!config.dbg_lv)
+               return;
+
        printf("\n");
        printf("+--------------------------------------------------------+\n");
        printf("| Checkpoint                                             |\n");
@@ -938,7 +945,8 @@ int build_sit_area_bitmap(struct f2fs_sb_info *sbi)
        fsck->chk.sit_valid_blocks = sum_vblocks;
        fsck->chk.sit_free_segs = free_segs;
 
-       DBG(0, "Blocks [0x%x] Free Segs [0x%x]\n\n", sum_vblocks, free_segs);
+       DBG(1, "Blocks [0x%x : %d] Free Segs [0x%x : %d]\n\n", sum_vblocks, sum_vblocks,
+                       free_segs, free_segs);
        return 0;
 }
 
@@ -1031,7 +1039,7 @@ void build_nat_area_bitmap(struct f2fs_sb_info *sbi)
        }
        free(nat_block);
 
-       DBG(0, "valid nat entries (block_addr != 0x0) [0x%8x : %u]\n",
+       DBG(1, "valid nat entries (block_addr != 0x0) [0x%8x : %u]\n",
                        fsck->chk.valid_nat_entry_cnt, fsck->chk.valid_nat_entry_cnt);
 
 }