UBI/UBIFS: dealing with MLC's paired pages

Artem Bityutskiy dedekind1 at gmail.com
Wed Oct 28 05:24:45 PDT 2015


On Fri, 2015-10-23 at 10:14 +0200, Boris Brezillon wrote:
> I decided to go for the simplest solution (but I can't promise I
> won't
> change my mind if this approach appears to be wrong), which is either
> using a LEB is MLC or SLC mode. In SLC modes, only the first page of
> each pair is used, which completely address the paired pages problem.
> For now the SLC mode logic is hidden in the MTD/NAND layers which are
> providing functions to write/read in SLC mode.

Most of the writes go through the journalling subsystem.

There are some non-journal writes, related to internal meta-date
management, like from other subsystems: log, the master node, LPT,
index, GC.

In case of journal subsystem, in MLC mode you just skip pages every
time the "flush write-buffer" API call is used.

In LPT subsystem, you invent a custom solution, skip pages as needed.

In master - probably nothing needs to be done, since we have 2 copies.

Index, GC - data also goes via journal, so the journal subsystem
solution will probably cover it.


> Thanks to this differentiation, UBI is now exposing two kind of LEBs:
> - the secure (small) LEBS (those accessed in SLC mode)
> - the unsecure (big) LEBS (those accessed in MLC mode)

Is this really necessary? Feels like a bit of over-complication to the
UBI layer.

Can UBI care about itself WRT MLC safeness, and let UBIFS care about
itself?




More information about the linux-mtd mailing list