public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* JFFS2 and bad blocks
@ 2002-12-03 10:23 simon
  2002-12-03 13:03 ` Thomas Gleixner
  0 siblings, 1 reply; 4+ messages in thread
From: simon @ 2002-12-03 10:23 UTC (permalink / raw)
  To: MTD mailing list

I am using an SMC via the MTD layer. On one of the partitions I 
would like to put a JFFS2 filesystem. Normally I erase the partition 
and then mount it JFFS2. The problem is that if the partition has a 
bad block I cannot erase or mount it. Does the bad block handling 
have to be in the vendor specific nand driver ?

Cheers

Simon.
__________________________

Simon Haynes - Baydel 
Phone : 44 (0) 1372 378811
Email : simon@baydel.com
__________________________

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

* Re: JFFS2 and bad blocks
  2002-12-03 10:23 JFFS2 and bad blocks simon
@ 2002-12-03 13:03 ` Thomas Gleixner
  2003-01-06 17:04   ` simon
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Gleixner @ 2002-12-03 13:03 UTC (permalink / raw)
  To: simon, MTD mailing list

On Tuesday 03 December 2002 11:23, simon@baydel.com wrote:
> I am using an SMC via the MTD layer. On one of the partitions I
> would like to put a JFFS2 filesystem. Normally I erase the partition
> and then mount it JFFS2. The problem is that if the partition has a
> bad block I cannot erase or mount it. Does the bad block handling
> have to be in the vendor specific nand driver ?

Please use latest MTD-CVS code.
Read http://www.linux-mtd.infradead.org/tech/nand.html

-- 
Thomas
____________________________________________________
linutronix - competence in embedded & realtime linux
http://www.linutronix.de
mail: tglx@linutronix.de

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

* Re: JFFS2 and bad blocks
  2002-12-03 13:03 ` Thomas Gleixner
@ 2003-01-06 17:04   ` simon
  2003-01-06 18:59     ` Thomas Gleixner
  0 siblings, 1 reply; 4+ messages in thread
From: simon @ 2003-01-06 17:04 UTC (permalink / raw)
  To: MTD mailing list; +Cc: tglx

I download the CVS stuff mid December and again today. The 
hardware ran ok before and could use jffs2 without errors but as I 
added files it was slow and I could not make file systems on 
partitions which contained bad blocks.

The new CVS code seems to be much quicker and I can erase, 
mount and copy files to my new filesystem without error. I have set 
up the specific driver to do soft ecc. I noticed that when I reboot the 
system and the filesystem gets mounted I get errors. The more 
writes that occur the more errors I seem to get. I ran a test for a 
week or so over the break which generated log files. A reboot after 
this produced thousands of errors but the filesystem seemed ok. 

The errors are something like

Empty flash at 0x00469ffcb ends at 0x0046a000

or

jffs2_scan_dirent_node(): Node CRC failed on node at 0x0046a7f0 
read 0xffffffff calculated 0xdec8161b

I was wondering if any of you could shed any light on this.


On 3 Dec 2002, at 14:03, Thomas Gleixner wrote:

> On Tuesday 03 December 2002 11:23, simon@baydel.com wrote:
> > I am using an SMC via the MTD layer. On one of the partitions I
> > would like to put a JFFS2 filesystem. Normally I erase the partition
> > and then mount it JFFS2. The problem is that if the partition has a
> > bad block I cannot erase or mount it. Does the bad block handling
> > have to be in the vendor specific nand driver ?
> 
> Please use latest MTD-CVS code.
> Read http://www.linux-mtd.infradead.org/tech/nand.html
> 
> -- 
> Thomas
> ____________________________________________________
> linutronix - competence in embedded & realtime linux
> http://www.linutronix.de
> mail: tglx@linutronix.de


__________________________

Simon Haynes - Baydel 
Phone : 44 (0) 1372 378811
Email : simon@baydel.com
__________________________

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

* Re: JFFS2 and bad blocks
  2003-01-06 17:04   ` simon
@ 2003-01-06 18:59     ` Thomas Gleixner
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Gleixner @ 2003-01-06 18:59 UTC (permalink / raw)
  To: simon, MTD mailing list

On Monday 06 January 2003 18:04, simon@baydel.com wrote:
> I download the CVS stuff mid December and again today. The
> hardware ran ok before and could use jffs2 without errors but as I
> added files it was slow and I could not make file systems on
> partitions which contained bad blocks.
>
> The new CVS code seems to be much quicker and I can erase,
> mount and copy files to my new filesystem without error. I have set
> up the specific driver to do soft ecc. I noticed that when I reboot the
> system and the filesystem gets mounted I get errors. The more
> writes that occur the more errors I seem to get. I ran a test for a
> week or so over the break which generated log files. A reboot after
> this produced thousands of errors but the filesystem seemed ok.
>
> The errors are something like
>
> Empty flash at 0x00469ffcb ends at 0x0046a000
This happens due to NAND specific timed buffer flushing. JFFS2 fills up the 
write buffer to a full page boundary with 0xff and writes out the buffer to 
the chip, if you have no consecutive write within 2 seconds. This is done to 
ensure, that data is written to FLASH. This fill looks like empty FLASH on 
mount. So JFFS2 is wondering why there is data after the "empty" FLASH.
No reason to worry.

> or
>
> jffs2_scan_dirent_node(): Node CRC failed on node at 0x0046a7f0
> read 0xffffffff calculated 0xdec8161b
This happens, if the write buffer is not written to FLASH before you power 
down your system without umount. Then the write buffer is lost and you get 
this error on mount. This indicates, that you may have lost data.

> I was wondering if any of you could shed any light on this.

-- 
Thomas
________________________________________________________________________
linutronix - competence in embedded & realtime linux
http://www.linutronix.de
mail: tglx@linutronix.de

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

end of thread, other threads:[~2003-01-06 18:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-03 10:23 JFFS2 and bad blocks simon
2002-12-03 13:03 ` Thomas Gleixner
2003-01-06 17:04   ` simon
2003-01-06 18:59     ` Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox