Lines Matching refs:vtbl

70 		err = ubi_eba_atomic_leb_change(ubi, layout_vol, i, ubi->vtbl,  in ubi_update_layout_vol()
105 memcpy(&ubi->vtbl[idx], vtbl_rec, sizeof(struct ubi_vtbl_record)); in ubi_change_vtbl_record()
129 struct ubi_vtbl_record *vtbl_rec = &ubi->vtbl[vol->vol_id]; in ubi_vtbl_rename_volumes()
158 const struct ubi_vtbl_record *vtbl) in vtbl_check() argument
168 reserved_pebs = be32_to_cpu(vtbl[i].reserved_pebs); in vtbl_check()
169 alignment = be32_to_cpu(vtbl[i].alignment); in vtbl_check()
170 data_pad = be32_to_cpu(vtbl[i].data_pad); in vtbl_check()
171 upd_marker = vtbl[i].upd_marker; in vtbl_check()
172 vol_type = vtbl[i].vol_type; in vtbl_check()
173 name_len = be16_to_cpu(vtbl[i].name_len); in vtbl_check()
174 name = &vtbl[i].name[0]; in vtbl_check()
176 crc = crc32(UBI_CRC32_INIT, &vtbl[i], UBI_VTBL_RECORD_SIZE_CRC); in vtbl_check()
177 if (be32_to_cpu(vtbl[i].crc) != crc) { in vtbl_check()
179 i, crc, be32_to_cpu(vtbl[i].crc)); in vtbl_check()
180 ubi_dump_vtbl_record(&vtbl[i], i); in vtbl_check()
185 if (memcmp(&vtbl[i], &empty_vtbl_record, in vtbl_check()
253 int len1 = be16_to_cpu(vtbl[i].name_len); in vtbl_check()
254 int len2 = be16_to_cpu(vtbl[n].name_len); in vtbl_check()
257 !strncmp(vtbl[i].name, vtbl[n].name, len1)) { in vtbl_check()
259 i, n, vtbl[i].name); in vtbl_check()
260 ubi_dump_vtbl_record(&vtbl[i], i); in vtbl_check()
261 ubi_dump_vtbl_record(&vtbl[n], n); in vtbl_check()
271 ubi_dump_vtbl_record(&vtbl[i], i); in vtbl_check()
286 int copy, void *vtbl) in create_vtbl() argument
322 err = ubi_io_write_data(ubi, vtbl, new_aeb->pnum, 0, ubi->vtbl_size); in create_vtbl()
488 struct ubi_vtbl_record *vtbl; in create_empty_lvol() local
490 vtbl = vzalloc(ubi->vtbl_size); in create_empty_lvol()
491 if (!vtbl) in create_empty_lvol()
495 memcpy(&vtbl[i], &empty_vtbl_record, UBI_VTBL_RECORD_SIZE); in create_empty_lvol()
500 err = create_vtbl(ubi, ai, i, vtbl); in create_empty_lvol()
502 vfree(vtbl); in create_empty_lvol()
507 return vtbl; in create_empty_lvol()
522 const struct ubi_vtbl_record *vtbl) in init_volumes() argument
531 if (be32_to_cpu(vtbl[i].reserved_pebs) == 0) in init_volumes()
538 vol->reserved_pebs = be32_to_cpu(vtbl[i].reserved_pebs); in init_volumes()
539 vol->alignment = be32_to_cpu(vtbl[i].alignment); in init_volumes()
540 vol->data_pad = be32_to_cpu(vtbl[i].data_pad); in init_volumes()
541 vol->upd_marker = vtbl[i].upd_marker; in init_volumes()
542 vol->vol_type = vtbl[i].vol_type == UBI_VID_DYNAMIC ? in init_volumes()
544 vol->name_len = be16_to_cpu(vtbl[i].name_len); in init_volumes()
546 memcpy(vol->name, vtbl[i].name, vol->name_len); in init_volumes()
550 if (vtbl[i].flags & UBI_VTBL_SKIP_CRC_CHECK_FLG) in init_volumes()
553 if (vtbl[i].flags & UBI_VTBL_AUTORESIZE_FLG) { in init_volumes()
818 ubi->vtbl = create_empty_lvol(ubi, ai); in ubi_read_volume_table()
819 if (IS_ERR(ubi->vtbl)) in ubi_read_volume_table()
820 return PTR_ERR(ubi->vtbl); in ubi_read_volume_table()
833 ubi->vtbl = process_lvol(ubi, ai, av); in ubi_read_volume_table()
834 if (IS_ERR(ubi->vtbl)) in ubi_read_volume_table()
835 return PTR_ERR(ubi->vtbl); in ubi_read_volume_table()
844 err = init_volumes(ubi, ai, ubi->vtbl); in ubi_read_volume_table()
859 vfree(ubi->vtbl); in ubi_read_volume_table()
873 if (vtbl_check(ubi, ubi->vtbl)) { in self_vtbl_check()