mtd: introduce the mtd_pairing_scheme concept
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Mon, 16 Nov 2015 14:53:13 +0000 (15:53 +0100)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Thu, 15 Sep 2016 14:47:56 +0000 (16:47 +0200)
MLC and TLC NAND devices are using NAND cells exposing more than one bit,
but instead of attaching all the bits in a given cell to a single NAND
page, each bit is usually attached to a different page. This concept is
called 'page pairing', and has significant impacts on the flash storage
usage.
The main problem showed by these devices is that interrupting a page
program operation may not only corrupt the page we are programming
but also the page it is paired with, hence the need to expose to MTD
users the pairing scheme information.

The pairing APIs allows one to query pairing information attached to a
given page (here called wunit), or the other way around (the wunit
pointed by pairing information).
It also provides several helpers to help the conversion between absolute
offsets and wunits, and query the number of pairing groups.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Reviewed-by: Brian Norris <computersforpeace@gmail.com>

No differences found