linux_dsm_epyc7002/drivers/mtd/ubi
Artem Bityutskiy 6b5c94c6b4 UBI: handle more error codes
The UBIFS WL worker may encounter read errors and there is logic
which makes a decision whether we should do one of:

1. cancel the operation and move the PEB with the read errors to
   the 'erroneous' list;
2. switch to R/O mode.

ATM, only -EIO errors trigger 1., other errors trigger 2. The idea
is that if we know we encountered an I/O error, do 1. Otherwise,
we do not know how to react, and do 2., just in case. E.g., if
the underlying driver became crazy because of a bug, we do not
want to harm any data, and switch to R/O mode.

This patch does 2 things:
1. Makes sure reads from the source PEB always cause 1. This is
   more consistent with other reads which come from the upper
   layers and never cause R/O.
2. Teaches UBI to do 1. also on -EBADMSG, UBI_IO_BAD_VID_HDR,
   -ENOMEM, and -ETIMEOUT. But this is only when reading the
   target PEB.

This preblems were hunted by Adrian Hunter.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-06-10 16:13:28 +03:00
..
build.c UBI: add notification API 2009-06-02 13:53:35 +03:00
cdev.c UBI: remove built-in gluebi 2009-06-02 13:53:35 +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: handle more error codes 2009-06-10 16:13:28 +03:00
gluebi.c UBI: make gluebi a separate module 2009-06-03 17:45:23 +03:00
io.c UBI: fix multiple spelling typos 2009-06-10 16:13:27 +03:00
kapi.c UBI: add notification API 2009-06-02 13:53:35 +03:00
Kconfig UBI: make gluebi a separate module 2009-06-03 17:45:23 +03:00
Kconfig.debug UBI: allow direct user-space I/O 2009-01-27 16:54:41 +02: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: 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: fix multiple spelling typos 2009-06-10 16:13:27 +03:00
upd.c UBI: minor serialization fix 2009-05-18 12:28:26 +03:00
vmt.c UBI: remove built-in gluebi 2009-06-02 13:53:35 +03:00
vtbl.c trivial: fix then -> than typos in comments and documentation 2009-01-06 11:28:06 +01:00
wl.c UBI: fix multiple spelling typos 2009-06-10 16:13:27 +03:00