mtd: nand: improve flash-based BBT robustness
Status from this message: Pushed to my tree, thanks!
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/14 | mtd: nand: refactor scanning codedrivers/ | +8 | 1 reply | |
| 2/14 | mtd: nand: do not ignore all ECC errorsdrivers/ | +3 | 1 reply | |
| 3/14 | mtd: define `is_ecc_error()' macrosinclude/ | +5 | 7 replies | |
| 4/14 | mtd: utilize `is_ecc_error()' macrosdrivers/ drivers/ drivers/ +20 more | +84 | 1 reply | |
| 5/14 | mtd: nand: remove unnecessary variabledrivers/ | +3 | 1 reply | |
| 6/14 | mtd: nand: fix styledrivers/ | +14 | 1 reply | |
| 7/14 | mtd: nand: begin restructuring check_createdrivers/ | +5 | 0 replies | |
| 8/14 | mtd: nand: remove gotos in `check_create()'drivers/ | +19 | 0 replies | |
| 9/14 | mtd: nand: report ECC errors properly when reading BBTdrivers/ | +12 | 1 reply | |
| 10/14 | mtd: nand: scrub BBT on ECC errorsdrivers/ | +24 | 1 reply | |
| 11/14 | mtd: nand: wait to set BBT versiondrivers/ | +8 | 1 reply | |
| 12/14 | mtd: nand: do not scan bad blocks with NAND_BBT_NO_OOB setdrivers/ | +7 | 1 reply | |
| 13/14 | mtd: nand: invalidate cache on unaligned readsdrivers/ | +10 | 0 replies | |
| 14/14 | mtd: nand: switch `check_pattern()' to standard `memcmp()'drivers/ | +2 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 00/14] mtd: nand: improve flash-based BBT robustness
Hello,
This patch series aims to improve the robustness of flash-based bad block tables, especially their ECC handling. In fact, most of the patches simply build up to the changes in patch 9 and 10, with some following bugfixes and improvements that were discovered as a result of the optimizations.
It's worth noting here the intended block scrubbing policy so that it can be checked for soundness and for implementation:
*) a BBT page with uncorrected ECC errors is invalid
*) a BBT page with corrected ECC errors is valid but needs scrubbing
(erased and rewritten with corrected data)
Upon discovering invalid table page(s), we retry our table versioning in this order:
(1) Mirrored table of same version
(2) Mirrored table of lesser version
(3) Rescan flash for bad blocks
After yielding the most up-to-date table (from table in flash or from scanning the device), then if the flash-BBT is out of date or needs scrubbing, the table should be rewritten.
Let me know how any of this works and if there are particular areas where documentation or explanation is lacking.
Brian
Brian Norris (14):
mtd: nand: refactor scanning code
mtd: nand: do not ignore all ECC errors
mtd: define `is_ecc_error()' macros
mtd: utilize `is_ecc_error()' macros
mtd: nand: remove unnecessary variable
mtd: nand: fix style
mtd: nand: begin restructuring check_create
mtd: nand: remove gotos in `check_create()'
mtd: nand: report ECC errors properly when reading BBT
mtd: nand: scrub BBT on ECC errors
mtd: nand: wait to set BBT version
mtd: nand: do not scan bad blocks with NAND_BBT_NO_OOB set
mtd: nand: invalidate cache on unaligned reads
mtd: nand: switch check_pattern()' to standard memcmp()'
drivers/mtd/inftlcore.c | 4 +- drivers/mtd/mtdchar.c | 4 +- drivers/mtd/mtdconcat.c | 8 +- drivers/mtd/mtdoops.c | 2 +- drivers/mtd/mtdpart.c | 8 +- drivers/mtd/mtdswap.c | 20 ++-- drivers/mtd/nand/diskonchip.c | 2 +- drivers/mtd/nand/nand_base.c | 12 ++- drivers/mtd/nand/nand_bbt.c | 198 ++++++++++++++++++----------------- drivers/mtd/nftlcore.c | 4 +- drivers/mtd/onenand/onenand_base.c | 11 +- drivers/mtd/sm_ftl.c | 4 +- drivers/mtd/tests/mtd_pagetest.c | 28 +++--- drivers/mtd/tests/mtd_readtest.c | 2 +- drivers/mtd/tests/mtd_speedtest.c | 8 +- drivers/mtd/tests/mtd_stresstest.c | 2 +- drivers/mtd/tests/mtd_subpagetest.c | 9 +- drivers/mtd/tests/mtd_torturetest.c | 2 +- drivers/mtd/ubi/eba.c | 2 +- drivers/mtd/ubi/io.c | 27 +++-- drivers/mtd/ubi/kapi.c | 3 +- drivers/mtd/ubi/misc.c | 2 +- drivers/mtd/ubi/scan.c | 4 +- drivers/mtd/ubi/vtbl.c | 2 +- include/linux/mtd/mtd.h | 5 + 25 files changed, 198 insertions(+), 175 deletions(-)
Signature · 1 line
1.7.5.4