Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1566aa1b authored by Richard Weinberger's avatar Richard Weinberger Committed by Ian Maund
Browse files

UBI: Fastmap: Rework fastmap error paths



If UBI is unable to write the fastmap to the device
we have make sure that upon next attach UBI will fall
back to scanning mode.
In case we cannot ensure that they only thing we can do
is falling back to read-only mode.

The current error handling code is not powercut proof.
It could happen that a powercut while invalidating would
lead to a state where an too old fastmap could be used upon
attach.
This patch addresses the issue by writing a fake fastmap
super block to a fresh PEB instead of reerasing the existing one.
The fake fastmap super block will UBI case to do a full scan.

Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
Git-commit: 5ca97ad83800938e8aeea622821a26d69d2052bf
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


Signed-off-by: default avatarNikhilesh Reddy <reddyn@codeaurora.org>
parent ad6baba9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment