aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/build.c
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2014-10-08 14:55:58 +0200
committerRichard Weinberger <richard@nod.at>2015-03-26 22:46:00 +0100
commit68e3226bd4e05c4be1f6286e4e708e1163ffa092 (patch)
treeb6ab8d05e5ee883361718df5c162541f1bab6108 /drivers/mtd/ubi/build.c
parentUBI: Fastmap: Switch to ro mode if invalidate_fastmap() fails (diff)
downloadlinux-dev-68e3226bd4e05c4be1f6286e4e708e1163ffa092.tar.xz
linux-dev-68e3226bd4e05c4be1f6286e4e708e1163ffa092.zip
UBI: Fastmap: Make WL pool size 50% of user pool size
Don't use a fixed size for the WL pool. Make it instead 50% of the user pool. We don't make it 100% as it is not as heavily used as the user pool. Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'drivers/mtd/ubi/build.c')
-rw-r--r--drivers/mtd/ubi/build.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index 112a66c65966..59af91b41f9a 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -949,7 +949,7 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,
if (ubi->fm_pool.max_size < UBI_FM_MIN_POOL_SIZE)
ubi->fm_pool.max_size = UBI_FM_MIN_POOL_SIZE;
- ubi->fm_wl_pool.max_size = UBI_FM_WL_POOL_SIZE;
+ ubi->fm_wl_pool.max_size = ubi->fm_pool.max_size / 2;
ubi->fm_disabled = !fm_autoconvert;
if (!ubi->fm_disabled && (int)mtd_div_by_eb(ubi->mtd->size, ubi->mtd)