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
300 * @e will stay for %UBI_PROT_QUEUE_LEN erase operations and will be
316 * find_wl_entry - find wear-leveling entry closest to certain erase counter.
319 * @diff: maximum possible difference from the smallest erase counter
320 * @pick_max: pick PEB even its erase counter beyonds 'min_ec + @diff'
322 * This function looks for a wear leveling entry with erase counter closest to
323 * min + @diff, where min is the smallest erase counter.
355 * find_mean_wl_entry - find wear-leveling entry with medium erase counter.
359 * This function looks for a wear leveling entry with medium erase counter,
360 * but not greater or equivalent than the lowest erase counter plus
443 * ubi_sync_erase - synchronously erase a physical eraseblock.
445 * @e: the physical eraseblock to erase
457 dbg_wl("erase PEB %d, old EC %llu", e->pnum, ec);
475 * erase counters internally.
477 ubi_err(ubi, "erase counter overflow at PEB %d, EC %llu",
506 * This function is called after each erase operation and removes PEBs from the
584 * schedule_erase - schedule an erase work.
586 * @e: the WL entry of the physical eraseblock to erase
624 * do_sync_erase - run the erase worker synchronously.
626 * @e: the WL entry of the physical eraseblock to erase
637 dbg_wl("sync erase of PEB %i", e->pnum);
663 int erase = 0, keep = 0, vol_id = -1, lnum = -1;
738 * highly worn-out free physical eraseblock. If the erase
822 erase = 1;
918 dbg_wl("PEB %d (LEB %d:%d) was put meanwhile, erase",
971 if (erase) {
1050 * lowest erase counter of used physical eraseblocks and a high
1051 * erase counter of free physical eraseblocks is greater than
1089 * __erase_worker - physical eraseblock erase worker function.
1106 dbg_wl("erase PEB %d EC %d LEB %d:%d",
1129 * One more erase operation has happened, take care about
1139 ubi_err(ubi, "failed to erase PEB %d, error %d", pnum, err);
1525 * erase worker frees a wl entry under us.
1745 * erase_aeb - erase a PEB given in UBI attach info PEB
1748 * @sync: If true, erase synchronously. Otherwise schedule for erasure
1819 list_for_each_entry_safe(aeb, tmp, &ai->erase, u.list) {
1904 * find any outdated fastmap anchors, hence we erase the
1992 * self_check_ec - make sure that the erase counter of a PEB is correct.
1995 * @ec: the erase counter to check
1997 * This function returns zero if the erase counter of physical eraseblock @pnum