Skip to content
Commit 623978de authored by Brian Norris's avatar Brian Norris Committed by Artem Bityutskiy
Browse files

mtd: nand: scrub BBT on ECC errors



Now that `read_bbt()' returns ECC error codes properly, we handle those
codes when checking the integrity of our flash-based BBT.

The modifications can be described by this new policy:

*) On any uncorrected ECC error, we invalidate the corresponding table
   and retry our version-checking integrity logic.
*) On corrected bitflips, we mark both tables for re-writing to flash
   (a.k.a. scrubbing).

Current integrity checks (i.e., comparing version numbers, etc.) should
take care of all the cases that result in rescanning the device for bad
blocks or falling back to the BBT as found in the mirror descriptor.

Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@intel.com>
parent 167a8d52
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment