Lines Matching refs:vtbl

83 		err = ubi_eba_atomic_leb_change(ubi, layout_vol, i, ubi->vtbl,  in ubi_update_layout_vol()
118 memcpy(&ubi->vtbl[idx], vtbl_rec, sizeof(struct ubi_vtbl_record)); in ubi_change_vtbl_record()
142 struct ubi_vtbl_record *vtbl_rec = &ubi->vtbl[vol->vol_id]; in ubi_vtbl_rename_volumes()
171 const struct ubi_vtbl_record *vtbl) in vtbl_check() argument
181 reserved_pebs = be32_to_cpu(vtbl[i].reserved_pebs); in vtbl_check()
182 alignment = be32_to_cpu(vtbl[i].alignment); in vtbl_check()
183 data_pad = be32_to_cpu(vtbl[i].data_pad); in vtbl_check()
184 upd_marker = vtbl[i].upd_marker; in vtbl_check()
185 vol_type = vtbl[i].vol_type; in vtbl_check()
186 name_len = be16_to_cpu(vtbl[i].name_len); in vtbl_check()
187 name = &vtbl[i].name[0]; in vtbl_check()
189 crc = crc32(UBI_CRC32_INIT, &vtbl[i], UBI_VTBL_RECORD_SIZE_CRC); in vtbl_check()
190 if (be32_to_cpu(vtbl[i].crc) != crc) { in vtbl_check()
192 i, crc, be32_to_cpu(vtbl[i].crc)); in vtbl_check()
193 ubi_dump_vtbl_record(&vtbl[i], i); in vtbl_check()
198 if (memcmp(&vtbl[i], &empty_vtbl_record, in vtbl_check()
266 int len1 = be16_to_cpu(vtbl[i].name_len); in vtbl_check()
267 int len2 = be16_to_cpu(vtbl[n].name_len); in vtbl_check()
270 !strncmp(vtbl[i].name, vtbl[n].name, len1)) { in vtbl_check()
272 i, n, vtbl[i].name); in vtbl_check()
273 ubi_dump_vtbl_record(&vtbl[i], i); in vtbl_check()
274 ubi_dump_vtbl_record(&vtbl[n], n); in vtbl_check()
284 ubi_dump_vtbl_record(&vtbl[i], i); in vtbl_check()
299 int copy, void *vtbl) in create_vtbl() argument
332 err = ubi_io_write_data(ubi, vtbl, new_aeb->pnum, 0, ubi->vtbl_size); in create_vtbl()
498 struct ubi_vtbl_record *vtbl; in create_empty_lvol() local
500 vtbl = vzalloc(ubi->vtbl_size); in create_empty_lvol()
501 if (!vtbl) in create_empty_lvol()
505 memcpy(&vtbl[i], &empty_vtbl_record, UBI_VTBL_RECORD_SIZE); in create_empty_lvol()
510 err = create_vtbl(ubi, ai, i, vtbl); in create_empty_lvol()
512 vfree(vtbl); in create_empty_lvol()
517 return vtbl; in create_empty_lvol()
532 const struct ubi_vtbl_record *vtbl) in init_volumes() argument
541 if (be32_to_cpu(vtbl[i].reserved_pebs) == 0) in init_volumes()
548 vol->reserved_pebs = be32_to_cpu(vtbl[i].reserved_pebs); in init_volumes()
549 vol->alignment = be32_to_cpu(vtbl[i].alignment); in init_volumes()
550 vol->data_pad = be32_to_cpu(vtbl[i].data_pad); in init_volumes()
551 vol->upd_marker = vtbl[i].upd_marker; in init_volumes()
552 vol->vol_type = vtbl[i].vol_type == UBI_VID_DYNAMIC ? in init_volumes()
554 vol->name_len = be16_to_cpu(vtbl[i].name_len); in init_volumes()
556 memcpy(vol->name, vtbl[i].name, vol->name_len); in init_volumes()
560 if (vtbl[i].flags & UBI_VTBL_AUTORESIZE_FLG) { in init_volumes()
806 ubi->vtbl = create_empty_lvol(ubi, ai); in ubi_read_volume_table()
807 if (IS_ERR(ubi->vtbl)) in ubi_read_volume_table()
808 return PTR_ERR(ubi->vtbl); in ubi_read_volume_table()
821 ubi->vtbl = process_lvol(ubi, ai, av); in ubi_read_volume_table()
822 if (IS_ERR(ubi->vtbl)) in ubi_read_volume_table()
823 return PTR_ERR(ubi->vtbl); in ubi_read_volume_table()
832 err = init_volumes(ubi, ai, ubi->vtbl); in ubi_read_volume_table()
847 vfree(ubi->vtbl); in ubi_read_volume_table()
864 if (vtbl_check(ubi, ubi->vtbl)) { in self_vtbl_check()