remarkable-linux/drivers
Artem B. Bityutskiy 801c135ce7 UBI: Unsorted Block Images
UBI (Latin: "where?") manages multiple logical volumes on a single
flash device, specifically supporting NAND flash devices. UBI provides
a flexible partitioning concept which still allows for wear-levelling
across the whole flash device.

In a sense, UBI may be compared to the Logical Volume Manager
(LVM). Whereas LVM maps logical sector numbers to physical HDD sector
numbers, UBI maps logical eraseblocks to physical eraseblocks.

More information may be found at
http://www.linux-mtd.infradead.org/doc/ubi.html

Partitioning/Re-partitioning

  An UBI volume occupies a certain number of erase blocks. This is
  limited by a configured maximum volume size, which could also be
  viewed as the partition size. Each individual UBI volume's size can
  be changed independently of the other UBI volumes, provided that the
  sum of all volume sizes doesn't exceed a certain limit.

  UBI supports dynamic volumes and static volumes. Static volumes are
  read-only and their contents are protected by CRC check sums.

Bad eraseblocks handling

  UBI transparently handles bad eraseblocks. When a physical
  eraseblock becomes bad, it is substituted by a good physical
  eraseblock, and the user does not even notice this.

Scrubbing

  On a NAND flash bit flips can occur on any write operation,
  sometimes also on read. If bit flips persist on the device, at first
  they can still be corrected by ECC, but once they accumulate,
  correction will become impossible. Thus it is best to actively scrub
  the affected eraseblock, by first copying it to a free eraseblock
  and then erasing the original. The UBI layer performs this type of
  scrubbing under the covers, transparently to the UBI volume users.

Erase Counts

  UBI maintains an erase count header per eraseblock. This frees
  higher-level layers (like file systems) from doing this and allows
  for centralized erase count management instead. The erase counts are
  used by the wear-levelling algorithm in the UBI layer. The algorithm
  itself is exchangeable.

Booting from NAND

  For booting directly from NAND flash the hardware must at least be
  capable of fetching and executing a small portion of the NAND
  flash. Some NAND flash controllers have this kind of support. They
  usually limit the window to a few kilobytes in erase block 0. This
  "initial program loader" (IPL) must then contain sufficient logic to
  load and execute the next boot phase.

  Due to bad eraseblocks, which may be randomly scattered over the
  flash device, it is problematic to store the "secondary program
  loader" (SPL) statically. Also, due to bit-flips it may become
  corrupted over time. UBI allows to solve this problem gracefully by
  storing the SPL in a small static UBI volume.

