Lines Matching defs:vtbl
70 err = ubi_eba_atomic_leb_change(ubi, layout_vol, i, ubi->vtbl,
105 memcpy(&ubi->vtbl[idx], vtbl_rec, sizeof(struct ubi_vtbl_record));
129 struct ubi_vtbl_record *vtbl_rec = &ubi->vtbl[vol->vol_id];
152 * @vtbl: volume table
154 * This function returns zero if @vtbl is all right, %1 if CRC is incorrect,
158 const struct ubi_vtbl_record *vtbl)
168 reserved_pebs = be32_to_cpu(vtbl[i].reserved_pebs);
169 alignment = be32_to_cpu(vtbl[i].alignment);
170 data_pad = be32_to_cpu(vtbl[i].data_pad);
171 upd_marker = vtbl[i].upd_marker;
172 vol_type = vtbl[i].vol_type;
173 name_len = be16_to_cpu(vtbl[i].name_len);
174 name = &vtbl[i].name[0];
176 crc = crc32(UBI_CRC32_INIT, &vtbl[i], UBI_VTBL_RECORD_SIZE_CRC);
177 if (be32_to_cpu(vtbl[i].crc) != crc) {
179 i, crc, be32_to_cpu(vtbl[i].crc));
180 ubi_dump_vtbl_record(&vtbl[i], i);
185 if (memcmp(&vtbl[i], &empty_vtbl_record,
253 int len1 = be16_to_cpu(vtbl[i].name_len);
254 int len2 = be16_to_cpu(vtbl[n].name_len);
257 !strncmp(vtbl[i].name, vtbl[n].name, len1)) {
259 i, n, vtbl[i].name);
260 ubi_dump_vtbl_record(&vtbl[i], i);
261 ubi_dump_vtbl_record(&vtbl[n], n);
271 ubi_dump_vtbl_record(&vtbl[i], i);
280 * @vtbl: contents of the volume table
286 int copy, void *vtbl)
322 err = ubi_io_write_data(ubi, vtbl, new_aeb->pnum, 0, ubi->vtbl_size);
488 struct ubi_vtbl_record *vtbl;
490 vtbl = vzalloc(ubi->vtbl_size);
491 if (!vtbl)
495 memcpy(&vtbl[i], &empty_vtbl_record, UBI_VTBL_RECORD_SIZE);
500 err = create_vtbl(ubi, ai, i, vtbl);
502 vfree(vtbl);
507 return vtbl;
514 * @vtbl: volume table
522 const struct ubi_vtbl_record *vtbl)
531 if (be32_to_cpu(vtbl[i].reserved_pebs) == 0)
538 vol->reserved_pebs = be32_to_cpu(vtbl[i].reserved_pebs);
539 vol->alignment = be32_to_cpu(vtbl[i].alignment);
540 vol->data_pad = be32_to_cpu(vtbl[i].data_pad);
541 vol->upd_marker = vtbl[i].upd_marker;
542 vol->vol_type = vtbl[i].vol_type == UBI_VID_DYNAMIC ?
544 vol->name_len = be16_to_cpu(vtbl[i].name_len);
546 memcpy(vol->name, vtbl[i].name, vol->name_len);
550 if (vtbl[i].flags & UBI_VTBL_SKIP_CRC_CHECK_FLG)
553 if (vtbl[i].flags & UBI_VTBL_AUTORESIZE_FLG) {
818 ubi->vtbl = create_empty_lvol(ubi, ai);
819 if (IS_ERR(ubi->vtbl))
820 return PTR_ERR(ubi->vtbl);
833 ubi->vtbl = process_lvol(ubi, ai, av);
834 if (IS_ERR(ubi->vtbl))
835 return PTR_ERR(ubi->vtbl);
844 err = init_volumes(ubi, ai, ubi->vtbl);
859 vfree(ubi->vtbl);
873 if (vtbl_check(ubi, ubi->vtbl)) {