Lines Matching refs:vtbl

100 	memcpy(&ubi->vtbl[idx], vtbl_rec, sizeof(struct ubi_vtbl_record));  in ubi_change_vtbl_record()
102 err = ubi_eba_atomic_leb_change(ubi, layout_vol, i, ubi->vtbl, in ubi_change_vtbl_record()
131 struct ubi_vtbl_record *vtbl_rec = &ubi->vtbl[vol->vol_id]; in ubi_vtbl_rename_volumes()
150 err = ubi_eba_atomic_leb_change(ubi, layout_vol, i, ubi->vtbl, in ubi_vtbl_rename_volumes()
168 const struct ubi_vtbl_record *vtbl) in vtbl_check() argument
178 reserved_pebs = be32_to_cpu(vtbl[i].reserved_pebs); in vtbl_check()
179 alignment = be32_to_cpu(vtbl[i].alignment); in vtbl_check()
180 data_pad = be32_to_cpu(vtbl[i].data_pad); in vtbl_check()
181 upd_marker = vtbl[i].upd_marker; in vtbl_check()
182 vol_type = vtbl[i].vol_type; in vtbl_check()
183 name_len = be16_to_cpu(vtbl[i].name_len); in vtbl_check()
184 name = &vtbl[i].name[0]; in vtbl_check()
186 crc = crc32(UBI_CRC32_INIT, &vtbl[i], UBI_VTBL_RECORD_SIZE_CRC); in vtbl_check()
187 if (be32_to_cpu(vtbl[i].crc) != crc) { in vtbl_check()
189 i, crc, be32_to_cpu(vtbl[i].crc)); in vtbl_check()
190 ubi_dump_vtbl_record(&vtbl[i], i); in vtbl_check()
195 if (memcmp(&vtbl[i], &empty_vtbl_record, in vtbl_check()
263 int len1 = be16_to_cpu(vtbl[i].name_len); in vtbl_check()
264 int len2 = be16_to_cpu(vtbl[n].name_len); in vtbl_check()
267 !strncmp(vtbl[i].name, vtbl[n].name, len1)) { in vtbl_check()
269 i, n, vtbl[i].name); in vtbl_check()
270 ubi_dump_vtbl_record(&vtbl[i], i); in vtbl_check()
271 ubi_dump_vtbl_record(&vtbl[n], n); in vtbl_check()
281 ubi_dump_vtbl_record(&vtbl[i], i); in vtbl_check()
296 int copy, void *vtbl) in create_vtbl() argument
329 err = ubi_io_write_data(ubi, vtbl, new_aeb->pnum, 0, ubi->vtbl_size); in create_vtbl()
495 struct ubi_vtbl_record *vtbl; in create_empty_lvol() local
497 vtbl = vzalloc(ubi->vtbl_size); in create_empty_lvol()
498 if (!vtbl) in create_empty_lvol()
502 memcpy(&vtbl[i], &empty_vtbl_record, UBI_VTBL_RECORD_SIZE); in create_empty_lvol()
507 err = create_vtbl(ubi, ai, i, vtbl); in create_empty_lvol()
509 vfree(vtbl); in create_empty_lvol()
514 return vtbl; in create_empty_lvol()
529 const struct ubi_vtbl_record *vtbl) in init_volumes() argument
538 if (be32_to_cpu(vtbl[i].reserved_pebs) == 0) in init_volumes()
545 vol->reserved_pebs = be32_to_cpu(vtbl[i].reserved_pebs); in init_volumes()
546 vol->alignment = be32_to_cpu(vtbl[i].alignment); in init_volumes()
547 vol->data_pad = be32_to_cpu(vtbl[i].data_pad); in init_volumes()
548 vol->upd_marker = vtbl[i].upd_marker; in init_volumes()
549 vol->vol_type = vtbl[i].vol_type == UBI_VID_DYNAMIC ? in init_volumes()
551 vol->name_len = be16_to_cpu(vtbl[i].name_len); in init_volumes()
553 memcpy(vol->name, vtbl[i].name, vol->name_len); in init_volumes()
557 if (vtbl[i].flags & UBI_VTBL_AUTORESIZE_FLG) { in init_volumes()
803 ubi->vtbl = create_empty_lvol(ubi, ai); in ubi_read_volume_table()
804 if (IS_ERR(ubi->vtbl)) in ubi_read_volume_table()
805 return PTR_ERR(ubi->vtbl); in ubi_read_volume_table()
818 ubi->vtbl = process_lvol(ubi, ai, av); 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()
829 err = init_volumes(ubi, ai, ubi->vtbl); in ubi_read_volume_table()
844 vfree(ubi->vtbl); in ubi_read_volume_table()
861 if (vtbl_check(ubi, ubi->vtbl)) { in self_vtbl_check()