diff options
author | Zhihao Cheng <chengzhihao1@huawei.com> | 2023-08-28 09:38:38 +0300 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2023-10-28 23:41:01 +0300 |
commit | 8ff4e620ac93a5d332735e4f5a4ff31d80682b9a (patch) | |
tree | c5ec2b47c06be628c7e8e549c757e6d4a321bafc /drivers/mtd/ubi/wl.c | |
parent | c19286d70aaa361cdb073a68a1f66232c359e2fd (diff) | |
download | linux-8ff4e620ac93a5d332735e4f5a4ff31d80682b9a.tar.xz |
ubi: fastmap: Use free pebs reserved for bad block handling
If new bad PEBs occur, UBI firstly consumes ubi->beb_rsvd_pebs, and then
ubi->avail_pebs, finally UBI becomes read-only if above two items are 0,
which means that the amount of PEBs for user volumes is not effected.
Besides, UBI reserves count of free PBEs is ubi->beb_rsvd_pebs while
filling wl pool or getting free PEBs, but ubi->avail_pebs is not reserved.
So ubi->beb_rsvd_pebs and ubi->avail_pebs have nothing to do with the
usage of free PEBs, UBI can use all free PEBs.
Commit 78d6d497a648 ("UBI: Move fastmap specific functions out of wl.c")
has removed beb_rsvd_pebs checking while filling pool. Now, don't reserve
ubi->beb_rsvd_pebs while filling wl_pool. This will fill more PEBs in pool
and also reduce fastmap updating frequency.
Also remove beb_rsvd_pebs checking in ubi_wl_get_fm_peb.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217787
Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'drivers/mtd/ubi/wl.c')
0 files changed, 0 insertions, 0 deletions