Home | History | Annotate | Download | only in ubi

Lines Matching defs:aeb

145 	struct ubi_ainf_peb *aeb;
147 aeb = kmem_cache_alloc(ai->aeb_slab_cache, GFP_KERNEL);
148 if (!aeb)
151 aeb->pnum = pnum;
152 aeb->ec = ec;
153 aeb->lnum = -1;
154 aeb->scrub = scrub;
155 aeb->copy_flag = aeb->sqnum = 0;
157 ai->ec_sum += aeb->ec;
160 if (ai->max_ec < aeb->ec)
161 ai->max_ec = aeb->ec;
163 if (ai->min_ec > aeb->ec)
164 ai->min_ec = aeb->ec;
166 list_add_tail(&aeb->u.list, list);
229 * @aeb: the to be assigned SEB
233 struct ubi_ainf_peb *aeb,
244 if (aeb->lnum != tmp_aeb->lnum) {
245 if (aeb->lnum < tmp_aeb->lnum)
255 list_del(&aeb->u.list);
258 rb_link_node(&aeb->u.rb, parent, p);
259 rb_insert_color(&aeb->u.rb, &av->root);
268 * @new_aeb: the AEB to be examined
277 struct ubi_ainf_peb *aeb, *victim;
282 aeb = rb_entry(parent, struct ubi_ainf_peb, u.rb);
284 if (be32_to_cpu(new_vh->lnum) != aeb->lnum) {
285 if (be32_to_cpu(new_vh->lnum) < aeb->lnum)
297 if (aeb->pnum == new_aeb->pnum) {
298 ubi_assert(aeb->lnum == new_aeb->lnum);
304 cmp_res = ubi_compare_lebs(ubi, aeb, new_aeb->pnum, new_vh);
315 victim->ec = aeb->ec;
316 victim->pnum = aeb->pnum;
323 dbg_bld("vol %i: AEB %i's PEB %i is the newer",
324 av->vol_id, aeb->lnum, new_aeb->pnum);
326 aeb->ec = new_aeb->ec;
327 aeb->pnum = new_aeb->pnum;
328 aeb->copy_flag = new_vh->copy_flag;
329 aeb->scrub = new_aeb->scrub;
334 dbg_bld("vol %i: AEB %i's PEB %i is old, dropping it",
335 av->vol_id, aeb->lnum, new_aeb->pnum);
364 * @new_aeb: the AEB to be examined
423 struct ubi_ainf_peb *aeb;
430 aeb = rb_entry(node2, struct ubi_ainf_peb, u.rb);
431 if (aeb->pnum == pnum) {
432 rb_erase(&aeb->u.rb, &av->root);
434 kmem_cache_free(ai->aeb_slab_cache, aeb);
577 struct ubi_ainf_peb *aeb;
582 list_for_each_entry(aeb, &ai->erase, u.list)
585 list_for_each_entry(aeb, &ai->free, u.list)
589 ubi_rb_for_each_entry(rb2, aeb, &av->root, u.rb)
610 struct ubi_ainf_peb *aeb, *tmp_aeb, *_tmp_aeb;
788 aeb = NULL;
791 aeb = tmp_aeb;
796 if (!aeb) {
801 aeb->lnum = j;
803 if (av->highest_lnum <= aeb->lnum)
804 av->highest_lnum = aeb->lnum;
806 assign_aeb_to_av(ai, aeb, av);
809 aeb->pnum, aeb->lnum, av->vol_id);