JFFS2 Corruption.

David Woodhouse dwmw2 at infradead.org
Tue Feb 24 09:22:58 EST 2004


On Tue, 2004-02-24 at 13:40 +0000, Simon Haynes wrote:
> I don't understand. I changed the kernel to use the read only device. I 
> expected this to work rw without caching but it does not. 

You can't use flash RW without caching. It _has_ to
read/modify/erase/writeback to write to flash.

But for JFFS2, you _don't_ use flash RW through mtdblock. It operates
directly and should work fine. What failure mode do you observe?

> I have already 
> tried mounting root ro via the caching mtd block and although my system does 
> not fully start I can't see how I would get corruption ? 

As I said -- I don't know. Maybe there's a bug which causes the mtdblock
device to consider its cache dirty, and write it out to the detriment of
the real data which JFFS2 has already put there on the flash. That's why
I was asking you to test mtdblock_ro.

> I have looked at the mtdblock_ro code and it seems you allow writing if flag 
> certain bits are set you allow writing. Do I need to set these somewhere ?

No. Leave them turned off. We don't actually want to write via the
mtdblock device -- that's the whole _point_ in this experiment.

-- 
dwmw2




More information about the linux-mtd mailing list