[PATCH 3/3] mtd: ubi: wl: avoid erasing a PEB which is empty
Richard Weinberger
richard at nod.at
Tue Dec 1 11:46:09 PST 2015
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.
Thanks,
//richard
More information about the linux-mtd
mailing list