EBH with OneNAND doesn't work

Jarkko Lavinen jarkko.lavinen at nokia.com
Fri Dec 16 07:23:31 EST 2005


I am trying to use JFFS2 (JFFS2 from cvs -D 'Nov 12, 2005' with the
mtd driver part from CVS head) on OneNAND simulator and real OneNAND
device.

I erased the test partition with "flash_eraseall /dev/mtd0". I mount the 
partition and no other fs operation is done.  When I just unmount and mount 
again, I get

  # mount -t jffs2 /dev/mtdblock0 /mnt
  ...
  Dec 16 12:35:11 slayer kernel: jffs2_scan_eraseblock(): Scanning block at 0x0
  Dec 16 12:35:11 slayer kernel: JFFS2: Erase block at 0x00000000 is not formatted. It will be erased
  Dec 16 12:35:11 slayer kernel: jffs2_scan_eraseblock(): Scanning block at 0x10000
  Dec 16 12:35:11 slayer kernel: JFFS2: Erase block at 0x00010000 is not formatted. It will be erased
  ...
  Dec 16 12:35:11 slayer kernel: Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
  Dec 16 12:35:11 slayer kernel: empty_blocks 0, bad_blocks 0, c->nr_blocks 256
  Dec 16 12:35:11 slayer kernel: c->used_size: 0
  Dec 16 12:35:11 slayer kernel: c->nr_free_blocks 0
  Dec 16 12:35:11 slayer kernel: (c->nr_free_blocks+empty_blocks+bad_blocks): 0
  Dec 16 12:35:11 slayer kernel: [JFFS2 DBG] (3779) jffs2_do_mount_fs: build_fs failed


JFFS2 is complaining about many pages being unformatted. It shouldn't
do this, since the pages should be properly formatted after the first
mount within a second when using a fast machine. At least on Nandsim and 
Ramtd they are.

Also, no pages are used so pages shold be either free or empty but the
number of free or empty pages is zero. This triggers the Cowardly
message,

I am seeing the same problem on both real OneNAND and OneNand
simulator.  On Nandsim or Ramtd everything seems to work ok.

The problem might be related to the free OOB bytes being scattered in 
OneNand. The first free OOB region start at offset 2 and with length 3 
bytes with autoplacement.

Regards
Jarkko Lavinen




More information about the linux-mtd mailing list