Lines Matching refs:ai
296 static int create_vtbl(struct ubi_device *ubi, struct ubi_attach_info *ai, argument
310 new_aeb = ubi_early_get_peb(ubi, ai);
322 vid_hdr->sqnum = cpu_to_be64(++ai->max_sqnum);
338 err = ubi_add_to_av(ubi, ai, new_aeb->pnum, new_aeb->ec, vid_hdr, 0);
339 kmem_cache_free(ai->aeb_slab_cache, new_aeb);
349 list_add(&new_aeb->u.list, &ai->erase);
352 kmem_cache_free(ai->aeb_slab_cache, new_aeb);
370 struct ubi_attach_info *ai, argument
446 err = create_vtbl(ubi, ai, 1, leb[0]);
469 err = create_vtbl(ubi, ai, 0, leb[1]);
493 struct ubi_attach_info *ai) argument
508 err = create_vtbl(ubi, ai, i, vtbl);
529 const struct ubi_attach_info *ai, argument
589 av = ubi_find_av(ai, i);
710 struct ubi_attach_info *ai) argument
716 if (ai->vols_found > UBI_INT_VOL_COUNT + ubi->vtbl_slots) {
718 ai->vols_found, UBI_INT_VOL_COUNT, ubi->vtbl_slots);
722 if (ai->highest_vol_id >= ubi->vtbl_slots + UBI_INT_VOL_COUNT &&
723 ai->highest_vol_id < UBI_INTERNAL_VOL_START) {
725 ai->highest_vol_id);
732 av = ubi_find_av(ai, i);
736 ubi_remove_av(ai, av);
754 ubi_remove_av(ai, av);
774 int ubi_read_volume_table(struct ubi_device *ubi, struct ubi_attach_info *ai) argument
792 av = ubi_find_av(ai, UBI_LAYOUT_VOLUME_ID);
802 if (ai->is_empty) {
803 ubi->vtbl = create_empty_lvol(ubi, ai);
818 ubi->vtbl = process_lvol(ubi, ai, av);
829 err = init_volumes(ubi, ai, ubi->vtbl);
837 err = check_attaching_info(ubi, ai);