[PATCH] UBI: Do not use outdated fastmaps to attach
Sascha Hauer
s.hauer at pengutronix.de
Tue Dec 5 05:00:24 PST 2017
On Tue, Dec 05, 2017 at 11:05:25AM +0100, Sascha Hauer wrote:
> When a fastmap gets updated, then it can happen that no free
> PEB for a new fastmap anchor is available. In this case we reuse
> the current fastmap anchor PEB. We are only allowed to do that
> though when we made sure that no outdated fastmap PEBs are in
> the erase worker queue. Otherwise an outdated fastmap anchor may
> be used to attach the device when an unclean reboot happens right
> after we have erased the current fastmap anchor.
>
> This patch synchronously erases all pending erase work which belongs
> to outdated fastmap anchors. This way we make sure that when the
> current fastmap anchor PEB gets erased, no older fastmap anchors
> are on the device.
>
> Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
Richard and I agreed that we play safe and instead want to erase the
outdated fastmaps synchronously during attach, so please ignore this
one.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the linux-mtd
mailing list