]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
ubi: fastmap: Erase outdated anchor PEBs during attach
authorSascha Hauer <s.hauer@pengutronix.de>
Tue, 5 Dec 2017 15:01:20 +0000 (16:01 +0100)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 22 Feb 2018 14:15:51 +0000 (08:15 -0600)
commit96d5265e40dee30b3fa20e759ce4ef20a76d417a
treeccf7be63ed62fb0d76b742866b4e9cb886fd7fe2
parentf5b0025a917c608cd618bd6b67925570f6106ce9
ubi: fastmap: Erase outdated anchor PEBs during attach

BugLink: http://bugs.launchpad.net/bugs/1751064
commit f78e5623f45bab2b726eec29dc5cefbbab2d0b1c upstream.

The fastmap update code might erase the current fastmap anchor PEB
in case it doesn't find any new free PEB. When a power cut happens
in this situation we must not have any outdated fastmap anchor PEB
on the device, because that would be used to attach during next
boot.
The easiest way to make that sure is to erase all outdated fastmap
anchor PEBs synchronously during attach.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Richard Weinberger <richard@nod.at>
Fixes: dbb7d2a88d2a ("UBI: Add fastmap core")
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/mtd/ubi/wl.c