ECC correct error on VFAT filesytem

YongLi sdshliyong at
Thu Feb 26 04:30:18 CET 2009

Hello All,

I am testing the s3c2410 ecc correct function using linux 2.6.28 on SMDK2440 

After I mount the mtdblock1 as VFAT filesystem using:
mount -t vfat /dev/mtdblock1 /mnt

I found one problem: If there is an ECC error, the file IO report an error:
end_request: I/O error, dev mtdblock1, sector 105504

In fact, the s3c2410_nand_correct_data function has correct the one bit 

If I use jffs2 or Yaffs2 filesystem, I do not encounter this problem. It 
seems that the
nand_do_read_ops function in nand_base.c has problem:
return  mtd->ecc_stats.corrected - stats.corrected ? -EUCLEAN : 0;

If there is an ECC bit error, this function will return -EUCLEAN, however, 
vfat think there is an error.

How to resolve this problem?

Li Yong

More information about the openmoko-kernel mailing list