[lkml]   [2016]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v3] mtd: introduce the mtd_pairing_scheme concept
On Thu, Sep 15, 2016 at 05:05:29PM +0200, Boris Brezillon wrote:
> 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 <>
> Reviewed-by: Brian Norris <>
> ---
> Hi Brian,
> Here is a new version addressing your comments.
> If you're okay with this version, you can directly pull the
> 4.9/mtd-pairing-scheme tag [1] into your tree (it's based on 4.8-rc1).

I never found where '[1]' was pointing, but I did pull
4.9/mtd-pairing-scheme from into


> Changes since v2:
> - fix documentation
> - make API consistent by returning error codes and adding bounds
> checking everywhere
> - drop NAND pairing scheme patches (will be resubmitted after
> this patch has been merged)
> Changes since v1:
> - document the paring scheme concepts and the associate structures and
> helpers
> - rework the dist3 and dist6 implementation according to George
> comments
> - introduce the mtd_set_pairing_scheme() helper to avoid directly
> manipulating the mtd->pairing field
> - drop the patch assigning dist6 pairing scheme to the H27UCG8T2ATR
> NAND (in the light of George comment I'm not longer sure this scheme
> is suitable for this NAND, and I can't test it)
> drivers/mtd/mtdcore.c | 104 ++++++++++++++++++++++++++++++++++++++++++++++
> drivers/mtd/mtdpart.c | 1 +
> include/linux/mtd/mtd.h | 107 ++++++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 212 insertions(+)

 \ /
  Last update: 2016-10-09 06:01    [W:0.039 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site