[U-Boot] [PATCH 4/4 v2] mtdparts: new add.e: add part skipping bad blocks

Scott Wood
2010-08-09T18:51:37Z

On Mon, 9 Aug 2010 14:39:20 -0400
Ben Gardiner <bengardiner@nanometrics.ca> wrote:

> Hi Scott,
>
> On Mon, Aug 9, 2010 at 2:25 PM, Scott Wood <scottwood@freescale.com> wrote:
> > On Wed, 2 Jun 2010 11:58:39 -0400
> > Ben Gardiner <bengardiner@nanometrics.ca> wrote:
> >
> >> This patch adds a new 'mtdparts add' variant: add.e (with a synomym add.i).
> >
> > Why multiple ways to say the same thing, in a new command with no
> > legacy to be compatible with?
>
> Just mimicking the add syntax.
>
> > Even on the commands where .e and .i used to do something, that's now
> > the default, and the suffix is unnecessary. ?So I don't see any need to
> > mimic the syntax.
>
> Ok. No objection here.
>
> > What do "e" and "i" even stand for? ?It looks like they were "for
> > compatibility with older units" even when first committed.
>
> I don't really know. Should I stick with 'add.e' or would you prefer
> 'add.spread' 'add.skip' or something else?

".spread" is nice if it matches what the "mtdparts spread" command does
to existing partitions, but ".skip" might make sense in other contexts
that we want to be consistent with. For instance, we probably want to
do something with the "nand erase" command to differentiate clearing
space for a certain amount of data (e.g. $filesize) versus erasing a
partition (where the bad blocks should already be included in the size).

Since the consistency arguments mostly cancel out, I'd go with
".spread", since it's different from read/write/erase in that you're
not quite skipping anything, but incorporating room for the bad blocks
into the partition.

-Scott