[PATCH 3/3] mtd: ubi: wl: avoid erasing a PEB which is empty

Artem Bityutskiy dedekind1 at gmail.com
Wed Dec 2 03:56:08 PST 2015


On Tue, 2015-12-01 at 20:46 +0100, Richard Weinberger wrote:
> Am 26.11.2015 um 21:23 schrieb Sebastian Andrzej Siewior:
> > wear_leveling_worker() currently unconditionally puts a PEB on
> > erase in
> > the error case even it just been taken from the free_list and never
> > used.
> > In case the PEB was never used it can be put back on the free list
> > saving a precious erase cycle.
> > 
> > v1…v2:
> > 	- to_leb_clean -> dst_leb_clean
> > 	- use the nested option for ensure_wear_leveling()
> > 	- do_sync_erase() can't go -ENOMEM so we can just go into
> > 	  RO-mode now.
> > 
> > Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
> 
> Thanks a lot for the error handling cleanup and this improvement!
> All three patches look good to me.
> Artem, unless you have objections I'd merge them.

Sure, thanks!



More information about the linux-mtd mailing list