[PATCH 0/4] UBI: Use the whole NAND device to calculate max bad block number
From: Richard Genoud
Date: Tue Jul 10 2012 - 12:23:49 EST
Hi,
This patch serie applies on top of Shmulik Ladkani's patch serie:
"[PATCH 0/5] ubi: Fix bad PEBs reserve caclulation"
(and on mtd-artem git tree)
The goal here is to make UBI reserve a number of PEB for bad block dependant
of the whole NAND chipset size, and not of the MTD partition size.
As explained in patch 3/4, the NAND manufacturers only tell how many bad blocks
there will be in the worst case on a NAND device, but not that these blocks
will be equally disposed on the flash.
I.E. if a NAND flash admits at max 40 bad blocks, and is cutted in two equal
MTD partitions, it doesn't mean that there will be at max only 20 bad blocks
per partition.
The 40 BEBs could be all on the first partition.
So, for each MTD partition, UBI should reserved the maximum expected number of
bad erase blocks.
Patches 1/2/3 are making that happend with a kernel option MTD_UBI_BEB_LIMIT
Then, patch 4 replace this option with user-space parameters (kernel parameter
and a UBI_IOCATT ioctl)
The patch on mtd-utils follows the serie.
Richard Genoud (4):
mtd_is_partition: struct mtd_info should be const
MTD parts: introduce mtd_get_device_size()
UBI: use the whole MTD device size to get bad_peb_limit
UBI: replace MTD_UBI_BEB_LIMIT with user-space parameter
drivers/mtd/mtdpart.c | 16 ++++++++-
drivers/mtd/ubi/Kconfig | 19 ----------
drivers/mtd/ubi/build.c | 73 ++++++++++++++++++++++++++++++---------
drivers/mtd/ubi/cdev.c | 9 ++++-
drivers/mtd/ubi/ubi.h | 6 +++-
include/linux/mtd/partitions.h | 3 +-
include/mtd/ubi-user.h | 19 ++++++++++-
7 files changed, 104 insertions(+), 41 deletions(-)
--
1.7.2.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/