summaryrefslogtreecommitdiff
path: root/drivers/mtd/ubi/wl.h
diff options
context:
space:
mode:
authorZhihao Cheng <chengzhihao1@huawei.com>2022-05-10 15:31:25 +0300
committerRichard Weinberger <richard@nod.at>2022-05-27 17:49:07 +0300
commit14072ee33d5a2a07d735b667205f99d0a95de9f2 (patch)
tree029651d653978cf6f28c767f4f43a2b4a29b25f6 /drivers/mtd/ubi/wl.h
parentd09e9a2bddba6c48e0fddb16c4383172ac593251 (diff)
downloadlinux-14072ee33d5a2a07d735b667205f99d0a95de9f2.tar.xz
ubi: fastmap: Check wl_pool for free peb before wear leveling
UBI fetches free peb from wl_pool during wear leveling, so UBI should check wl_pool's empty status before wear leveling. Otherwise, UBI will miss wear leveling chances when free pebs are run out. Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'drivers/mtd/ubi/wl.h')
-rw-r--r--drivers/mtd/ubi/wl.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mtd/ubi/wl.h b/drivers/mtd/ubi/wl.h
index c93a53293786..5ebe374a08ae 100644
--- a/drivers/mtd/ubi/wl.h
+++ b/drivers/mtd/ubi/wl.h
@@ -5,6 +5,8 @@
static void update_fastmap_work_fn(struct work_struct *wrk);
static struct ubi_wl_entry *find_anchor_wl_entry(struct rb_root *root);
static struct ubi_wl_entry *get_peb_for_wl(struct ubi_device *ubi);
+static struct ubi_wl_entry *next_peb_for_wl(struct ubi_device *ubi);
+static bool need_wear_leveling(struct ubi_device *ubi);
static void ubi_fastmap_close(struct ubi_device *ubi);
static inline void ubi_fastmap_init(struct ubi_device *ubi, int *count)
{