linux/drivers/mtd/ubi
Artem Bityutskiy 0525dac9fd UBI: do not put eraseblocks to the corrupted list unnecessarily
Currently UBI maintains 2 lists of PEBs during scanning:
1. 'erase' list - PEBs which have no corruptions but should be erased
2. 'corr' list - PEBs which have some corruptions and should be erased

But we do not really need 2 lists for PEBs which should be erased after
scanning is done - this is redundant. So this patch makes sure all PEBs
which are corrupted are moved to the head of the 'erase' list. We add
them to the head to make sure they are erased first and we get rid of
corruption ASAP.

However, we do not remove the 'corr' list and realted functions, because
the plan is to use this list for other purposes. Namely, we plan to
put eraseblocks with corruption which does not look like it was caused
by unclean power cut. Then we'll preserve thes PEBs in order to avoid
killing potentially valuable user data.

This patch also amends PEBs accounting, because it was closely tight to
the 'erase'/'corr' lists separation.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2010-10-19 17:19:57 +03:00
..
build.c UBI: fix small 80 characters limit style issue 2010-10-19 17:19:55 +03:00
cdev.c UBI: eliminate update of list_for_each_entry loop cursor 2010-08-30 10:19:11 +03:00
debug.c UBI: introduce flash dump helper 2009-08-14 20:02:20 +03:00
debug.h UBI: add write checking 2010-02-01 15:16:37 +02:00
eba.c UBI: rename IO error code 2010-10-19 17:19:56 +03:00
gluebi.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
io.c UBI: handle bit-flips when no header found 2010-10-19 17:19:56 +03:00
kapi.c UBI: fix s/then/than/ typos 2010-05-07 08:33:10 +03:00
Kconfig UBI: cleanup and simplify Kconfig 2010-10-19 17:19:55 +03:00
Kconfig.debug UBI: cleanup and simplify Kconfig 2010-10-19 17:19:55 +03:00
Makefile UBI: make gluebi a separate module 2009-06-03 17:45:23 +03:00
misc.c UBI: avoid unnecessary division operations 2008-07-24 13:32:54 +03:00
scan.c UBI: do not put eraseblocks to the corrupted list unnecessarily 2010-10-19 17:19:57 +03:00
scan.h UBI: do not put eraseblocks to the corrupted list unnecessarily 2010-10-19 17:19:57 +03:00
ubi-media.h UBI: add image sequence number to EC header 2009-07-05 18:47:07 +03:00
ubi.h UBI: handle bit-flips when no header found 2010-10-19 17:19:56 +03:00
upd.c UBI: fix memory leak in update path 2010-01-18 18:53:56 +02:00
vmt.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
vtbl.c UBI: do not put eraseblocks to the corrupted list unnecessarily 2010-10-19 17:19:57 +03:00
wl.c UBI: handle bit-flips when no header found 2010-10-19 17:19:56 +03:00