help request, jffs2 fs files get lost

angelo angelo70 at gmail.com
Mon May 2 05:16:42 EDT 2011


On 02/05/2011 10:58, Ricard Wanderlof wrote:
>
> On Mon, 2 May 2011, angelo wrote:
>
>> If this is in fact what you're doing, you're overwriting your 
>> jffs2.img file with the all-ff's contents of the newly erased 
>> /dev/mtd2. Swap the two arguments instead.
>>
>> sorry, was just a bad had-written text,
>> i generally do "cp jffs2.img /dev/mtd2", and after mounting mtdblock2 
>> i see correctly the root tree.
>>
>> I did some other tests:
>> if i mount the new created jffs2 and unmount it, nothing is lost.
>> If i mount it, open a file, append some text, close it and unmount, 
>> then at the next mount everything is disapperaed (checking mtd2, all 
>> is set to 0xff).
>>
>> Saving modified files i notice a warning:
>> Writing files is also notice some MTD debug trace, maybe an error:
>> Node totlen on flash (0xffffffff) != totlen from node ref (0x00000074)
>
> Out of curiosity, what exactly is the type of flash you are using?
>
> /Ricard

Hi Ricard,

thanks again for help

the flash chip is an SST 39VF2301B, word programmable, tot 4MB, 4KB 
sector size, 64K block size, it is very similar to an AMD 16bit data bus 
width flash.

It seems to be correctly detected from jedec probe, but through CFI 
queries probably

...
physmap platform flash device: 00400000 at ffc00000
physmap-flash: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer 
ID 0x0000bf Chip ID 0x00235d
number of CFI chips: 1
...

/proc # cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00010000 00001000 "Colilo (64K)"
mtd1: 002f0000 00001000 "Kernel+ROMfs (3008K)"
mtd2: 00100000 00001000 "JFFS2 (1024K)"
mtd3: 0009d000 00001000 "ROMfs"

This is a suspected sequence of MTD commands i find in dmesg:

...
MTD_ioctl
MTD_ioctl
MTD_ioctl
MTD_ioctl
MTD_ioctl
MTD_ioctl
MTD_close
MTD_open
MTD_write
MTD_close
Node totlen on flash (0xffffffff) != totlen from node ref (0x00000074)
MTD_open <-- jffs2 fs disapperaed from here
MTD_read
MTD_read
...

many thanks,
angelo

















More information about the linux-mtd mailing list