Lines Matching refs:FEC_BLOCKSIZE

78     uint64_t n = offset / FEC_BLOCKSIZE;  in is_erasure()
93 uint64_t hash_offset = (offset / FEC_BLOCKSIZE) * SHA256_DIGEST_LENGTH; in is_zero()
96 v->hash_data_blocks * FEC_BLOCKSIZE - SHA256_DIGEST_LENGTH)) { in is_zero()
108 check(offset % FEC_BLOCKSIZE == 0); in __ecc_read()
113 uint64_t rsb = offset - (offset / (e->rounds * FEC_BLOCKSIZE)) * in __ecc_read()
114 e->rounds * FEC_BLOCKSIZE; in __ecc_read()
132 uint8_t bbuf[FEC_BLOCKSIZE] = {0}; in __ecc_read()
136 if (!raw_pread(f, bbuf, FEC_BLOCKSIZE, interleaved)) { in __ecc_read()
149 for (int j = 0; j < FEC_BLOCKSIZE; ++j) { in __ecc_read()
159 for (int i = 0; i < FEC_BLOCKSIZE; ++i) { in __ecc_read()
202 return FEC_BLOCKSIZE; in __ecc_read()
219 ecc_data.reset(new (std::nothrow) uint8_t[FEC_RSM * FEC_BLOCKSIZE]); in ecc_init()
250 uint64_t curr = offset / FEC_BLOCKSIZE; in ecc_read()
251 size_t coff = (size_t)(offset - curr * FEC_BLOCKSIZE); in ecc_read()
254 uint8_t data[FEC_BLOCKSIZE]; in ecc_read()
258 if (__ecc_read(f, rs.get(), data, curr * FEC_BLOCKSIZE, false, in ecc_read()
263 size_t copy = FEC_BLOCKSIZE - coff; in ecc_read()
302 uint64_t curr = offset / FEC_BLOCKSIZE; in verity_read()
303 size_t coff = (size_t)(offset - curr * FEC_BLOCKSIZE); in verity_read()
305 uint8_t data[FEC_BLOCKSIZE]; in verity_read()
307 uint64_t max_hash_block = (f->verity.hash_data_blocks * FEC_BLOCKSIZE - in verity_read()
314 uint64_t curr_offset = curr * FEC_BLOCKSIZE; in verity_read()
321 memset(data, 0, FEC_BLOCKSIZE); in verity_read()
326 if (!raw_pread(f, data, FEC_BLOCKSIZE, curr_offset)) { in verity_read()
338 memset(data, 0, FEC_BLOCKSIZE); in verity_read()
355 errors) == FEC_BLOCKSIZE && in verity_read()
362 errors) == FEC_BLOCKSIZE && in verity_read()
370 dump("decoded block", curr, data, FEC_BLOCKSIZE); in verity_read()
378 !raw_pwrite(f, data, FEC_BLOCKSIZE, curr_offset)) { in verity_read()
384 size_t copy = FEC_BLOCKSIZE - coff; in verity_read()