[RFC] BUG Power loss recovery issues in JFFS2

Jörn Engel joern at logfs.org
Thu Nov 15 08:20:27 EST 2007


On Thu, 15 November 2007 12:55:07 +0000, Alexey Korolev wrote:
> 
> Oh I've completely forgot to say that the issue take place on NOR only.
> We think that we can;t reproduce the problem on NAND - because of ECC
> correction which usually corrupts whole page in case of partial write.
> (It could be incorrect just an idea). 

Could be a writebuffer thing.  Maybe a testcase like this will force it
on NAND.

# mount
head -c3960 /dev/urandom > wbuf_preload
echo 12345 > foo
# wait long enough for write to finish, but not long enough for wbuf to
# get flushed, hit reset button

The size of the preload should be carefully crafted.  3960 bytes plus
node header of 68 bytes leaves exactly another 68 bytes for the next
node header.  So the wbuf gets filled and written right after the second
node's header, but before its data.  Works with wbuf sizes of 512, 1024,
2048 and 4096.

Jörn

-- 
Beware of bugs in the above code; I have only proved it correct, but
not tried it.
-- Donald Knuth
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.infradead.org/pipermail/linux-mtd/attachments/20071115/9d33eff2/attachment.bin 


More information about the linux-mtd mailing list