Lines Matching refs:ai
285 static int create_vtbl(struct ubi_device *ubi, struct ubi_attach_info *ai, in create_vtbl() argument
302 new_aeb = ubi_early_get_peb(ubi, ai); in create_vtbl()
314 vid_hdr->sqnum = cpu_to_be64(++ai->max_sqnum); in create_vtbl()
330 err = ubi_add_to_av(ubi, ai, new_aeb->pnum, new_aeb->ec, vid_hdr, 0); in create_vtbl()
331 ubi_free_aeb(ai, new_aeb); in create_vtbl()
341 list_add(&new_aeb->u.list, &ai->erase); in create_vtbl()
344 ubi_free_aeb(ai, new_aeb); in create_vtbl()
362 struct ubi_attach_info *ai, in process_lvol() argument
438 err = create_vtbl(ubi, ai, 1, leb[0]); in process_lvol()
461 err = create_vtbl(ubi, ai, 0, leb[1]); in process_lvol()
485 struct ubi_attach_info *ai) in create_empty_lvol() argument
500 err = create_vtbl(ubi, ai, i, vtbl); in create_empty_lvol()
521 const struct ubi_attach_info *ai, in init_volumes() argument
594 av = ubi_find_av(ai, i); in init_volumes()
719 struct ubi_attach_info *ai) in check_attaching_info() argument
725 if (ai->vols_found > UBI_INT_VOL_COUNT + ubi->vtbl_slots) { in check_attaching_info()
727 ai->vols_found, UBI_INT_VOL_COUNT, ubi->vtbl_slots); in check_attaching_info()
731 if (ai->highest_vol_id >= ubi->vtbl_slots + UBI_INT_VOL_COUNT && in check_attaching_info()
732 ai->highest_vol_id < UBI_INTERNAL_VOL_START) { in check_attaching_info()
734 ai->highest_vol_id); in check_attaching_info()
741 av = ubi_find_av(ai, i); in check_attaching_info()
745 ubi_remove_av(ai, av); in check_attaching_info()
763 ubi_remove_av(ai, av); in check_attaching_info()
783 int ubi_read_volume_table(struct ubi_device *ubi, struct ubi_attach_info *ai) in ubi_read_volume_table() argument
801 av = ubi_find_av(ai, UBI_LAYOUT_VOLUME_ID); in ubi_read_volume_table()
811 if (ai->is_empty) { in ubi_read_volume_table()
812 ubi->vtbl = create_empty_lvol(ubi, ai); in ubi_read_volume_table()
827 ubi->vtbl = process_lvol(ubi, ai, av); in ubi_read_volume_table()
838 err = init_volumes(ubi, ai, ubi->vtbl); in ubi_read_volume_table()
846 err = check_attaching_info(ubi, ai); in ubi_read_volume_table()