u-boot/fs/jffs2
Engling, Uwe 41ba7f525f jffs2: ECC corrected nand data is ignored
Hello,

I ran into a problem with the JFFS2 filesystem driver implemented in U-Boot.

I've got a NAND device that has correctable ECC errors (corrected somewhere in mtd/nand/nand_base.c).
The NAND driver tells the filesystem layer (jffs2_1pass.c) above that there occurred correctable ECC errors and returns with a "value > 0".
The JFFS2 driver recognizes the corrected ECC errors as real error and skips this block because the only accepts a "return value == 0" as correct.

This problem exists for over 8 years (I checked version 2010.09) so I'm a little bit worried that I interpreted something wrong or didn't get the whole context.

Can someone confirm this bug (and the bugfix) in the u-boot jffs2 driver?

There was a mail in 2012 that mentioned the same problem, but there was no patch:
http://u-boot.10912.n7.nabble.com/JFFS2-seems-to-drop-nand-data-with-ECC-corrections-td142008.html
Sometime after this discussion the return value of nand_read() changed from -EUCLEAN as correctable ECC error to a positive value with the count of ECC corrected errors.

With kind reguards,
Uwe Engling
2017-10-16 09:42:51 -04:00
..
compr_lzo.c fs: Move conditional compilation to Makefile 2008-08-31 04:24:56 +02:00
compr_rtime.c fs: Move conditional compilation to Makefile 2008-08-31 04:24:56 +02:00
compr_rubin.c fs: Move conditional compilation to Makefile 2008-08-31 04:24:56 +02:00
compr_zlib.c fs: Move conditional compilation to Makefile 2008-08-31 04:24:56 +02:00
jffs2_1pass.c jffs2: ECC corrected nand data is ignored 2017-10-16 09:42:51 -04:00
jffs2_nand_1pass.c treewide: replace with error() with pr_err() 2017-10-04 11:59:44 -04:00
jffs2_nand_private.h Rewrite of NAND code based on what is in 2.6.12 Linux kernel 2005-08-17 12:55:25 +02:00
jffs2_private.h JFFS2: Use merge sort when parsing filesystem 2015-08-12 20:47:32 -04:00
Kconfig fs: Kconfig: Add a separate option for FS_JFFS2 2017-05-22 12:45:31 -04:00
LICENCE JFFS2: drop support for LZARI compression mode 2010-01-15 11:16:47 +01:00
Makefile JFFS2: Use merge sort when parsing filesystem 2015-08-12 20:47:32 -04:00
mergesort.c JFFS2: Use merge sort when parsing filesystem 2015-08-12 20:47:32 -04:00
mini_inflate.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
summary.h jffs2: summary support 2008-12-09 23:39:59 +01:00