]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
dm-verity-fec: replace io_size with block_size
authorEric Biggers <ebiggers@kernel.org>
Fri, 6 Feb 2026 04:59:30 +0000 (20:59 -0800)
committerMikulas Patocka <mpatocka@redhat.com>
Mon, 9 Mar 2026 14:12:29 +0000 (15:12 +0100)
commite75d55461871bbf5debe33f528f267e23c84a370
treed5da3bbeb717ee6820d7730a1bd389c8ca8353c8
parent9b6098ad5b19261fd319b2637a28c69693585908
dm-verity-fec: replace io_size with block_size

dm-verity's FEC implementation assumes that data_block_size ==
hash_block_size, and it accesses the FEC device in units of the same
size.  Many places in the code want that size and compute it on-demand
as '1 << v->data_dev_block_bits'.  However, it's actually already
available in v->fec->io_size.  Rename that field to block_size,
initialize it a bit earlier, and use it in the appropriate places.

Note that while these sizes could in principle be different, that case
is not supported.  So there's no need to complicate the code for it.

Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
drivers/md/dm-verity-fec.c
drivers/md/dm-verity-fec.h