Lines Matching refs:vid_hdr

287  * @vid_hdr: the volume identifier header
297 struct ubi_vid_hdr *vid_hdr, int ec)
305 aeb->vol_id = be32_to_cpu(vid_hdr->vol_id);
306 aeb->sqnum = be64_to_cpu(vid_hdr->sqnum);
318 * @vid_hdr: the volume identifier header to check
322 * This function checks that data stored in @vid_hdr is consistent. Returns
331 const struct ubi_vid_hdr *vid_hdr,
334 int vol_type = vid_hdr->vol_type;
335 int vol_id = be32_to_cpu(vid_hdr->vol_id);
336 int used_ebs = be32_to_cpu(vid_hdr->used_ebs);
337 int data_pad = be32_to_cpu(vid_hdr->data_pad);
378 ubi_dump_vid_hdr(vid_hdr);
388 * @vid_hdr: volume identifier header
390 * If the volume corresponding to the @vid_hdr logical eraseblock is already
398 const struct ubi_vid_hdr *vid_hdr)
403 ubi_assert(vol_id == be32_to_cpu(vid_hdr->vol_id));
409 av->used_ebs = be32_to_cpu(vid_hdr->used_ebs);
410 av->data_pad = be32_to_cpu(vid_hdr->data_pad);
411 av->compat = vid_hdr->compat;
412 av->vol_type = vid_hdr->vol_type == UBI_VID_DYNAMIC ? UBI_DYNAMIC_VOLUME
424 * @vid_hdr: volume identifier header of the second logical eraseblock
431 * second PEB (described by @pnum and @vid_hdr);
439 int pnum, const struct ubi_vid_hdr *vid_hdr)
444 unsigned long long sqnum2 = be64_to_cpu(vid_hdr->sqnum);
472 if (!vid_hdr->copy_flag) {
505 vid_hdr = ubi_get_vid_hdr(vidb);
510 len = be32_to_cpu(vid_hdr->data_size);
517 data_crc = be32_to_cpu(vid_hdr->data_crc);
553 * @vid_hdr: the volume identifier header
564 int ec, const struct ubi_vid_hdr *vid_hdr, int bitflips)
572 vol_id = be32_to_cpu(vid_hdr->vol_id);
573 lnum = be32_to_cpu(vid_hdr->lnum);
574 sqnum = be64_to_cpu(vid_hdr->sqnum);
579 av = add_volume(ai, vol_id, pnum, vid_hdr);
629 ubi_dump_vid_hdr(vid_hdr);
637 cmp_res = ubi_compare_lebs(ubi, aeb, pnum, vid_hdr);
646 err = validate_vid_hdr(ubi, vid_hdr, av, pnum);
661 aeb->copy_flag = vid_hdr->copy_flag;
666 be32_to_cpu(vid_hdr->data_size);
684 err = validate_vid_hdr(ubi, vid_hdr, av, pnum);
695 aeb->copy_flag = vid_hdr->copy_flag;
700 av->last_data_size = be32_to_cpu(vid_hdr->data_size);
858 * @vid_hdr: the (corrupted) VID header of this PEB
872 static int check_corruption(struct ubi_device *ubi, struct ubi_vid_hdr *vid_hdr,
903 ubi_dump_vid_hdr(vid_hdr);