[JFFS2] Fix and improve debugging output during scan.
authorDavid Woodhouse <dwmw2@infradead.org>
Thu, 25 May 2006 00:53:09 +0000 (01:53 +0100)
committerDavid Woodhouse <dwmw2@infradead.org>
Thu, 25 May 2006 00:53:09 +0000 (01:53 +0100)
Print wasted_size in scanned eraseblocks, print range correctly for
summary dirent and inode entries.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
fs/jffs2/scan.c
fs/jffs2/summary.c

index 5bbd4a36c75efcc6f41342f1bfebe12ad0f75681..404ba6e485817e14da45c8fb193228efd1da381e 100644 (file)
@@ -881,9 +881,9 @@ scan_more:
                }
        }
 
-       D1(printk(KERN_DEBUG "Block at 0x%08x: free 0x%08x, dirty 0x%08x, unchecked 0x%08x, used 0x%08x\n", jeb->offset,
-                 jeb->free_size, jeb->dirty_size, jeb->unchecked_size, jeb->used_size));
-
+       D1(printk(KERN_DEBUG "Block at 0x%08x: free 0x%08x, dirty 0x%08x, unchecked 0x%08x, used 0x%08x, wasted 0x%08x\n",
+                 jeb->offset,jeb->free_size, jeb->dirty_size, jeb->unchecked_size, jeb->used_size, jeb->wasted_size));
+       
        /* mark_node_obsolete can add to wasted !! */
        if (jeb->wasted_size) {
                jeb->dirty_size += jeb->wasted_size;
index a60bbcea5b7f2f78896c464b65190cf7c11a8af4..523a8f330ef56f0b915595c1b53aadc20c9d34b9 100644 (file)
@@ -413,7 +413,7 @@ static int jffs2_sum_process_sum_data(struct jffs2_sb_info *c, struct jffs2_eras
 
                                dbg_summary("Inode at 0x%08x-0x%08x\n",
                                            jeb->offset + je32_to_cpu(spi->offset),
-                                           jeb->offset + je32_to_cpu(spi->offset) + je32_to_cpu(spu->totlen));
+                                           jeb->offset + je32_to_cpu(spi->offset) + je32_to_cpu(spi->totlen));
 
                                ic = jffs2_scan_make_ino_cache(c, ino);
                                if (!ic) {
@@ -435,7 +435,7 @@ static int jffs2_sum_process_sum_data(struct jffs2_sb_info *c, struct jffs2_eras
                                struct jffs2_sum_dirent_flash *spd;
                                spd = sp;
 
-                               dbg_summary("Dirent at 0x%08x\n",
+                               dbg_summary("Dirent at 0x%08x-0x%08x\n",
                                            jeb->offset + je32_to_cpu(spd->offset),
                                            jeb->offset + je32_to_cpu(spd->offset) + je32_to_cpu(spd->totlen));