]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ubi: Be more paranoid while seaching for the most recent Fastmap
authorRichard Weinberger <richard@nod.at>
Tue, 14 Jun 2016 08:12:17 +0000 (10:12 +0200)
committerRichard Weinberger <richard@nod.at>
Fri, 29 Jul 2016 21:32:54 +0000 (23:32 +0200)
commit74f2c6e9a47cf4e508198c8594626cc82906a13d
tree353246f510fcff72011013eacaa228b92b4a45db
parent5283ec72b0cca44ccea63070f6954fd8675b9ac4
ubi: Be more paranoid while seaching for the most recent Fastmap

Since PEB erasure is asynchornous it can happen that there is
more than one Fastmap on the MTD. This is fine because the attach logic
will pick the Fastmap data structure with the highest sequence number.

On a not so well configured MTD stack spurious ECC errors are common.
Causes can be different, bad hardware, wrong operating modes, etc...
If the most current Fastmap renders bad due to ECC errors UBI might
pick an older Fastmap to attach from.
While this can only happen on an anyway broken setup it will show
completely different sympthoms and makes finding the root cause much
more difficult.
So, be debug friendly and fall back to scanning mode of we're facing
an ECC error while scanning for Fastmap.

Cc: <stable@vger.kernel.org>
Signed-off-by: Richard Weinberger <richard@nod.at>
drivers/mtd/ubi/attach.c
drivers/mtd/ubi/ubi.h