Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 68e3226b authored by Richard Weinberger's avatar Richard Weinberger
Browse files

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: default avatarRichard Weinberger <richard@nod.at>
parent 2d93fb36
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -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)
	if (ubi->fm_pool.max_size < UBI_FM_MIN_POOL_SIZE)
		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;
	ubi->fm_disabled = !fm_autoconvert;


	if (!ubi->fm_disabled && (int)mtd_div_by_eb(ubi->mtd->size, ubi->mtd)
	if (!ubi->fm_disabled && (int)mtd_div_by_eb(ubi->mtd->size, ubi->mtd)
+0 −2
Original line number Original line Diff line number Diff line
@@ -403,8 +403,6 @@ struct ubi_vtbl_record {
#define UBI_FM_MIN_POOL_SIZE	8
#define UBI_FM_MIN_POOL_SIZE	8
#define UBI_FM_MAX_POOL_SIZE	256
#define UBI_FM_MAX_POOL_SIZE	256


#define UBI_FM_WL_POOL_SIZE	25

/**
/**
 * struct ubi_fm_sb - UBI fastmap super block
 * struct ubi_fm_sb - UBI fastmap super block
 * @magic: fastmap super block magic number (%UBI_FM_SB_MAGIC)
 * @magic: fastmap super block magic number (%UBI_FM_SB_MAGIC)