diff options
author | Michał Kępień <kernel@kempniu.pl> | 2022-06-29 14:57:34 +0200 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2022-09-21 10:38:05 +0200 |
commit | 65394169bdae073bfb2c6816f5bf095bd7d53e61 (patch) | |
tree | 8b0070a20c79e9139d62b1edfc65ee8971db7cc0 /drivers/mtd/tests/oobtest.c | |
parent | 9ee67182309290aee8135b2b464d0240afe63a28 (diff) | |
download | lwn-65394169bdae073bfb2c6816f5bf095bd7d53e61.tar.gz lwn-65394169bdae073bfb2c6816f5bf095bd7d53e61.zip |
mtd: track maximum number of bitflips for each read request
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@collabora.com>
Signed-off-by: Michał Kępień <kernel@kempniu.pl>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20220629125737.14418-2-kernel@kempniu.pl
Diffstat (limited to 'drivers/mtd/tests/oobtest.c')
0 files changed, 0 insertions, 0 deletions