Lines Matching defs:erase

12  * physical eraseblocks and erase counters and knows nothing about logical
18 * Physical eraseblocks returned by 'ubi_wl_get_peb()' have only erase counter
27 * physical eraseblocks with low erase counter to free physical eraseblocks
28 * with high erase counter.
30 * If the WL sub-system fails to erase a physical eraseblock, it marks it as
56 * measured in erase cycles in this case. This is implemented with help of the
59 * head of the queue on each erase operation (for any eraseblock). So the
60 * length of the queue defines how may (global) erase cycles PEBs are protected.
82 * example, when we move a PEB with low erase counter, and we need to pick the
99 * Maximum difference between two erase counters. If this threshold is
101 * eraseblocks with low erase counter to free physical eraseblocks with high
102 * erase counter.
109 * one with the highest erase counter. But in certain workloads this could lead
112 * data is written to it. So, we have a constant which limits the highest erase
114 * does not pick eraseblocks with erase counter greater than the lowest erase
136 * Note, we use (erase counter, physical eraseblock number) pairs as keys in
294 * @e will stay for %UBI_PROT_QUEUE_LEN erase operations and will be
310 * find_wl_entry - find wear-leveling entry closest to certain erase counter.
313 * @diff: maximum possible difference from the smallest erase counter
315 * This function looks for a wear leveling entry with erase counter closest to
316 * min + @diff, where min is the smallest erase counter.
345 * find_mean_wl_entry - find wear-leveling entry with medium erase counter.
349 * This function looks for a wear leveling entry with medium erase counter,
350 * but not greater or equivalent than the lowest erase counter plus
430 * sync_erase - synchronously erase a physical eraseblock.
432 * @e: the the physical eraseblock to erase
445 dbg_wl("erase PEB %d, old EC %llu", e->pnum, ec);
463 * erase counters internally.
465 ubi_err(ubi, "erase counter overflow at PEB %d, EC %llu",
494 * This function is called after each erase operation and removes PEBs from the
572 * schedule_erase - schedule an erase work.
574 * @e: the WL entry of the physical eraseblock to erase
612 * do_sync_erase - run the erase worker synchronously.
614 * @e: the WL entry of the physical eraseblock to erase
625 dbg_wl("sync erase of PEB %i", e->pnum);
651 int erase = 0, keep = 0, vol_id = -1, lnum = -1;
722 * highly worn-out free physical eraseblock. If the erase
806 erase = 1;
902 dbg_wl("PEB %d (LEB %d:%d) was put meanwhile, erase",
955 if (erase) {
1029 * lowest erase counter of used physical eraseblocks and a high
1030 * erase counter of free physical eraseblocks is greater than
1067 * __erase_worker - physical eraseblock erase worker function.
1084 dbg_wl("erase PEB %d EC %d LEB %d:%d",
1107 * One more erase operation has happened, take care about
1117 ubi_err(ubi, "failed to erase PEB %d, error %d", pnum, err);
1503 * erase worker frees a wl entry under us.
1723 * erase_aeb - erase a PEB given in UBI attach info PEB
1726 * @sync: If true, erase synchronously. Otherwise schedule for erasure
1797 list_for_each_entry_safe(aeb, tmp, &ai->erase, u.list) {
1882 * find any outdated fastmap anchors, hence we erase the
1970 * self_check_ec - make sure that the erase counter of a PEB is correct.
1973 * @ec: the erase counter to check
1975 * This function returns zero if the erase counter of physical eraseblock @pnum