[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150507032712.GA6055@norris-Latitude-E6410>
Date: Wed, 6 May 2015 20:27:12 -0700
From: Brian Norris <computersforpeace@...il.com>
To: Jonas Gorski <jogo@...nwrt.org>
Cc: Ben Shelton <ben.shelton@...com>,
MTD Maling List <linux-mtd@...ts.infradead.org>,
David Woodhouse <dwmw2@...radead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Jeff Westfahl <jeff.westfahl@...com>
Subject: Re: [PATCH] mtd: Introduce CONFIG_MTD_RESERVE_END
On Fri, May 01, 2015 at 01:57:13PM +0200, Jonas Gorski wrote:
> On Thu, Apr 30, 2015 at 7:36 PM, Ben Shelton <ben.shelton@...com> wrote:
> > The reason for doing this as a Kconfig option rather than with an additional
> > partition is that we use the same .itb boot image (and kernel arguments) for
> > a series of embedded controllers that have different NAND flash sizes, and we
> > use the '-' command line parameter to give the root partition all the available
> > space after the other partitions.
>
> Wouldn't it make more sense to make cmdlineparts to recognize if it is
> run on a nand flash that has on-flash BBT enabled, and then reduce the
> SIZE_REMAINING partition's size by the amount of nand_bbt_descr's
> maxblocks * erase block size?
That's a possibility, but that seems like a bit too much hidden policy
to add on top of the cmdlineparts format, which is pretty precise.
A better improvement, if you're dead set on using cmdlineparts rather
than some other better parser, might be to support something like:
mtdparts=name:-(main),bbt(1M)
So the "remaining space" partition will allow for following partitions.
IOW, you would need to handle this case, which is currently an error:
/* test if more partitions are following */
if (*s == ',') {
if (size == SIZE_REMAINING) {
printk(KERN_ERR ERRP "no partitions allowed after a fill-up partition\n");
return ERR_PTR(-EINVAL);
}
...
}
> Currently your proposed solution would break if boards have differing
> erase block sizes, or if some have NOR flash, which makes it an option
> for a rather narrow use case IMHO.
Yeah, consider this a NAK for the current patch.
Brian
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists