NAND write buffering

Bernhard Priewasser priewasser at gmail.com
Tue Nov 29 13:07:38 EST 2005


Hi all,

I just got the cited mail from Ferenc. I think it is useful for other 
people too, that's why it is posted to the list.

Is there anything wrong with our assumptions?

>> JFFS2 is claimed to be powerfail-safe. That's true as far it will 
>> _always_ mount, nodes are CRC-protected and scanned at Mount/GC.
>> But what about write buffering on NAND? Doesn't this break lots of the 
>> powerfailsafe-efforts? All the data in the writebuffer will be lost. 
>> Assuming we are updating a logfile with small data portions. The 
>> portions accumulate in wbuf, waiting to reach c->wbuf_pagesize so that 
>> the buffer is written to flash. Powerfail: all these small updates can 
>> be lost. Hm...
> 
> I think you are right. But anyway, if you call "sync" all data will be 
> flushed. Unfortunatelly NAND can be written only by page, so the end of 
> the wbuf will be filled a padding node. It is a little flash wasting, 
> but the data will be written out immediatelly.
> 
> Bye,
> Ferenc

Thanks,
Bernhard




More information about the linux-mtd mailing list