data loss on jffs2 filesystem on dataflash

Peter Menzebach pm-mtd at mw-itcon.de
Wed Sep 21 06:27:06 EDT 2005


Artem B. Bityutskiy wrote:
> Andrew,
> 
> Andrew Victor wrote:
> 
>> I do know that JFFS2-on-Dataflash was working fine when I committed the
>> changes in February.
> 
> Now it doesn't :-) Sure, you don't have to fix it :-) We were just 
> curious. I guess Peter should deal with this.
> 
Ok guys,
I will try, to get it to work, but at the moment I'm a little bit lost.

So here, what I saw in the data sheet, code and your answers:

Dataflash:

The dataflash has a smallest unit = dataflash page, which can be written 
and erased (528/1056 bytes)

The dataflash has blocks, which are 8 * pagesize. This units may be used 
for programming/erasing, but is not used in the driver

The dataflash has sectors, which are 256 pages (sector0+1 are special). 
These sectors are only relevant in terms of wear leveling, since each 
page of a sector must be reprogrammed at least once each 10.000 writes.

jffs2:
jffs2 nodes are 4 K
the wbuf_size should be the smallest size, which you can re-program

My assumptions now:

We have to set the jffs2->sector_size to 8 * dataflash pagesize
We have to set the jffs2->wbuf_size to dataflash pagesize (528/1056)
We have to set the mtd->erasesize to 8 * dataflash pagesize


And still I didn't get the point, why it isn't working today....

Best regards
Peter

-- 
Peter Menzebach
Menzebach und Wolff IT-Consulting GbR
Phone +49 751 355 387 1




More information about the linux-mtd mailing list