Re: [PATCH 4/6] persistent_ram: Move to fs/pstore/ram_core.c
From: Arve Hjønnevåg
Date: Wed May 16 2012 - 19:46:26 EST
On Wed, May 16, 2012 at 5:43 AM, Anton Vorontsov
<anton.vorontsov@xxxxxxxxxx> wrote:
> This is a first step for adding ECC support for pstore RAM backend: we
> will use the persistent_ram routines, kindly provided by Google.
>
> Basically, persistent_ram is a set of helper routines to deal with the
> [optionally] ECC-protected persistent ram regions.
>
...
> +static int persistent_ram_init_ecc(struct persistent_ram_zone *prz,
> + size_t buffer_size)
> +{
> + int numerr;
> + struct persistent_ram_buffer *buffer = prz->buffer;
> + int ecc_blocks;
> +
> + if (!prz->ecc)
> + return 0;
> +
> + prz->ecc_block_size = 128;
> + prz->ecc_size = 16;
I realize you are just moving code here, but 16 ecc bytes for per 128
bytes of data can only correct 8 bad bytes, which is not always
sufficient. At some point this will need to be made configurable
again.
--
Arve Hjønnevåg
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/