dm-verity: rename dm_verity::hash_blocks to dm_verity::hash_end

Rename hash_blocks to hash_end to reflect what it actually is.

Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
This commit is contained in:
Eric Biggers 2026-02-05 20:59:25 -08:00 committed by Mikulas Patocka
parent 430a05cb92
commit a9fbb31af7
3 changed files with 7 additions and 7 deletions

View File

@ -635,7 +635,7 @@ int verity_fec_ctr(struct dm_verity *v)
* hash device after the hash blocks.
*/
hash_blocks = v->hash_blocks - v->hash_start;
hash_blocks = v->hash_end - v->hash_start;
/*
* Require matching block sizes for data and hash devices for

View File

@ -733,8 +733,8 @@ static void verity_prefetch_io(struct work_struct *work)
hash_block_start &= ~(sector_t)(cluster - 1);
hash_block_end |= cluster - 1;
if (unlikely(hash_block_end >= v->hash_blocks))
hash_block_end = v->hash_blocks - 1;
if (unlikely(hash_block_end >= v->hash_end))
hash_block_end = v->hash_end - 1;
}
no_prefetch_cluster:
dm_bufio_prefetch_with_ioprio(v->bufio, hash_block_start,
@ -1607,7 +1607,7 @@ static int verity_ctr(struct dm_target *ti, unsigned int argc, char **argv)
}
hash_position += s;
}
v->hash_blocks = hash_position;
v->hash_end = hash_position;
r = mempool_init_page_pool(&v->recheck_pool, 1, 0);
if (unlikely(r)) {
@ -1634,7 +1634,7 @@ static int verity_ctr(struct dm_target *ti, unsigned int argc, char **argv)
goto bad;
}
if (dm_bufio_get_device_size(v->bufio) < v->hash_blocks) {
if (dm_bufio_get_device_size(v->bufio) < v->hash_end) {
ti->error = "Hash device is too small";
r = -E2BIG;
goto bad;

View File

@ -53,9 +53,9 @@ struct dm_verity {
unsigned int sig_size; /* root digest signature size */
#endif /* CONFIG_SECURITY */
unsigned int salt_size;
sector_t hash_start; /* hash start in blocks */
sector_t hash_start; /* index of first hash block on hash_dev */
sector_t hash_end; /* 1 + index of last hash block on hash dev */
sector_t data_blocks; /* the number of data blocks */
sector_t hash_blocks; /* the number of hash blocks */
unsigned char data_dev_block_bits; /* log2(data blocksize) */
unsigned char hash_dev_block_bits; /* log2(hash blocksize) */
unsigned char hash_per_block_bits; /* log2(hashes in hash block) */