]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[JFFS2] Improve diagnostic output for 'node added in wrong place' check
authorDavid Woodhouse <dwmw2@infradead.org>
Thu, 28 Jun 2007 18:03:11 +0000 (19:03 +0100)
committerDavid Woodhouse <dwmw2@infradead.org>
Thu, 28 Jun 2007 18:03:11 +0000 (19:03 +0100)
Jocke has seen this fail. We want to know why.

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

index dbc908ad622b10d89c3e6b740ec4b063fd6c60e9..9c3a3bba6dcf708c133da03924e40b99b1d6aea2 100644 (file)
@@ -423,7 +423,12 @@ struct jffs2_raw_node_ref *jffs2_add_physical_node_ref(struct jffs2_sb_info *c,
           even after refiling c->nextblock */
        if ((c->nextblock || ((ofs & 3) != REF_OBSOLETE))
            && (jeb != c->nextblock || (ofs & ~3) != jeb->offset + (c->sector_size - jeb->free_size))) {
-               printk(KERN_WARNING "argh. node added in wrong place\n");
+               printk(KERN_WARNING "argh. node added in wrong place at 0x%08x(%d)\n", ofs & ~3, ofs & 3);
+               if (c->nextblock)
+                       printk(KERN_WARNING "nextblock 0x%08x", c->nextblock->offset);
+               else
+                       printk(KERN_WARNING "No nextblock");
+               printk(", expected at %08x\n", jeb->offset + (c->sector_size - jeb->free_size));
                return ERR_PTR(-EINVAL);
        }
 #endif