Lines Matching refs:erase
27 * erased are put to the @erase list.
47 * the reason is a power cut, UBI puts this PEB to the @erase list, and all
48 * PEBs in the @erase list are scheduled for erasure later.
64 * to just erase this PEB - this is corruption type 1.
171 * @ec: erase counter of the physical eraseblock
214 * @ec: erase counter of the physical eraseblock
219 * eraseblock @pnum and adds it to the "free", "erase", or "alien" lists.
224 * PEBs (corrupted due to power cuts) to the head of the erase list to make
225 * sure we erase them first and get rid of corruptions ASAP. This function
236 } else if (list == &ai->erase) {
237 dbg_bld("add to erase: PEB %d, EC %d", pnum, ec);
261 * @ec: erase counter of the physical eraseblock
288 * @ec: erase counter of the physical eraseblock
552 * @ec: erase counter
652 &ai->erase);
675 cmp_res & 4, &ai->erase);
754 destroy_av(ai, av, &ai->erase);
759 * early_erase_peb - erase a physical eraseblock.
762 * @pnum: physical eraseblock number to erase;
763 * @ec: erase counter value to write (%UBI_UNKNOWN if it is unknown)
765 * This function erases physical eraseblock 'pnum', and writes the erase
780 * erase counters internally.
782 ubi_err(ubi, "erase counter overflow at PEB %d, EC %d",
832 * We try to erase the first physical eraseblock from the erase list
833 * and pick it if we succeed, or try to erase the next one if not. And
837 list_for_each_entry_safe(aeb, tmp_aeb, &ai->erase, u.list) {
868 * If the corruption reason was a power cut, UBI can safely erase this PEB.
973 UBI_UNKNOWN, 0, &ai->erase);
977 UBI_UNKNOWN, 1, &ai->erase);
1011 * flash. Upgrade UBI and use 64-bit erase counters
1014 ubi_err(ubi, "erase counter overflow, max is %d",
1084 * contains garbage because of a power cut during erase
1104 UBI_UNKNOWN, ec, 1, &ai->erase);
1113 ec, 1, &ai->erase);
1120 UBI_UNKNOWN, ec, 1, &ai->erase);
1144 ec, 1, &ai->erase);
1321 list_for_each_entry_safe(aeb, aeb_tmp, &ai->erase, u.list) {
1403 /* Calculate mean erase counter */
1412 * In case of unknown erase counter we use the mean erase counter
1430 list_for_each_entry(aeb, &ai->erase, u.list)
1460 INIT_LIST_HEAD(&ai->erase);
1886 list_for_each_entry(aeb, &ai->erase, u.list)