• Brian Norris's avatar
    mtd: nand: scrub BBT on ECC errors · 623978de
    Brian Norris authored
    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>
    623978de
nand_bbt.c 38 KB