Lines Matching refs:ec

138 static int self_check_ec(struct ubi_device *ubi, int pnum, int ec);
163 if (e->ec < e1->ec) in wl_tree_add()
165 else if (e->ec > e1->ec) in wl_tree_add()
264 if (e->ec < e1->ec) in in_wl_tree()
266 else if (e->ec > e1->ec) in in_wl_tree()
298 dbg_wl("added PEB %d EC %d to the protection queue", e->pnum, e->ec); in prot_queue_add()
318 max = e->ec + diff; in find_wl_entry()
325 if (e1->ec >= max) in find_wl_entry()
361 if (last->ec - first->ec < WL_FREE_MAX_DIFF) { in find_mean_wl_entry()
400 dbg_wl("PEB %d EC %d", e->pnum, e->ec); in wl_get_wle()
443 unsigned long long ec = e->ec; in sync_erase() local
445 dbg_wl("erase PEB %d, old EC %llu", e->pnum, ec); in sync_erase()
447 err = self_check_ec(ubi, e->pnum, e->ec); in sync_erase()
459 ec += err; in sync_erase()
460 if (ec > UBI_MAX_ERASECOUNTER) { in sync_erase()
466 e->pnum, ec); in sync_erase()
471 dbg_wl("erased PEB %d, new EC %llu", e->pnum, ec); in sync_erase()
473 ec_hdr->ec = cpu_to_be64(ec); in sync_erase()
479 e->ec = ec; in sync_erase()
481 if (e->ec > ubi->max_ec) in sync_erase()
482 ubi->max_ec = e->ec; in sync_erase()
512 e->pnum, e->ec); in serve_prot_queue()
590 e->pnum, e->ec, torture); in schedule_erase()
713 if (!(e2->ec - e1->ec >= UBI_WL_THRESHOLD)) {
715 e1->ec, e2->ec);
725 e1->pnum, e1->ec, e2->pnum, e2->ec);
982 if (!(e2->ec - e1->ec >= UBI_WL_THRESHOLD))
1034 pnum, e->ec, wl_wrk->vol_id, wl_wrk->lnum);
1147 dbg_wl("cancel erasure of PEB %d EC %d", e->pnum, e->ec);
1530 e->ec = aeb->ec;
1549 e->ec = aeb->ec;
1550 ubi_assert(e->ec >= 0);
1569 e->ec = aeb->ec;
1574 e->pnum, e->ec);
1578 e->pnum, e->ec);
1675 static int self_check_ec(struct ubi_device *ubi, int pnum, int ec) argument
1695 read_ec = be64_to_cpu(ec_hdr->ec);
1696 if (ec != read_ec && read_ec - ec > 1) {
1698 ubi_err(ubi, "read EC is %lld, should be %d", read_ec, ec);
1728 e->pnum, e->ec, root);
1756 e->pnum, e->ec);