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()
652 struct ubi_wl_entry *e1, *e2; local
691 e1 = find_anchor_wl_entry(&ubi->used);
692 if (e1 && ubi->fm_next_anchor &&
693 (ubi->fm_next_anchor->ec - e1->ec >= UBI_WL_THRESHOLD)) {
706 if (!e1)
712 self_check_in_wl_tree(ubi, e1, &ubi->used);
713 rb_erase(&e1->u.rb, &ubi->used);
714 dbg_wl("anchor-move PEB %d to PEB %d", e1->pnum, e2->pnum);
725 e1 = rb_entry(rb_first(&ubi->used), struct ubi_wl_entry, u.rb);
730 if (!(e2->ec - e1->ec >= UBI_WL_THRESHOLD)) {
732 e1->ec, e2->ec);
739 self_check_in_wl_tree(ubi, e1, &ubi->used);
740 rb_erase(&e1->u.rb, &ubi->used);
742 e1->pnum, e1->ec, e2->pnum, e2->ec);
746 e1 = rb_entry(rb_first(&ubi->scrub), struct ubi_wl_entry, u.rb);
751 self_check_in_wl_tree(ubi, e1, &ubi->scrub);
752 rb_erase(&e1->u.rb, &ubi->scrub);
753 dbg_wl("scrub PEB %d to PEB %d", e1->pnum, e2->pnum);
756 ubi->move_from = e1;
771 err = ubi_io_read_vid_hdr(ubi, e1->pnum, vidb, 0);
785 dbg_wl("PEB %d has no VID header", e1->pnum);
795 e1->pnum);
805 e1->pnum);
811 err, e1->pnum);
818 err = ubi_eba_copy_leb(ubi, e1->pnum, e2->pnum, vidb);
875 e1->pnum, vol_id, lnum, e2->pnum);
887 err = do_sync_erase(ubi, e1, vol_id, lnum, 0);
919 e1->pnum, vol_id, lnum, e2->pnum, err);
922 e1->pnum, e2->pnum, err);
925 prot_queue_add(ubi, e1);
927 wl_tree_add(e1, &ubi->erroneous);
930 wl_tree_add(e1, &ubi->scrub);
932 wl_tree_add(e1, &ubi->used);
953 err = do_sync_erase(ubi, e1, vol_id, lnum, 1);
965 err, e1->pnum, e2->pnum);
968 err, e1->pnum, vol_id, lnum, e2->pnum);
975 wl_entry_destroy(ubi, e1);
1006 struct ubi_wl_entry *e1; local
1030 e1 = rb_entry(rb_first(&ubi->used), struct ubi_wl_entry, u.rb);
1033 if (!(e2->ec - e1->ec >= UBI_WL_THRESHOLD))