Lines Matching refs:ai
295 static int create_vtbl(struct ubi_device *ubi, struct ubi_attach_info *ai, argument
309 new_aeb = ubi_early_get_peb(ubi, ai);
321 vid_hdr->sqnum = cpu_to_be64(++ai->max_sqnum);
337 err = ubi_add_to_av(ubi, ai, new_aeb->pnum, new_aeb->ec, vid_hdr, 0);
338 kmem_cache_free(ai->aeb_slab_cache, new_aeb);
348 list_add(&new_aeb->u.list, &ai->erase);
351 kmem_cache_free(ai->aeb_slab_cache, new_aeb);
369 struct ubi_attach_info *ai, argument
445 err = create_vtbl(ubi, ai, 1, leb[0]);
468 err = create_vtbl(ubi, ai, 0, leb[1]);
492 struct ubi_attach_info *ai) argument
507 err = create_vtbl(ubi, ai, i, vtbl);
528 const struct ubi_attach_info *ai, argument
588 av = ubi_find_av(ai, i);
709 struct ubi_attach_info *ai) argument
715 if (ai->vols_found > UBI_INT_VOL_COUNT + ubi->vtbl_slots) {
717 ai->vols_found, UBI_INT_VOL_COUNT, ubi->vtbl_slots);
721 if (ai->highest_vol_id >= ubi->vtbl_slots + UBI_INT_VOL_COUNT &&
722 ai->highest_vol_id < UBI_INTERNAL_VOL_START) {
724 ai->highest_vol_id);
731 av = ubi_find_av(ai, i);
735 ubi_remove_av(ai, av);
753 ubi_remove_av(ai, av);
773 int ubi_read_volume_table(struct ubi_device *ubi, struct ubi_attach_info *ai) argument
791 av = ubi_find_av(ai, UBI_LAYOUT_VOLUME_ID);
801 if (ai->is_empty) {
802 ubi->vtbl = create_empty_lvol(ubi, ai);
817 ubi->vtbl = process_lvol(ubi, ai, av);
828 err = init_volumes(ubi, ai, ubi->vtbl);
836 err = check_attaching_info(ubi, ai);