UBI volumes vs. static partitions

  UBI volumes are still very similar to static MTD partitions:

    * both consist of eraseblocks (logical eraseblocks in case of UBI
      volumes, and physical eraseblocks in case of static partitions;
    * both support three basic operations - read, write, erase.

  But UBI volumes have the following advantages over traditional
  static MTD partitions:

    * there are no eraseblock wear-leveling constraints in case of UBI
      volumes, so the user should not care about this;
    * there are no bit-flips and bad eraseblocks in case of UBI volumes.

  So, UBI volumes may be considered as flash devices with relaxed
  restrictions.

Where can it be found?

  Documentation, kernel code and applications can be found in the MTD
  gits.

What are the applications for?

  The applications help to create binary flash images for two purposes: pfi
  files (partial flash images) for in-system update of UBI volumes, and plain
  binary images, with or without OOB data in case of NAND, for a manufacturing
  step. Furthermore some tools are/and will be created that allow flash content
  analysis after a system has crashed..

Who did UBI?

  The original ideas, where UBI is based on, were developed by Andreas
  Arnez, Frank Haverkamp and Thomas Gleixner. Josh W. Boyer and some others
  were involved too. The implementation of the kernel layer was done by Artem
  B. Bityutskiy. The user-space applications and tools were written by Oliver
  Lohmann with contributions from Frank Haverkamp, Andreas Arnez, and Artem.
  Joern Engel contributed a patch which modifies JFFS2 so that it can be run on
  a UBI volume. Thomas Gleixner did modifications to the NAND layer. Alexander
  Schmidt made some testing work as well as core functionality improvements.

Signed-off-by: Artem B. Bityutskiy <dedekind@linutronix.de>
Signed-off-by: Frank Haverkamp <haver@vnet.ibm.com>
2007-04-27 14:23:33 +03:00
..
acorn [ARM] Acorn: move the i2c bus driver into drivers/i2c 2007-03-04 20:40:50 +00:00
acpi acpi-thermal: fix mod_timer() interval 2007-04-24 08:23:08 -07:00
amba
ata pata_sis: Fix oops on boot 2007-04-19 19:20:52 -04:00
atm [PATCH] zatm __init abuse 2007-03-14 15:27:49 -07:00
auxdisplay [PATCH] cfag12864b: fix crash when built-in and no parport present 2007-02-20 17:10:14 -08:00
base [PATCH] PM: use kobject_name() to access kobject names 2007-04-11 15:39:39 -07:00
block packet: fix error handling 2007-04-25 13:50:55 -07:00
bluetooth [Bluetooth] Make use of MODULE_FIRMWARE 2007-02-26 11:42:42 -08:00
cdrom [PATCH] Fix soft lockup with iSeries viocd driver 2007-03-05 07:57:51 -08:00
char Char: mxser, fix TIOCMIWAIT 2007-04-24 08:23:08 -07:00
clocksource [PATCH] correct slow acpi_pm rating 2007-03-27 09:05:15 -07:00
connector [CONNECTOR]: Bugfix for cn_call_callback() 2007-03-07 16:08:08 -08:00
cpufreq [PATCH] Fix maxcpus=1 trigerring BUG() in cpufreq 2007-03-27 08:55:56 -07:00
crypto [PATCH] geode-aes: use unsigned long for spin_lock_irqsave 2007-03-06 09:30:25 -08:00
dio
dma [PATCH] rm pointless dmaengine exports 2007-03-16 19:25:03 -07:00
edac [PATCH] EDAC: Add Fully-Buffered DIMM APIs to core 2007-02-12 09:48:32 -08:00
eisa [PATCH] drivers/eisa/pci_eisa.c:pci_eisa_init() should be init 2007-03-27 09:05:15 -07:00
fc4 [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
firmware [PATCH] docbook: add edd firmware interfaces 2007-02-11 10:51:32 -08:00
hid HID: Do not discard truncated input reports 2007-04-05 16:06:30 +02:00
hwmon hwmon/w83627ehf: Don't redefine REGION_OFFSET 2007-04-24 08:23:08 -07:00
i2c Minor bug fixes to i2c-pasemi 2007-04-17 16:36:28 -07:00
ide ide/Kconfig: add missing range check for IDE_MAX_HWIFS 2007-04-20 22:16:58 +02:00
ieee1394 ieee1394: change deprecation status of dv1394 2007-04-09 18:52:27 +02:00
infiniband IB/mthca: Fix data corruption after FMR unmap on Sinai 2007-04-16 14:10:55 -07:00
input [PATCH] Input: ucb1400 - set up driver's name to show in sysfs 2007-04-10 17:26:33 -07:00
isdn [PATCH] drivers/isdn/gigaset: mark some static data as const (v2) 2007-03-29 08:22:25 -07:00
kvm KVM: Fix off-by-one when writing to a nonpae guest pde 2007-04-19 18:39:26 +03:00
leds leds: Add support for Cobalt Server front LED 2007-02-15 21:37:29 +00:00
macintosh drivers/macintosh/smu.c: fix locking snafu 2007-04-17 16:36:27 -07:00
mca
md [PATCH] md: fix calculation for size of filemap_attr array in md/bitmap 2007-04-12 15:31:42 -07:00
media DVB: dvb-usb-remote - fix oops when changing keymap 2007-04-13 18:35:39 -07:00
message Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6 2007-03-27 10:06:30 -07:00
mfd [PATCH] drivers/mfd/sm501.c: fix an off-by-one 2007-04-02 10:06:08 -07:00
misc asus-laptop: make code static 2007-03-09 21:06:40 -05:00
mmc [ARM] 4256/1: i.MX/MX1 SDHC fix/workaround of SD card recognition problems 2007-03-12 16:49:37 +00:00
mtd UBI: Unsorted Block Images 2007-04-27 14:23:33 +03:00
net Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2007-04-24 18:20:32 -07:00
nubus
oprofile [PATCH] oprofile: fix potential deadlock on oprofilefs_lock 2007-03-28 13:58:02 -07:00
parisc Merge master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6 2007-02-26 12:48:06 -08:00
parport [PARPORT] SUNBPP: Fix OOPS when debugging is enabled. 2007-04-23 23:33:17 -07:00
pci Revert "adjust legacy IDE resource setting (v2)" 2007-04-23 23:19:36 +02:00
pcmcia [PATCH] omap_cf: oops-on-suspend fix 2007-04-08 19:47:55 -07:00
pnp [PATCH] Correctly report PnP 64bit resources 2007-04-02 10:06:08 -07:00
ps3 [PATCH] C99 initializers, proper use of const in drivers/ps3 2007-03-14 15:27:50 -07:00
rapidio [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
rtc [PATCH] rtc-cmos lockdep fix, irq updates 2007-04-02 10:06:09 -07:00
s390 [S390] cio: Fix handling of interrupt for csch(). 2007-04-04 14:37:39 +02:00
sbus [SPARC] openprom: Switch to ref counting PCI API 2007-04-23 22:50:53 -07:00
scsi Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 2007-04-14 21:41:12 -07:00
serial 8250: fix possible deadlock between serial8250_handle_port() and serial8250_interrupt() 2007-04-24 08:23:09 -07:00
sh
sn [PATCH] IOC3/IOC4: PCI mem space resources 2007-02-11 10:51:25 -08:00
spi spi: fix use of set_cs in spi_s3c24xx driver 2007-04-17 16:36:27 -07:00
tc [PATCH] Fix build error on zs serial driver 2007-04-04 21:12:47 -07:00
telephony [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
usb usb-net/pegasus: fix pegasus carrier detection 2007-04-24 12:46:31 -04:00
video Fix spelling in drivers/video/Kconfig 2007-04-24 08:23:08 -07:00
w1 [PATCH] w1: Use ARRAY_SIZE macro when appropriate 2007-02-12 09:48:28 -08:00
zorro [PATCH] mark struct file_operations const 6 2007-02-12 09:48:45 -08:00
Kconfig [PATCH] drivers: add LCD support 2007-02-11 10:51:24 -08:00
Makefile [PATCH] drivers: add LCD support 2007-02-11 10:51:24 -08:00