Lines Matching defs:block
47 sector_t block;
53 * hash_verified is nonzero, hash of the block has been verified.
86 * Return hash position of a specified block at a specified tree level
89 * inside a hash block. The remaining bits denote location of the hash block.
91 static sector_t verity_position_at_level(struct dm_verity *v, sector_t block,
94 return block >> (level * v->hash_per_block_bits);
192 static void verity_hash_at_level(struct dm_verity *v, sector_t block, int level,
195 sector_t position = verity_position_at_level(v, block, level);
214 unsigned long long block)
240 DMERR_LIMIT("%s: %s block %llu is corrupted", v->data_dev->name,
241 type_str, block);
247 DM_VERITY_ENV_VAR_NAME, type, block);
265 * Verify hash of a metadata block pertaining to the specified data block
266 * ("block" argument) at a specified level ("level" argument).
269 * for a lower tree level or for the data block (if we're at the lowest level).
276 sector_t block, int level, bool skip_unverified,
286 verity_hash_at_level(v, block, level, &hash_block, &offset);
331 * Find a hash for a given block, write it to digest and verify the integrity
335 sector_t block, u8 *digest, bool *is_zero)
342 * the current block. If the hash block itself is
347 r = verity_verify_level(v, io, block, 0, true, digest);
355 r = verity_verify_level(v, io, block, i, false, digest);
392 * until you consider the typical block size is 4,096B.
457 * Moves the bio iter one data block forward.
482 sector_t cur_block = io->block + b;
499 * If we expect a zero block, don't validate, just
612 verity_hash_at_level(v, pw->block, i, &hash_block_start, NULL);
613 verity_hash_at_level(v, pw->block + pw->n_blocks - 1, i, &hash_block_end, NULL);
639 sector_t block = io->block;
644 while (n_blocks && test_bit(block, v->validated_blocks)) {
645 block++;
648 while (n_blocks && test_bit(block + n_blocks - 1,
663 pw->block = block;
698 io->block = bio->bi_iter.bi_sector >> (v->data_dev_block_bits - SECTOR_SHIFT);
1002 * <data block size>
1003 * <hash block size>
1005 * <hash start block>
1071 ti->error = "Invalid data device block size";
1081 ti->error = "Invalid hash device block size";