Lines Matching refs:fec
281 static int extract_fec_header(dev_t dev, struct fec_header *fec, in extract_fec_header() argument
313 memcpy(fec, page_address(payload.page_io[0]), in extract_fec_header()
314 sizeof(*fec)); in extract_fec_header()
317 if (validate_fec_header(fec, device_size - FEC_BLOCK_SIZE)) { in extract_fec_header()
319 memcpy(fec, page_address(payload.page_io[0]) + FEC_BLOCK_SIZE in extract_fec_header()
320 - sizeof(*fec) , in extract_fec_header()
321 sizeof(*fec)); in extract_fec_header()
322 if (validate_fec_header(fec, device_size - in extract_fec_header()
328 populate_fec_metadata(fec, ecc); in extract_fec_header()
338 static void find_metadata_offset(struct fec_header *fec, in find_metadata_offset() argument
345 if (le32_to_cpu(fec->magic) == FEC_MAGIC) in find_metadata_offset()
346 *metadata_offset = le64_to_cpu(fec->inp_size) - in find_metadata_offset()
396 static int extract_metadata(dev_t dev, struct fec_header *fec, in extract_metadata() argument
415 find_metadata_offset(fec, bdev, &metadata_offset); in extract_metadata()
702 struct fec_header uninitialized_var(fec); in android_verity_ctr()
740 if (extract_fec_header(dev, &fec, &ecc)) { in android_verity_ctr()
746 err = extract_metadata(dev, &fec, &metadata, &verity_enabled); in android_verity_ctr()