Skip to content
Commit 78193237 authored by Richard Weinberger's avatar Richard Weinberger
Browse files

ubi: fastmap: Correctly handle interrupted erasures in EBA



Fastmap cannot track the LEB unmap operation, therefore it can
happen that after an interrupted erasure the mapping still looks
good from Fastmap's point of view, while reading from the PEB will
cause an ECC error and confuses the upper layer.

Instead of teaching users of UBI how to deal with that, we read back
the VID header and check for errors. If the PEB is empty or shows ECC
errors we fixup the mapping and schedule the PEB for erasure.

Fixes: dbb7d2a8 ("UBI: Add fastmap core")
Cc: <stable@vger.kernel.org>
Reported-by: default avatarmartin bayern <Martinbayern@outlook.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 6e7d8016
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