• Home
  • Raw
  • Download

Lines Matching refs:ecc

100     check(f->ecc.rsn > 0 && f->ecc.rsn < FEC_RSM);  in parse_ecc_header()
136 if (f->ecc.roots != (int)header.roots) { in parse_ecc_header()
137 error("unexpected number of roots: %d vs %u", f->ecc.roots, in parse_ecc_header()
148 f->ecc.blocks = fec_div_round_up(f->data_size, FEC_BLOCKSIZE); in parse_ecc_header()
149 f->ecc.rounds = fec_div_round_up(f->ecc.blocks, f->ecc.rsn); in parse_ecc_header()
152 (uint32_t)f->ecc.rounds * f->ecc.roots * FEC_BLOCKSIZE) { in parse_ecc_header()
157 f->ecc.size = header.fec_size; in parse_ecc_header()
158 f->ecc.start = header.inp_size; in parse_ecc_header()
168 while (n < f->ecc.size) { in parse_ecc_header()
169 if (len > f->ecc.size - n) { in parse_ecc_header()
170 len = f->ecc.size - n; in parse_ecc_header()
173 if (!raw_pread(f, buf, len, f->ecc.start + n)) { in parse_ecc_header()
185 f->ecc.valid = !memcmp(hash, header.hash, SHA256_DIGEST_LENGTH); in parse_ecc_header()
187 if (!f->ecc.valid) { in parse_ecc_header()
353 f->ecc.start); in load_ecc()
402 memset(&f->ecc, 0, sizeof(f->ecc)); in reset_handle()
472 if (!f->ecc.start) { in fec_ecc_get_metadata()
477 check(f->ecc.start >= f->data_size); in fec_ecc_get_metadata()
478 check(f->ecc.start < f->size); in fec_ecc_get_metadata()
479 check(f->ecc.start % FEC_BLOCKSIZE == 0) in fec_ecc_get_metadata()
481 data->valid = f->ecc.valid; in fec_ecc_get_metadata()
482 data->roots = f->ecc.roots; in fec_ecc_get_metadata()
483 data->blocks = f->ecc.blocks; in fec_ecc_get_metadata()
484 data->rounds = f->ecc.rounds; in fec_ecc_get_metadata()
485 data->start = f->ecc.start; in fec_ecc_get_metadata()
535 f->ecc.roots = roots; in fec_open()
536 f->ecc.rsn = FEC_RSM - roots; in fec_open()