[PATCH v4 1/4] mtd: track maximum number of bitflips for each read request

Miquel Raynal miquel.raynal at bootlin.com
Wed Sep 21 01:41:20 PDT 2022


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 at collabora.com>
> Signed-off-by: Michał Kępień <kernel at kempniu.pl>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.

Miquel



More information about the linux-mtd mailing list