linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* jffs2 console printk storm
@ 2008-02-14 22:16 Erez Zadok
  2008-02-16 13:52 ` David Woodhouse
  0 siblings, 1 reply; 2+ messages in thread
From: Erez Zadok @ 2008-02-14 22:16 UTC (permalink / raw)
  To: dwmw2, linux-mtd; +Cc: linux-fsdevel

Hi David,

This has been a problem I've seen for a while.  I've generated a jffs2 image
of an empty directory (I don't recall the version of the jffs2 utils I've
used to generate it).  I mount the jffs2 image something like this:

# cp jffs2-empty.img /tmp/fs.0
# losetup /dev/loop0 /tmp/fs.0
# modprobe block2mtd block2mtd=/dev/loop0,128ki
# mount -t jffs2 mtd0 /n/lower/b0

Then I start running my tests in it (in /n/lower/b0).  I get a lot of these
two kinds of console printk messages (esp. the first one):

  CLEANMARKER node found at 0x00810000, not first node in block (0x00800000)
  Empty flash at 0x0080ff70 ends at 0x00810000

I don't know how serious the messages are, but jffs2 seems to work fine for
me even with those many kernel messages scrolling off of my screen.  I could
not find a way to turn off these warnings: jffs2's debugging config options
allow me to turn on more messages, but not to turn off these.

Is there a way to prevent these messages from showing up?  Are they serious?
Is my jffs2 image bad/corrupt?  If so, how should I fix it?

In the mean time, I've been using the small patch below to turn the above
two messages into jffs2 debugging messages.

Thanks,
Erez.


diff --git a/fs/jffs2/scan.c b/fs/jffs2/scan.c
index 272872d..16f428c 100644
--- a/fs/jffs2/scan.c
+++ b/fs/jffs2/scan.c
@@ -646,8 +646,8 @@ scan_more:
 			inbuf_ofs = ofs - buf_ofs;
 			while (inbuf_ofs < scan_end) {
 				if (unlikely(*(uint32_t *)(&buf[inbuf_ofs]) != 0xffffffff)) {
-					printk(KERN_WARNING "Empty flash at 0x%08x ends at 0x%08x\n",
-					       empty_start, ofs);
+					D1(printk(KERN_WARNING "Empty flash at 0x%08x ends at 0x%08x\n",
+						  empty_start, ofs));
 					if ((err = jffs2_scan_dirty_space(c, jeb, ofs-empty_start)))
 						return err;
 					goto scan_more;
@@ -840,7 +840,7 @@ scan_more:
 					return err;
 				ofs += PAD(sizeof(struct jffs2_unknown_node));
 			} else if (jeb->first_node) {
-				printk(KERN_NOTICE "CLEANMARKER node found at 0x%08x, not first node in block (0x%08x)\n", ofs, jeb->offset);
+				D1(printk(KERN_NOTICE "CLEANMARKER node found at 0x%08x, not first node in block (0x%08x)\n", ofs, jeb->offset));
 				if ((err = jffs2_scan_dirty_space(c, jeb, PAD(sizeof(struct jffs2_unknown_node)))))
 					return err;
 				ofs += PAD(sizeof(struct jffs2_unknown_node));

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: jffs2 console printk storm
  2008-02-14 22:16 jffs2 console printk storm Erez Zadok
@ 2008-02-16 13:52 ` David Woodhouse
  0 siblings, 0 replies; 2+ messages in thread
From: David Woodhouse @ 2008-02-16 13:52 UTC (permalink / raw)
  To: Erez Zadok; +Cc: linux-mtd, linux-fsdevel


On Thu, 2008-02-14 at 17:16 -0500, Erez Zadok wrote:
> Hi David,
> 
> This has been a problem I've seen for a while.  I've generated a jffs2 image
> of an empty directory (I don't recall the version of the jffs2 utils I've
> used to generate it).  I mount the jffs2 image something like this:
> 
> # cp jffs2-empty.img /tmp/fs.0
> # losetup /dev/loop0 /tmp/fs.0
> # modprobe block2mtd block2mtd=/dev/loop0,128ki
> # mount -t jffs2 mtd0 /n/lower/b0
> 
> Then I start running my tests in it (in /n/lower/b0).  I get a lot of these
> two kinds of console printk messages (esp. the first one):
> 
>   CLEANMARKER node found at 0x00810000, not first node in block (0x00800000)
>   Empty flash at 0x0080ff70 ends at 0x00810000
> 
> I don't know how serious the messages are, but jffs2 seems to work fine for
> me even with those many kernel messages scrolling off of my screen.

Your image is built with the wrong eraseblock size -- mkfs.jffs2
defaults to 64KiB eraseblocks, and you seem to have used that default,
but your flash "device" has 128KiB eraseblocks, since that's the
argument you gave to block2mtd.

Recreate your image with -e128KiB, or change the eraseblock size on your
virtual device.

-- 
dwmw2


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-02-16 13:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-14 22:16 jffs2 console printk storm Erez Zadok
2008-02-16 13:52 ` David Woodhouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).