Lines Matching refs:ec
131 static int self_check_ec(struct ubi_device *ubi, int pnum, int ec);
156 if (e->ec < e1->ec) in wl_tree_add()
158 else if (e->ec > e1->ec) in wl_tree_add()
257 if (e->ec < e1->ec) in in_wl_tree()
259 else if (e->ec > e1->ec) in in_wl_tree()
291 dbg_wl("added PEB %d EC %d to the protection queue", e->pnum, e->ec); in prot_queue_add()
311 max = e->ec + diff; in find_wl_entry()
318 if (e1->ec >= max) in find_wl_entry()
354 if (last->ec - first->ec < WL_FREE_MAX_DIFF) { in find_mean_wl_entry()
393 dbg_wl("PEB %d EC %d", e->pnum, e->ec); in wl_get_wle()
436 unsigned long long ec = e->ec; in sync_erase() local
438 dbg_wl("erase PEB %d, old EC %llu", e->pnum, ec); in sync_erase()
440 err = self_check_ec(ubi, e->pnum, e->ec); in sync_erase()
452 ec += err; in sync_erase()
453 if (ec > UBI_MAX_ERASECOUNTER) { in sync_erase()
459 e->pnum, ec); in sync_erase()
464 dbg_wl("erased PEB %d, new EC %llu", e->pnum, ec); in sync_erase()
466 ec_hdr->ec = cpu_to_be64(ec); in sync_erase()
472 e->ec = ec; in sync_erase()
474 if (e->ec > ubi->max_ec) in sync_erase()
475 ubi->max_ec = e->ec; in sync_erase()
505 e->pnum, e->ec); in serve_prot_queue()
612 e->pnum, e->ec, torture); in schedule_erase()
742 if (!(e2->ec - e1->ec >= UBI_WL_THRESHOLD)) {
744 e1->ec, e2->ec);
754 e1->pnum, e1->ec, e2->pnum, e2->ec);
1011 if (!(e2->ec - e1->ec >= UBI_WL_THRESHOLD))
1071 dbg_wl("cancel erasure of PEB %d EC %d", pnum, e->ec);
1078 pnum, e->ec, wl_wrk->vol_id, wl_wrk->lnum);
1563 e->ec = aeb->ec;
1581 e->ec = aeb->ec;
1582 ubi_assert(e->ec >= 0);
1601 e->ec = aeb->ec;
1606 e->pnum, e->ec);
1610 e->pnum, e->ec);
1706 static int self_check_ec(struct ubi_device *ubi, int pnum, int ec) argument
1726 read_ec = be64_to_cpu(ec_hdr->ec);
1727 if (ec != read_ec && read_ec - ec > 1) {
1729 ubi_err(ubi, "read EC is %lld, should be %d", read_ec, ec);
1759 e->pnum, e->ec, root);
1787 e->pnum, e->ec);