linux/drivers/mtd/ubi
Artem Bityutskiy b86a2c56e5 UBI: do not switch to R/O mode on read errors
This patch improves UBI errors handling. ATM UBI switches to
R/O mode when the WL worker fails to read the source PEB.
This means that the upper layers (e.g., UBIFS) has no
chances to unmap the erroneous PEB and fix the error.
This patch changes this behaviour and makes UBI put PEBs
like this into a separate RB-tree, thus preventing the
WL worker from hitting the same read errors again and
again.

But there is a 10% limit on a maximum amount of PEBs like this.
If there are too much of them, UBI switches to R/O mode.

Additionally, this patch teaches UBI not to panic and
switch to R/O mode if after a PEB has been copied, the
target LEB cannot be read back. Instead, now UBI cancels
the operation and schedules the target PEB for torturing.

The error paths has been tested by ingecting errors
into 'ubi_eba_copy_leb()'.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-06-02 13:53:35 +03:00
..
Kconfig UBI: improve Kconfig documentation 2008-04-17 11:32:00 +03:00
Kconfig.debug UBI: allow direct user-space I/O 2009-01-27 16:54:41 +02:00
Makefile UBI: Unsorted Block Images 2007-04-27 14:23:33 +03:00
build.c UBI: do not switch to R/O mode on read errors 2009-06-02 13:53:35 +03:00
cdev.c UBI: improve debugging messages 2009-05-18 12:28:25 +03:00
debug.c UBI: remove pre-sqnum images support 2008-07-24 13:36:09 +03:00
debug.h UBI: fix checkpatch.pl warnings 2008-12-28 12:20:51 +02:00
eba.c UBI: do not switch to R/O mode on read errors 2009-06-02 13:53:35 +03:00
gluebi.c UBI: use nicer 64-bit math 2009-01-18 14:27:44 +02:00
io.c UBI: fix races in I/O debugging checks 2009-05-18 12:28:25 +03:00
kapi.c UBI: improve debugging messages 2009-05-18 12:28:25 +03:00
misc.c UBI: avoid unnecessary division operations 2008-07-24 13:32:54 +03:00
scan.c UBI: use nicer 64-bit math 2009-01-18 14:27:44 +02:00
scan.h UBI: remove pre-sqnum images support 2008-07-24 13:36:09 +03:00
ubi-media.h trivial: fix then -> than typos in comments and documentation 2009-01-06 11:28:06 +01:00
ubi.h UBI: do not switch to R/O mode on read errors 2009-06-02 13:53:35 +03:00
upd.c UBI: minor serialization fix 2009-05-18 12:28:26 +03:00
vmt.c UBI: do not panic if volume check fails 2009-05-18 12:28:26 +03:00
vtbl.c trivial: fix then -> than typos in comments and documentation 2009-01-06 11:28:06 +01:00
wl.c UBI: do not switch to R/O mode on read errors 2009-06-02 13:53:35 +03:00