[RESEND PATCH v5 0/5] mtd: use ONFI bad blocks per LUN to calculate UBI bad PEB limit

Brian Norris computersforpeace at gmail.com
Tue Nov 22 10:58:35 PST 2016


On Mon, Nov 21, 2016 at 01:51:34PM -0600, Zach Brown wrote:
> For ONFI-compliant NAND devices, the ONFI parameters report the maximum number
> of bad blocks per LUN that will be encountered over the lifetime of the device,
> so we can use that information to get a more accurate (and smaller) value for
> the UBI bad PEB limit.
> 
> The ONFI parameter "maxiumum number of bad blocks per LUN" is the max number of
> bad blocks that each individual LUN will ever ecounter. It is not the number of
> bad blocks to reserve for the nand device per LUN in the device.
> 
> This means that in the worst case a UBI device spanning X LUNs will encounter
> "maximum number of bad blocks per LUN" * X bad blocks. The implementation in
> this patch assumes this worst case and allocates bad block accordingly.
> 
> These patches are ordered in terms of their dependencies, but ideally, all 5
> would need to be applied for this to work as intended.

Other than some small comments, the MTD parts look fine to me. For
patches 1, 3, 4, and 5 with my comments fixed:

Acked-by: Brian Norris <computersforpeace at gmail.com>

For the UBI part, I wasn't quite sure about the precedence among the 3
possible ways to determine the appropriate value. I'll leave that up to
Richard, et al, though.

Brian



More information about the linux-mtd mailing list