Re: [PATCH v4 1/4] mtd: track maximum number of bitflips for each read request
From: Miquel Raynal
Date: Wed Sep 21 2022 - 04:41:38 EST
On Wed, 2022-06-29 at 12:57:34 UTC, =?utf-8?b?TWljaGHFgiBLxJlwaWXFhA==?= wrote:
> mtd_read_oob() callers are currently oblivious to the details of ECC
> errors detected during the read operation - they only learn (through the
> return value) whether any corrected bitflips or uncorrectable errors
> occurred. More detailed ECC information can be useful to user-space
> applications for making better-informed choices about moving data
> around.
>
> Extend struct mtd_oob_ops with a pointer to a newly-introduced struct
> mtd_req_stats and set its 'max_bitflips' field to the maximum number of
> bitflips found in a single ECC step during the read operation performed
> by mtd_read_oob(). This is a prerequisite for ultimately passing that
> value back to user space.
>
> Suggested-by: Boris Brezillon <boris.brezillon@xxxxxxxxxxxxx>
> Signed-off-by: Michał Kępień <kernel@xxxxxxxxxx>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel