Patchwork [v3,2/6] UBI: change CONFIG_MTD_UBI_BEB_LIMIT range

login
register
mail settings
Submitter Richard Genoud
Date Aug. 20, 2012, 4 p.m.
Message ID <1345478416-23900-3-git-send-email-richard.genoud@gmail.com>
Download mbox | patch
Permalink /patch/178867/
State New
Headers show

Comments

Richard Genoud - Aug. 20, 2012, 4 p.m.
There's no reason to limit MTD_UBI_BEB_LIMIT to 256 (25%), let's set it
to 768 (75%) this should be enough.
And the lower bound can be 0, no reason to forbid it (even if it will be
reserved for test purpose only I guess).

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
---
 drivers/mtd/ubi/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Artem Bityutskiy - Aug. 20, 2012, 7:03 p.m.
On Mon, 2012-08-20 at 18:00 +0200, Richard Genoud wrote:
> There's no reason to limit MTD_UBI_BEB_LIMIT to 256 (25%), let's set it
> to 768 (75%) this should be enough.
> And the lower bound can be 0, no reason to forbid it (even if it will be
> reserved for test purpose only I guess).
> 
> Signed-off-by: Richard Genoud <richard.genoud@gmail.com>

I've folded this patch into
"UBI: use the whole MTD device size to get bad_peb_limit"
instead. Yes, I know that value 0 is not handled at that point, but I
think it is not a big problem (AKA good enough). Certainly not worth a
separate patch.

Thanks!

Patch

diff --git a/drivers/mtd/ubi/Kconfig b/drivers/mtd/ubi/Kconfig
index 9ee92d6..dcbaae3 100644
--- a/drivers/mtd/ubi/Kconfig
+++ b/drivers/mtd/ubi/Kconfig
@@ -30,7 +30,7 @@  config MTD_UBI_WL_THRESHOLD
 config MTD_UBI_BEB_LIMIT
 	int "Maximum expected bad eraseblock count per 1024 eraseblocks"
 	default 20
-	range 1 256
+	range 0 768
 	help
 	  This option specifies the maximum bad physical eraseblocks UBI
 	  expects on the MTD device (per 1024 eraseblocks). If the underlying