[PATCH 2/2] ubi: attach: do not return -EINVAL if the mtd->numeraseregions is 1

Artem Bityutskiy dedekind1 at gmail.com
Wed Aug 3 23:30:52 PDT 2016


On Fri, 2016-07-29 at 11:24 -0700, Brian Norris wrote:
> (Artem, any opinions, since you had the most opinion last time this
> came
> up?)

Hi Brian, 

well, I do not have strong opinion. That UBI translates to "I do not
know how to deal with multiple regions", nothing else.

I think this was my understanding of numeraseregions

1. numaraseregions=0: no regions, just uniform flash.

2. numeraseregions=1: basically same as above, but friendlier to the
region-aware software. Indeed, if I care about regions, I do not want
to handle the special case of numerasereions=0, I want a common case
with numerasereionts>0.

Or to put it this way, from the drivers' writer POW:

numaraseregions=0 - do not know anything about regions, do not care.
Also pre-regions dirivers, old stuff

numeraseregions=1 - I want my driver to be ideal. Non-aware SW won't
look to the regions stuff, the aware SW will work nicely.

So my take is: ban numeraseregions=1 if you feel like, but I recommend
to just document the 0 (don't care/legacy) and 1 (same as 0, but care)
and allow for both.

Artem.



More information about the linux-mtd mailing list