Jffs2 write Error
Phil Wilshire
philwil at earthlink.net
Tue Nov 4 08:37:15 EST 2003
Hi Guys,
I am seeing a frequent error
on an ARM7TDMI system
uClinux version 2.4.20-uc0
Processor: Atmel AT91M40xxx revision 0
Architecture: EB01
physmap flash device: 200000 at 1600000
Found: Atmel AT49BV32XA
number of JEDEC chips: 1
Creating 3 MTD partitions on "Physically mapped flash":
0x00000000-0x00100000 : "part1"
0x00100000-0x00200000 : "part2"
0x00200000-0x00400000 : "rest"
I have added some debugging in write.c
And I get this sort of output
I am copying a large file into the flash system.
ls -l /var/ram/mytest
-rwxr-xr-x 1 0 0 500856 Jan 1 00:00 /var/ram/mtest
cp /var/ram/mytest /var/mtd0/mytest
It all looks to be working just fine...
( PSW is my debug )
PSW Write of 2491 bytes at 0x000ac3b4 attempted. returned 0, retlen 2491
PSW Write of 2514 bytes at 0x000acd70 attempted. returned 0, retlen 2514
PSW Write of 2422 bytes at 0x000ad744 attempted. returned 0, retlen 2422
PSW Write of 2550 bytes at 0x000ae0bc attempted. returned 0, retlen 2550
PSW Write of 2523 bytes at 0x000aeab4 attempted. returned 0, retlen 2523
PSW Write of 2393 bytes at 0x000af490 attempted. returned 0, retlen 2393
PSW Write of 527 bytes at 0x000afdec attempted. returned 0, retlen 527
PSW Write of 2129 bytes at 0x0009000c attempted. returned 0, retlen 2129
Then I get this error
Last[3] is 66, datum is 8000066
Write of 49 bytes at 0x00090860 failed. returned -5, retlen 40
jffs2_write_dirent in garbage_collect_dirent failed: -5
Last[3] is 66, datum is 8000066
Write of 49 bytes at 0x00090894 failed. returned -5, retlen 40
jffs2_write_dirent in garbage_collect_dirent failed: -5
which produces and IOERROR -5 = -EIO
Here is the flash usage..
/> df
Filesystem 1k-blocks Used Available Use% Mounted on
rootfs 1999 1999 0 100% /
/dev/ram0 1999 1999 0 100% /
/dev/ram1 115 8 107 7% /var
/dev/mtdblock0 1024 444 580 43% /var/mtd0
The system was eraseall'd and then mounted before this test.
The first copy of the big file went OK the error was found on the second copy to the same file.
Any clues as to what is happening here ???
regards
Phil Wilshire
--
SDCS -- System Design & Consulting Services LLC, http://www.sysdcs.com
** Embedded Linux Training ** email me for details
630 Springhouse Sq., Leesburg VA 20175 t: 703 669 9766 f: 703 669 9768
More information about the linux-mtd
mailing list