Lines Matching defs:ai
278 * @ai: attaching information
285 static int create_vtbl(struct ubi_device *ubi, struct ubi_attach_info *ai,
302 new_aeb = ubi_early_get_peb(ubi, ai);
314 vid_hdr->sqnum = cpu_to_be64(++ai->max_sqnum);
330 err = ubi_add_to_av(ubi, ai, new_aeb->pnum, new_aeb->ec, vid_hdr, 0);
331 ubi_free_aeb(ai, new_aeb);
341 list_add(&new_aeb->u.list, &ai->erase);
344 ubi_free_aeb(ai, new_aeb);
354 * @ai: attaching information
362 struct ubi_attach_info *ai,
438 err = create_vtbl(ubi, ai, 1, leb[0]);
461 err = create_vtbl(ubi, ai, 0, leb[1]);
479 * @ai: attaching information
485 struct ubi_attach_info *ai)
500 err = create_vtbl(ubi, ai, i, vtbl);
513 * @ai: scanning information
521 const struct ubi_attach_info *ai,
594 av = ubi_find_av(ai, i);
711 * @ai: attaching information
719 struct ubi_attach_info *ai)
725 if (ai->vols_found > UBI_INT_VOL_COUNT + ubi->vtbl_slots) {
727 ai->vols_found, UBI_INT_VOL_COUNT, ubi->vtbl_slots);
731 if (ai->highest_vol_id >= ubi->vtbl_slots + UBI_INT_VOL_COUNT &&
732 ai->highest_vol_id < UBI_INTERNAL_VOL_START) {
734 ai->highest_vol_id);
741 av = ubi_find_av(ai, i);
745 ubi_remove_av(ai, av);
763 ubi_remove_av(ai, av);
777 * @ai: attaching information
783 int ubi_read_volume_table(struct ubi_device *ubi, struct ubi_attach_info *ai)
807 av = ubi_find_av(ai, UBI_LAYOUT_VOLUME_ID);
817 if (ai->is_empty) {
818 ubi->vtbl = create_empty_lvol(ubi, ai);
833 ubi->vtbl = process_lvol(ubi, ai, av);
844 err = init_volumes(ubi, ai, ubi->vtbl);
852 err = check_attaching_info(ubi, ai);