data loss on jffs2 filesystem on dataflash

Peter Menzebach pm at mw-itcon.de
Thu Sep 22 06:38:49 EDT 2005


Peter Menzebach wrote:
> Artem B. Bityutskiy wrote:
> 
>> On Wed, 2005-09-21 at 18:10 +0200, Peter Menzebach wrote:
>>
>>> Artem B. Bityutskiy wrote:
>>>
>>>> But.. Argh! Look at line 488: if (pad && !jffs2_dataflash(c))
>>>>
>>>> Why !jffs2_dataflash(c)??? I bet this is the bug.
>>>>
>>>
>>> Nope, it's OK there, only when padding.
>>
>>
>> OK, its late here and my head is working only on 2%. But anyway, today I
>> insist this is a bug. :-)
>>
>> I don't understand what is the pad parameter at all. AFAICS, it is just
>> an old rudiment. What is padding? If the write buffer is not full, we
>> fill the rest of it by padding and flush it. Why we may not want this? I
>> have no idea. This is something odd. Why DataFlash is something
>> special??? May be I'm too stupid today to understand this? Later.
>>
> You are right (both):
> It's late, and it was the bug....
> Tomorrow is another day....
> 
Ok, so far one step again...
but I don't find the place, where jeb->free_size and c->free_size is 
adjusted for the *data* (wbuf_len). I find this only for the padding.
Any ideas?

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