RomFS MTD and NAND Flash with ECC (EUCLEAN).

Artem Bityutskiy dedekind1 at gmail.com
Mon Sep 19 01:05:45 EDT 2011


On Fri, 2011-09-16 at 16:46 -0400, Bill Pringlemeir wrote:
>  #ifdef CONFIG_ROMFS_ON_MTD
> -#define ROMFS_MTD_READ(sb, ...) ((sb)->s_mtd->read((sb)->s_mtd, ##__VA_ARGS__))
> -
> +#define ROMFS_MTD_READ(sb, ...)                                        \
> +    ({ int res;                                                        \
> +        res = ((sb)->s_mtd->read((sb)->s_mtd, ##__VA_ARGS__)) == -EUCLEAN ? \
> +            0 : res; })                                                         

I do not think this is the most elegant way to handle this, but yes,
EUCLEAN is used nowadays to report about bit-flips, which are actually
not an error, more like an info that this eraseblock needs some
attention.

I am not sure MTD is the right subsystem for this patch, could you try
to send it to fs-devel / Al Viro instead?

-- 
Best Regards,
Artem Bityutskiy




More information about the linux-mtd mailing list