A problem in JFFS2 code about ECC'd NOR flash

Jörn Engel joern at wohnheim.fh-wedel.de
Wed Jul 20 07:30:49 EDT 2005


On Wed, 20 July 2005 16:28:09 +0800, ?? ???? wrote:
> 
> For ECC'd NOR flash, the clean marker is written by
> jffs2_flash_direct_writev() in jffs2_mark_erased_block().
> Then the first 16 bytes of first page is filled with
> clean marker. But wbuf know nothing about this 16 bytes.
> So subsequent jffs2_flash_writev() will have problem. In
> particular jffs2_flash_writev() will write the first page
> for the second time.
> Am I right? Or can this be confirmed by the JFFS2 developer?

This has been answered in irc already, but for the record...

ECC NOR requires writes in aligned multiples of 8 bytes.  The wbuf
size is 8 bytes only.  16 bytes, if written through the wbuf, would be
written directly to flash and leave the wbuf empty.  Writing them
directly, without wbuf, yields the same result, so current code is
safe.

Jörn

-- 
Audacity augments courage; hesitation, fear.
-- Publilius Syrus 




More information about the linux-mtd mailing list