UBI: do not switch to R/O mode on read errors
Artem Bityutskiy authored

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: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
b86a2c56
Name Last commit Last update
..
accessibility braille_console: only register notifiers when the braille console is used
acpi acpica: validate package element more carefully in acpi_rs_get_pci_routing_table_length
amba amba: struct device - replace bus_id with dev_name(), dev_set_name()
ata libata: Media rotation rate and form factor heuristics
atm Replace all DMA_nBIT_MASK macro with DMA_BIT_MASK(n)
auxdisplay auxdisplay: remove PARPORT dependency
base Revert driver core: move platform_data into platform_device
block hd: fix locking
bluetooth Bluetooth: Remove some pointless conditionals before kfree_skb()
cdrom cdrom: reduce stack usage of mmc_ioctl_dvd_read_struct
char sysrq, intel_fb: fix sysrq g collision
clocksource clocksource: pass clocksource to read() callback
connector connector: create connector workqueue only while needed once
cpufreq Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq
cpuidle cpuidle: Add decaying history logic to menu idle predictor
crypto dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)
dca Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
dio dio: struct device - replace bus_id with dev_name(), dev_set_name()
dma dma: fix ipu_idmac.c to not discard the last queued buffer
edac edac: ppc mpc85xx fix mc err detect
eisa Merge branch 'core/percpu' into percpu-cpumask-x86-for-linus-2
firewire firewire: core: optimize propagation of BROADCAST_CHANNEL
firmware ibft: fix the display of a few fields in the NIC attribute structure in sysfs
gpio Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
gpu Merge branch 'drm-intel-next' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel
hid
hwmon
i2c
ide
idle
ieee1394
infiniband
input
isdn
leds
lguest
macintosh
mca
md
media
memstick
message
mfd
misc
mmc
mtd
net
nubus
of
oprofile
parisc
parport
pci
pcmcia
platform
pnp
power
ps3
rapidio
regulator
rtc
s390
sbus
scsi
serial
sh
sn
spi
ssb
staging
tc
telephony
thermal
uio
usb
uwb
video
virtio
w1
watchdog
xen
zorro
Kconfig
Makefile