Lines Matching refs:e1

145 		struct ubi_wl_entry *e1;  in wl_tree_add()  local
148 e1 = rb_entry(parent, struct ubi_wl_entry, u.rb); in wl_tree_add()
150 if (e->ec < e1->ec) in wl_tree_add()
152 else if (e->ec > e1->ec) in wl_tree_add()
155 ubi_assert(e->pnum != e1->pnum); in wl_tree_add()
156 if (e->pnum < e1->pnum) in wl_tree_add()
242 struct ubi_wl_entry *e1; in in_wl_tree() local
244 e1 = rb_entry(p, struct ubi_wl_entry, u.rb); in in_wl_tree()
246 if (e->pnum == e1->pnum) { in in_wl_tree()
247 ubi_assert(e == e1); in in_wl_tree()
251 if (e->ec < e1->ec) in in_wl_tree()
253 else if (e->ec > e1->ec) in in_wl_tree()
256 ubi_assert(e->pnum != e1->pnum); in in_wl_tree()
257 if (e->pnum < e1->pnum) in in_wl_tree()
330 struct ubi_wl_entry *e1; in find_wl_entry() local
332 e1 = rb_entry(p, struct ubi_wl_entry, u.rb); in find_wl_entry()
333 if (e1->ec >= max) in find_wl_entry()
337 e = e1; in find_wl_entry()
651 struct ubi_wl_entry *e1, *e2; local
690 e1 = find_anchor_wl_entry(&ubi->used);
691 if (e1 && ubi->fm_next_anchor &&
692 (ubi->fm_next_anchor->ec - e1->ec >= UBI_WL_THRESHOLD)) {
705 if (!e1)
711 self_check_in_wl_tree(ubi, e1, &ubi->used);
712 rb_erase(&e1->u.rb, &ubi->used);
713 dbg_wl("anchor-move PEB %d to PEB %d", e1->pnum, e2->pnum);
724 e1 = rb_entry(rb_first(&ubi->used), struct ubi_wl_entry, u.rb);
729 if (!(e2->ec - e1->ec >= UBI_WL_THRESHOLD)) {
731 e1->ec, e2->ec);
738 self_check_in_wl_tree(ubi, e1, &ubi->used);
739 rb_erase(&e1->u.rb, &ubi->used);
741 e1->pnum, e1->ec, e2->pnum, e2->ec);
745 e1 = rb_entry(rb_first(&ubi->scrub), struct ubi_wl_entry, u.rb);
750 self_check_in_wl_tree(ubi, e1, &ubi->scrub);
751 rb_erase(&e1->u.rb, &ubi->scrub);
752 dbg_wl("scrub PEB %d to PEB %d", e1->pnum, e2->pnum);
755 ubi->move_from = e1;
770 err = ubi_io_read_vid_hdr(ubi, e1->pnum, vidb, 0);
784 dbg_wl("PEB %d has no VID header", e1->pnum);
794 e1->pnum);
804 e1->pnum);
810 err, e1->pnum);
817 err = ubi_eba_copy_leb(ubi, e1->pnum, e2->pnum, vidb);
874 e1->pnum, vol_id, lnum, e2->pnum);
886 err = do_sync_erase(ubi, e1, vol_id, lnum, 0);
918 e1->pnum, vol_id, lnum, e2->pnum, err);
921 e1->pnum, e2->pnum, err);
924 prot_queue_add(ubi, e1);
926 wl_tree_add(e1, &ubi->erroneous);
929 wl_tree_add(e1, &ubi->scrub);
931 wl_tree_add(e1, &ubi->used);
952 err = do_sync_erase(ubi, e1, vol_id, lnum, 1);
964 err, e1->pnum, e2->pnum);
967 err, e1->pnum, vol_id, lnum, e2->pnum);
974 wl_entry_destroy(ubi, e1);
1005 struct ubi_wl_entry *e1; local
1029 e1 = rb_entry(rb_first(&ubi->used), struct ubi_wl_entry, u.rb);
1032 if (!(e2->ec - e1->ec >= UBI_WL_THRESHOLD))