Lines Matching full:free
45 wl_tree_add(e, &ubi->free); in return_unused_peb()
50 * return_unused_pool_pebs - returns unused PEB to the free tree.
79 if (!ubi->free.rb_node || (ubi->free_count - ubi->beb_rsvd_pebs < 1)) in ubi_wl_get_fm_peb()
83 e = find_anchor_wl_entry(&ubi->free); in ubi_wl_get_fm_peb()
85 e = find_mean_wl_entry(ubi, &ubi->free); in ubi_wl_get_fm_peb()
90 self_check_in_wl_tree(ubi, e, &ubi->free); in ubi_wl_get_fm_peb()
92 /* remove it from the free list, in ubi_wl_get_fm_peb()
94 rb_erase(&e->u.rb, &ubi->free); in ubi_wl_get_fm_peb()
101 * has_enough_free_count - whether ubi has enough free pebs to fill fm pools
105 * This helper function checks whether there are enough free pebs (deducted
107 * there is at least one of free pebs is filled into fm_wl_pool.
108 * For wear leveling pool, UBI should also reserve free pebs for bad pebs
109 * handling, because there maybe no enough free pebs for user volumes after
117 if (!ubi->free.rb_node) in has_enough_free_count()
147 wl_tree_add(ubi->fm_anchor, &ubi->free); in ubi_refill_pools()
154 * All available PEBs are in ubi->free, now is the time to get in ubi_refill_pools()
178 e = find_wl_entry(ubi, &ubi->free, WL_FREE_MAX_DIFF); in ubi_refill_pools()
179 self_check_in_wl_tree(ubi, e, &ubi->free); in ubi_refill_pools()
180 rb_erase(&e->u.rb, &ubi->free); in ubi_refill_pools()
199 * produce_free_peb - produce a free physical eraseblock.
202 * This function tries to make a free PEB by means of synchronous execution of
211 while (!ubi->free.rb_node && ubi->works_count) { in produce_free_peb()
259 ubi_err(ubi, "Unable to get a free PEB from user WL pool"); in ubi_wl_get_peb()
313 * UBI fetches free PEB from wl_pool, we check free PEBs from both 'wl_pool'
314 * and 'ubi->free', because free PEB in 'ubi->free' tree maybe moved into
329 if (!ubi->free.rb_node) in need_wear_leveling()
331 e = find_wl_entry(ubi, &ubi->free, WL_FREE_MAX_DIFF); in need_wear_leveling()
335 if (ubi->free.rb_node) { in need_wear_leveling()
336 e = find_wl_entry(ubi, &ubi->free, WL_FREE_MAX_DIFF); in need_wear_leveling()
388 /* See if we can find an anchor PEB on the list of free PEBs */ in ubi_ensure_anchor_pebs()