Lines Matching refs:block

32  * Return an interleaved offset for a byte in RS block.
43 * Decode an RS block using Reed-Solomon.
59 * Read error-correcting codes for the requested RS block. Returns a pointer
60 * to the data block. Caller is responsible for releasing buf.
66 u64 position, block, rem;
70 block = div64_u64_rem(position, v->fec->io_size, &rem);
73 res = dm_bufio_read_with_ioprio(v->fec->bufio, block, buf, ioprio);
75 DMERR("%s: FEC %llu: parity read failed (block %llu): %ld",
77 (unsigned long long)block, PTR_ERR(res));
96 /* Loop over each RS block in each allocated buffer. */
102 * Return a pointer to the current RS block when called inside
113 * Return an index to the current RS block when called inside
132 u8 *par, *block;
140 * Decode the RS blocks we have in bufs. Each RS block results in
144 block = fec_buffer_rs_block(v, fio, n, i);
145 res = fec_decode_rs8(v, fio, block, &par[offset], neras);
152 fio->output[block_offset] = block[byte_index];
158 /* read the next block when we run out of parity bytes */
184 * Locate data block erasures using verity hashes.
199 * Read data blocks that are part of the RS block and deinterleave as much as
211 u64 block, ileaved;
224 * read each of the rsn data blocks that are part of the RS block, and
231 * target is the data block we want to correct, target_index is
232 * the index of this block within the rsn RS blocks
237 block = ileaved >> v->data_dev_block_bits;
240 if (block >= v->data_blocks) {
241 block -= v->data_blocks;
247 if (unlikely(block >= v->fec->hash_blocks))
250 block += v->hash_start;
254 bbuf = dm_bufio_read_with_ioprio(bufio, block, &buf, bio_prio(bio));
259 (unsigned long long)block, PTR_ERR(bbuf));
261 /* assume the block is corrupted */
268 /* locate erasures if the block is on the data device */
270 verity_hash_for_block(v, io, block, want_digest,
360 * Decode all RS blocks in a single data block and return the target block
390 /* Always re-validate the corrected block against the expected hash */
419 * Correct errors in a block. Copies corrected block to dest if non-NULL,
423 enum verity_block_type type, sector_t block, u8 *dest,
441 block = block - v->hash_start + v->data_blocks;
445 * bytes. Since block size may not be divisible by N, the last block
448 * Each byte of the block is covered by a different RS(M, N) code,
453 offset = block << v->data_dev_block_bits;
457 * The base RS block we can feed to the interleaver to find out all
463 * Locating erasures is slow, so attempt to recover the block without
706 * Require matching block sizes for data and hash devices for