Lines Matching refs:FEC_BLOCKSIZE
80 uint64_t n = offset / FEC_BLOCKSIZE; in is_erasure()
95 uint64_t hash_offset = (offset / FEC_BLOCKSIZE) * SHA256_DIGEST_LENGTH; in is_zero()
98 v->hash_data_blocks * FEC_BLOCKSIZE - SHA256_DIGEST_LENGTH)) { in is_zero()
110 check(offset % FEC_BLOCKSIZE == 0); in __ecc_read()
115 uint64_t rsb = offset - (offset / (e->rounds * FEC_BLOCKSIZE)) * in __ecc_read()
116 e->rounds * FEC_BLOCKSIZE; in __ecc_read()
134 uint8_t bbuf[FEC_BLOCKSIZE] = {0}; in __ecc_read()
138 if (!raw_pread(f, bbuf, FEC_BLOCKSIZE, interleaved)) { in __ecc_read()
151 for (int j = 0; j < FEC_BLOCKSIZE; ++j) { in __ecc_read()
161 for (int i = 0; i < FEC_BLOCKSIZE; ++i) { in __ecc_read()
204 return FEC_BLOCKSIZE; in __ecc_read()
221 ecc_data.reset(new (std::nothrow) uint8_t[FEC_RSM * FEC_BLOCKSIZE]); in ecc_init()
252 uint64_t curr = offset / FEC_BLOCKSIZE; in ecc_read()
253 size_t coff = (size_t)(offset - curr * FEC_BLOCKSIZE); in ecc_read()
256 uint8_t data[FEC_BLOCKSIZE]; in ecc_read()
260 if (__ecc_read(f, rs.get(), data, curr * FEC_BLOCKSIZE, false, in ecc_read()
265 size_t copy = FEC_BLOCKSIZE - coff; in ecc_read()
304 uint64_t curr = offset / FEC_BLOCKSIZE; in verity_read()
305 size_t coff = (size_t)(offset - curr * FEC_BLOCKSIZE); in verity_read()
307 uint8_t data[FEC_BLOCKSIZE]; in verity_read()
309 uint64_t max_hash_block = (f->verity.hash_data_blocks * FEC_BLOCKSIZE - in verity_read()
316 uint64_t curr_offset = curr * FEC_BLOCKSIZE; in verity_read()
323 memset(data, 0, FEC_BLOCKSIZE); in verity_read()
328 if (!raw_pread(f, data, FEC_BLOCKSIZE, curr_offset)) { in verity_read()
340 memset(data, 0, FEC_BLOCKSIZE); in verity_read()
357 errors) == FEC_BLOCKSIZE && in verity_read()
364 errors) == FEC_BLOCKSIZE && in verity_read()
372 dump("decoded block", curr, data, FEC_BLOCKSIZE); in verity_read()
380 !raw_pwrite(f, data, FEC_BLOCKSIZE, curr_offset)) { in verity_read()
386 size_t copy = FEC_BLOCKSIZE - coff; in verity_read()