Lines Matching defs:aeb

139 	struct ubi_ainf_peb *aeb;
141 aeb = ubi_alloc_aeb(ai, pnum, ec);
142 if (!aeb)
145 aeb->lnum = -1;
146 aeb->scrub = scrub;
147 aeb->copy_flag = aeb->sqnum = 0;
149 ai->ec_sum += aeb->ec;
152 if (ai->max_ec < aeb->ec)
153 ai->max_ec = aeb->ec;
155 if (ai->min_ec > aeb->ec)
156 ai->min_ec = aeb->ec;
158 list_add_tail(&aeb->u.list, list);
200 * @aeb: the to be assigned SEB
204 struct ubi_ainf_peb *aeb,
214 if (aeb->lnum != tmp_aeb->lnum) {
215 if (aeb->lnum < tmp_aeb->lnum)
225 list_del(&aeb->u.list);
228 rb_link_node(&aeb->u.rb, parent, p);
229 rb_insert_color(&aeb->u.rb, &av->root);
247 struct ubi_ainf_peb *aeb, *victim;
252 aeb = rb_entry(parent, struct ubi_ainf_peb, u.rb);
254 if (be32_to_cpu(new_vh->lnum) != aeb->lnum) {
255 if (be32_to_cpu(new_vh->lnum) < aeb->lnum)
267 if (aeb->pnum == new_aeb->pnum) {
268 ubi_assert(aeb->lnum == new_aeb->lnum);
274 cmp_res = ubi_compare_lebs(ubi, aeb, new_aeb->pnum, new_vh);
280 victim = ubi_alloc_aeb(ai, aeb->pnum, aeb->ec);
291 av->vol_id, aeb->lnum, new_aeb->pnum);
293 aeb->ec = new_aeb->ec;
294 aeb->pnum = new_aeb->pnum;
295 aeb->copy_flag = new_vh->copy_flag;
296 aeb->scrub = new_aeb->scrub;
297 aeb->sqnum = new_aeb->sqnum;
303 av->vol_id, aeb->lnum, new_aeb->pnum);
374 struct ubi_ainf_peb *aeb;
377 ubi_rb_for_each_entry(node2, aeb, &av->root, u.rb) {
378 if (aeb->pnum == pnum) {
379 rb_erase(&aeb->u.rb, &av->root);
381 ubi_free_aeb(ai, aeb);
521 struct ubi_ainf_peb *aeb;
526 list_for_each_entry(aeb, &ai->erase, u.list)
529 list_for_each_entry(aeb, &ai->free, u.list)
533 ubi_rb_for_each_entry(rb2, aeb, &av->root, u.rb)
554 struct ubi_ainf_peb *aeb, *tmp_aeb, *_tmp_aeb;
740 aeb = NULL;
743 aeb = tmp_aeb;
748 if (!aeb) {
753 aeb->lnum = j;
755 if (av->highest_lnum <= aeb->lnum)
756 av->highest_lnum = aeb->lnum;
758 assign_aeb_to_av(ai, aeb, av);
761 aeb->pnum, aeb->lnum, av->vol_id);
818 struct ubi_ainf_peb *aeb;
821 list_for_each_entry(aeb, &ai->fastmap, u.list) {
822 if (aeb->vol_id == UBI_FM_SB_VOLUME_ID && aeb->sqnum > max_sqnum) {
823 max_sqnum = aeb->sqnum;
824 ret = aeb->pnum;
868 struct ubi_ainf_peb *aeb;
879 list_for_each_entry(aeb, &scan_ai->fastmap, u.list) {
882 new = clone_aeb(ai, aeb);