Lines Matching refs:vid_hdr
499 struct ubi_vid_hdr *vid_hdr; in check_mapping() local
544 vid_hdr = ubi_get_vid_hdr(vidb); in check_mapping()
545 found_vol_id = be32_to_cpu(vid_hdr->vol_id); in check_mapping()
546 found_lnum = be32_to_cpu(vid_hdr->lnum); in check_mapping()
597 struct ubi_vid_hdr *vid_hdr; in ubi_eba_read_leb() local
639 vid_hdr = ubi_get_vid_hdr(vidb); in ubi_eba_read_leb()
683 ubi_assert(lnum < be32_to_cpu(vid_hdr->used_ebs)); in ubi_eba_read_leb()
684 ubi_assert(len == be32_to_cpu(vid_hdr->data_size)); in ubi_eba_read_leb()
686 crc = be32_to_cpu(vid_hdr->data_crc); in ubi_eba_read_leb()
808 struct ubi_vid_hdr *vid_hdr; in try_recover_peb() local
830 vid_hdr = ubi_get_vid_hdr(vidb); in try_recover_peb()
831 ubi_assert(vid_hdr->vol_type == UBI_VID_DYNAMIC); in try_recover_peb()
849 vid_hdr->sqnum = cpu_to_be64(ubi_next_sqnum(ubi)); in try_recover_peb()
850 vid_hdr->copy_flag = 1; in try_recover_peb()
851 vid_hdr->data_size = cpu_to_be32(data_size); in try_recover_peb()
852 vid_hdr->data_crc = cpu_to_be32(crc); in try_recover_peb()
1018 struct ubi_vid_hdr *vid_hdr; in ubi_eba_write_leb() local
1059 vid_hdr = ubi_get_vid_hdr(vidb); in ubi_eba_write_leb()
1061 vid_hdr->vol_type = UBI_VID_DYNAMIC; in ubi_eba_write_leb()
1062 vid_hdr->sqnum = cpu_to_be64(ubi_next_sqnum(ubi)); in ubi_eba_write_leb()
1063 vid_hdr->vol_id = cpu_to_be32(vol_id); in ubi_eba_write_leb()
1064 vid_hdr->lnum = cpu_to_be32(lnum); in ubi_eba_write_leb()
1065 vid_hdr->compat = ubi_get_compat(ubi, vol_id); in ubi_eba_write_leb()
1066 vid_hdr->data_pad = cpu_to_be32(vol->data_pad); in ubi_eba_write_leb()
1079 vid_hdr->sqnum = cpu_to_be64(ubi_next_sqnum(ubi)); in ubi_eba_write_leb()
1121 struct ubi_vid_hdr *vid_hdr; in ubi_eba_write_leb_st() local
1137 vid_hdr = ubi_get_vid_hdr(vidb); in ubi_eba_write_leb_st()
1143 vid_hdr->sqnum = cpu_to_be64(ubi_next_sqnum(ubi)); in ubi_eba_write_leb_st()
1144 vid_hdr->vol_id = cpu_to_be32(vol_id); in ubi_eba_write_leb_st()
1145 vid_hdr->lnum = cpu_to_be32(lnum); in ubi_eba_write_leb_st()
1146 vid_hdr->compat = ubi_get_compat(ubi, vol_id); in ubi_eba_write_leb_st()
1147 vid_hdr->data_pad = cpu_to_be32(vol->data_pad); in ubi_eba_write_leb_st()
1150 vid_hdr->vol_type = UBI_VID_STATIC; in ubi_eba_write_leb_st()
1151 vid_hdr->data_size = cpu_to_be32(data_size); in ubi_eba_write_leb_st()
1152 vid_hdr->used_ebs = cpu_to_be32(used_ebs); in ubi_eba_write_leb_st()
1153 vid_hdr->data_crc = cpu_to_be32(crc); in ubi_eba_write_leb_st()
1162 vid_hdr->sqnum = cpu_to_be64(ubi_next_sqnum(ubi)); in ubi_eba_write_leb_st()
1199 struct ubi_vid_hdr *vid_hdr; in ubi_eba_atomic_leb_change() local
1220 vid_hdr = ubi_get_vid_hdr(vidb); in ubi_eba_atomic_leb_change()
1227 vid_hdr->sqnum = cpu_to_be64(ubi_next_sqnum(ubi)); in ubi_eba_atomic_leb_change()
1228 vid_hdr->vol_id = cpu_to_be32(vol_id); in ubi_eba_atomic_leb_change()
1229 vid_hdr->lnum = cpu_to_be32(lnum); in ubi_eba_atomic_leb_change()
1230 vid_hdr->compat = ubi_get_compat(ubi, vol_id); in ubi_eba_atomic_leb_change()
1231 vid_hdr->data_pad = cpu_to_be32(vol->data_pad); in ubi_eba_atomic_leb_change()
1234 vid_hdr->vol_type = UBI_VID_DYNAMIC; in ubi_eba_atomic_leb_change()
1235 vid_hdr->data_size = cpu_to_be32(len); in ubi_eba_atomic_leb_change()
1236 vid_hdr->copy_flag = 1; in ubi_eba_atomic_leb_change()
1237 vid_hdr->data_crc = cpu_to_be32(crc); in ubi_eba_atomic_leb_change()
1246 vid_hdr->sqnum = cpu_to_be64(ubi_next_sqnum(ubi)); in ubi_eba_atomic_leb_change()
1311 struct ubi_vid_hdr *vid_hdr = ubi_get_vid_hdr(vidb); in ubi_eba_copy_leb() local
1317 vol_id = be32_to_cpu(vid_hdr->vol_id); in ubi_eba_copy_leb()
1318 lnum = be32_to_cpu(vid_hdr->lnum); in ubi_eba_copy_leb()
1322 if (vid_hdr->vol_type == UBI_VID_STATIC) { in ubi_eba_copy_leb()
1323 data_size = be32_to_cpu(vid_hdr->data_size); in ubi_eba_copy_leb()
1327 ubi->leb_size - be32_to_cpu(vid_hdr->data_pad); in ubi_eba_copy_leb()
1404 if (vid_hdr->vol_type == UBI_VID_DYNAMIC) in ubi_eba_copy_leb()
1419 vid_hdr->copy_flag = 1; in ubi_eba_copy_leb()
1420 vid_hdr->data_size = cpu_to_be32(data_size); in ubi_eba_copy_leb()
1421 vid_hdr->data_crc = cpu_to_be32(crc); in ubi_eba_copy_leb()
1423 vid_hdr->sqnum = cpu_to_be64(ubi_next_sqnum(ubi)); in ubi_eba_copy_leb()