fix jffs2 data errors ?
Howard Gray
rhea at matrix-vision.de
Tue Jan 27 08:13:09 EST 2004
On Mon, 2004-01-26 at 14:26, Armin Schindler wrote:
> Hi,
>
> together with latest CVS of jffs2 (one week old), I try to use
> my rootfs on a jffs2 NAND-Flash partition.
>
> It seems to work pretty good, but when I have e.g. reset/power-down,
> on the next boot/rootfs-mount I get messages like:
>
> jffs2_scan_dirent_node(): Name CRC failed on node at 0x001b89dc: Read
0xffffffff,
Sorry, I missed this posting originally, otherwise I wouldn't have top posted.
I have also seen the problems you mentioned. Please see my mail "Problem
deleting files with NAND/JFFS2 and a possible solution" posted today. The
"solution" appears to cure these problems too, at least for me.
On Tuesday 27 January 2004 12:47, Armin wrote:
> What is the time the garbage collection starts or finished this?
> I waited some time (about 10 minutes) and the messages still occured after
> remount.
The following is based on my observation, not from any detailed understanding
of the code. I'm sure David Woodhouse will correct me if I'm wrong.
Garbage collection is started by the kupdated/bdflush daemon or when there are
not enough free blocks to carry out another file operation or by the sync
command. Or you can kick it by sending SIGHUP to the GC process. But in your
case the GC won't clean up your bad blocks until some other file really needs
the space, so it doesn't matter how long you wait. You could try filling up
your FLASH with data and then erasing it again. That'll do it.
If the GC is started by kupdated/bdflush or sync it will only really do
something if it thinks it's necessary i.e.if some inodes are marked as dirty.
Older versions of the GC were started by a 2 second timer but that seems to
have been abondoned in favour of kupdated (but you can still find some
refrences to it in the code, which foxed me for a while...).
P.S.
You can adjust the frequency with which bdflush runs by writing to /proc/sys/
vm/bdflush. See the kernel documentaion file sysctl/vm.txt for details.
--
Howard
More information about the linux-mtd
mailing list