3 #ifdef CONFIG_MTD_UBI_FASTMAP
4 static int anchor_pebs_avalible(struct rb_root *root);
6 static void update_fastmap_work_fn(struct work_struct *wrk);
8 void update_fastmap_work_fn(struct ubi_device *ubi);
10 static struct ubi_wl_entry *find_anchor_wl_entry(struct rb_root *root);
11 static struct ubi_wl_entry *get_peb_for_wl(struct ubi_device *ubi);
12 static void ubi_fastmap_close(struct ubi_device *ubi);
13 static inline void ubi_fastmap_init(struct ubi_device *ubi, int *count)
15 /* Reserve enough LEBs to store two fastmaps. */
16 *count += (ubi->fm_size / ubi->leb_size) * 2;
18 INIT_WORK(&ubi->fm_work, update_fastmap_work_fn);
21 static struct ubi_wl_entry *may_reserve_for_fm(struct ubi_device *ubi,
22 struct ubi_wl_entry *e,
23 struct rb_root *root);
24 #else /* !CONFIG_MTD_UBI_FASTMAP */
25 static struct ubi_wl_entry *get_peb_for_wl(struct ubi_device *ubi);
26 static inline void ubi_fastmap_close(struct ubi_device *ubi) { }
27 static inline void ubi_fastmap_init(struct ubi_device *ubi, int *count) { }
28 static struct ubi_wl_entry *may_reserve_for_fm(struct ubi_device *ubi,
29 struct ubi_wl_entry *e,
30 struct rb_root *root) {
33 #endif /* CONFIG_MTD_UBI_FASTMAP */