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()
248 struct ubi_wl_entry *e1; in in_wl_tree() local
250 e1 = rb_entry(p, struct ubi_wl_entry, u.rb); in in_wl_tree()
252 if (e->pnum == e1->pnum) { in in_wl_tree()
253 ubi_assert(e == e1); in in_wl_tree()
257 if (e->ec < e1->ec) in in_wl_tree()
259 else if (e->ec > e1->ec) in in_wl_tree()
262 ubi_assert(e->pnum != e1->pnum); in in_wl_tree()
263 if (e->pnum < e1->pnum) in in_wl_tree()
338 struct ubi_wl_entry *e1; in find_wl_entry() local
340 e1 = rb_entry(p, struct ubi_wl_entry, u.rb); in find_wl_entry()
341 if (e1->ec >= max) { in find_wl_entry()
343 e = e1; in find_wl_entry()
347 e = e1; in find_wl_entry()
664 struct ubi_wl_entry *e1, *e2; local
707 e1 = find_anchor_wl_entry(&ubi->used);
708 if (e1 && ubi->fm_anchor &&
709 (ubi->fm_anchor->ec - e1->ec >= UBI_WL_THRESHOLD)) {
722 if (!e1)
728 self_check_in_wl_tree(ubi, e1, &ubi->used);
729 rb_erase(&e1->u.rb, &ubi->used);
730 dbg_wl("anchor-move PEB %d to PEB %d", e1->pnum, e2->pnum);
741 e1 = rb_entry(rb_first(&ubi->used), struct ubi_wl_entry, u.rb);
746 if (!(e2->ec - e1->ec >= UBI_WL_THRESHOLD)) {
748 e1->ec, e2->ec);
755 self_check_in_wl_tree(ubi, e1, &ubi->used);
756 rb_erase(&e1->u.rb, &ubi->used);
758 e1->pnum, e1->ec, e2->pnum, e2->ec);
762 e1 = rb_entry(rb_first(&ubi->scrub), struct ubi_wl_entry, u.rb);
767 self_check_in_wl_tree(ubi, e1, &ubi->scrub);
768 rb_erase(&e1->u.rb, &ubi->scrub);
769 dbg_wl("scrub PEB %d to PEB %d", e1->pnum, e2->pnum);
772 ubi->move_from = e1;
787 err = ubi_io_read_vid_hdr(ubi, e1->pnum, vidb, 0);
801 dbg_wl("PEB %d has no VID header", e1->pnum);
811 e1->pnum);
821 e1->pnum);
827 err, e1->pnum);
834 err = ubi_eba_copy_leb(ubi, e1->pnum, e2->pnum, vidb);
898 e1->pnum, vol_id, lnum, e2->pnum);
910 err = do_sync_erase(ubi, e1, vol_id, lnum, 0);
945 e1->pnum, vol_id, lnum, e2->pnum, err);
948 e1->pnum, e2->pnum, err);
951 prot_queue_add(ubi, e1);
953 wl_tree_add(e1, &ubi->erroneous);
956 wl_tree_add(e1, &ubi->scrub);
958 wl_tree_add(e1, &ubi->used);
979 err = do_sync_erase(ubi, e1, vol_id, lnum, 1);
991 err, e1->pnum, e2->pnum);
994 err, e1->pnum, vol_id, lnum, e2->pnum);
998 wl_entry_destroy(ubi, e1);
1048 struct ubi_wl_entry *e1;
1061 e1 = rb_entry(rb_first(&ubi->used), struct ubi_wl_entry, u.rb);
1064 if (!(e2->ec - e1->ec >= UBI_WL_THRESHOLD))