JFFS2 Corruption.

Simon Haynes simon at baydel.com
Tue Mar 9 10:33:09 EST 2004


On Monday 08 Mar 2004 3:10 pm, Simon Haynes wrote:
> On Wednesday 03 Mar 2004 3:31 pm, David Woodhouse wrote:
> > On Thu, 2004-02-26 at 11:08 +0000, Simon Haynes wrote:
> > > Beyond that I don't really know what I am looking for in the log. I can
> ofs 0x00c00400 has already been seen. Skipping
> jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00c00408:
> 0x273c instead

Since lunch interrupted our converstation yesterday I have tried a few 
things. The SMC partition I was using was 64 Mb and contained a bad block. I 
modified the kernel to make this partition 48Mb. I booted root over nfs and 
tried to rebuild root on the SMC. I can no longer mount the original SMC so I 
tried a new one which worked OK.

-bash-2.05b# /mtd/eraseall /dev/mtd1 > /dev/null
nand_erase: attempt to erase a bad block at page 0x0001ee60

/mtd/eraseall: /dev/mtd1: MTD Erase failure: Input/output error
-bash-2.05b# mount -t jffs2 /dev/ram1 /smc
Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
empty_blocks 2047, bad_blocks 0, c->nr_blocks 2048
mount: wrong fs type, bad option, bad superblock on /dev/ram1,
       or too many mounted file systems
-bash-2.05b# /mtd/eraseall /dev/mtd1 > /dev/null
-bash-2.05b# mount -t jffs2 /dev/ram1 /smc
-bash-2.05b#

After 5 reboots the new SMC gave this magic bitmask failure.

jffs2: Erase block size too small (16KiB). Using virtual blocks size (32KiB) 
instead
ofs 0x000a8400 has already been seen. Skipping, jeb 0xa8000, sector size 
0x8000
saved ofs 0x000a8000, previous 0xa7fff, buf_len 0x7c00, scanned 0x0
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a8408: 0x273c 
instead, 0x0
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a841c: 0x000b 
instead, 0x0
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a8420: 0x404d 
.
.
.

It would appear that the first buffer location does not contain 0xFFFFFFFF 
and cleanmarkerfound is set but I don't know what this means to JFFS2.

I then switched the partition back to 64Mb, set the kernel to use the read 
only block device and hacked the MAJOR number for JFFS2 to be the same as 
/dev/ram. I have rebooted the system at least 20 times and as yet I have not 
seen any errors. 

I am unsure as where to go next besides trying more reboots.

Any ideas ?


Cheers

Simon.



More information about the linux-mtd mailing list