JFFS2 Corruption.

Simon Haynes simon at baydel.com
Tue Feb 24 13:04:50 EST 2004


On Tuesday 24 Feb 2004 6:05 pm, David Woodhouse wrote:
> On Tue, 2004-02-24 at 17:05 +0000, Simon Haynes wrote:
> > Would you recommend changing the printk for the "Empty Flash" messages to
> > a different level and using the ramdisk as a permanent solution ?
>
> Changing the printk level for the 'Empty Flash' messages does seem
> appropriate -- or preferably finding a way to eliminate the ones which
> we don't want. Are you mounting the fs read-only before rebooting? If
> not, the occasional CRC failure is acceptable. You get those with an
> unclean restart. It doesn't indicate data loss; it indicates that one
> particular log entry which you were writing _while_ you rebooted was
> lost. That was not data which userspace thought was already on the
> medium.
>
> The problem with mtdblock is interesting. Can you make it BUG() when it
> dirties its cache and put it back to how it was, using mtdblock?

I do remount the filesystem read only as part of a shutdown. I also cat 
/proc/mounts so that I can check it has happened. So the filesystem should be 
clean. After this halt is called. I think this tries to write to utmp. If the 
kernel already has the device open for write will this be allowed ? 

I guess it is strange that the read only mtdblock device prevents write 
access via jffs2. I don't know if the cache in mtdblock is ever being used 
but I can certainly put a BUG() in there.

Cheers

Simon.



More information about the linux-mtd mailing list