Jffs2 write Error

Thayne Harbaugh tharbaugh at lnxi.com
Mon Nov 17 09:35:32 EST 2003


On Sat, 2003-11-15 at 19:44, Phil Wilshire wrote:
> I have found my original problem.
> 
> The 
>    do_write_oneword 
> routine in 
>   cfi_cmdset_0002.c 
> 
> was being given values for datum wider than the 16 bits
> we are allowed to write to the device.
> The readback being limited to 16 bits, of course , failed to match
> 
> 
> The data was being given to do_write_oneword by gc.c 

Why is gc.c passing values that aren't appropriate?

> Here is the error output
> 
> Last[3] is 66, datum is 8000066 addr 3028c
> Write of 49 bytes at 0x00030264 failed. returned -5, retlen 40
> jffs2_write_dirent in garbage_collect_dirent failed: -5
> 
> As you can see 8000066 is impossible to write to a 16 bit device.

Quite obvious.

> I put an extra check on the word size in do_write_oneword and the error just went away.

What check did you put in?  What do you mean by "the error just went
away?"  That sounds like a Heisenbug (race) more than a real solution.

-- 
Thayne Harbaugh
Linux Networx
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.infradead.org/pipermail/linux-mtd/attachments/20031117/0a2419d4/attachment.bin 


More information about the linux-mtd mailing list