Preventing JFFS2 partial page writes?

Peter Barada peter.barada at gmail.com
Wed Jul 20 11:02:59 EDT 2011


On 07/01/2011 04:52 PM, Ivan Djelic wrote:
> On Thu, Jun 30, 2011 at 07:05:25PM +0100, Peter Barada wrote:
> (...)
>>>> Another issue this exposes is that JFFS2 reads/compares the cleanmarker
>>>> w/o any ECC in the marker data to verify its validity - if a bitflip in
>>>> an unECC'd cleanmarker is read back, then I think JFFS2 will fail to use
>>>> that block.
>>> No, I think what JFFS2 should do is just assume the eraseblock needs
>>> erasure and just erase it. The whole purpose of clean markers is to
>>> erase less. If it is corrupted - we just do an extra erase - not big
>>> deal.
>> How's the best way to do this?  That would make this whole problem just
>> go away, and make MLC devices much more happy with JFFS2.
> I think Artem was just explaining that a single corrupted cleanmarker is no
> big deal, it just forces JFFS2 to perform an extra erase. That does not mean
> you can get rid of cleanmarkers, because systematically erasing a block before
> programming it would seriously degrade write performance.
What I meant was that for the first write to a block (which I hope will 
be to the page that contains the cleanmarker), erase the block before 
the write, merge the page data and clean marker into one write).  This 
shouldn't degrade performance that much (and could be enabled/disabled 
by a mount option).  If that is possible (and someone can provide a 
pointer to me on how to do such) its a much better solution than 
butchering ecclayout.

> --
> Best Regards,
>
> Ivan


-- 
Peter Barada
peter.barada at gmail.com




More information about the linux-mtd mailing list