fsverity: pass pos and size to ->write_merkle_tree_block
authorEric Biggers <ebiggers@google.com>
Wed, 14 Dec 2022 22:43:04 +0000 (14:43 -0800)
committerEric Biggers <ebiggers@google.com>
Sun, 1 Jan 2023 23:46:48 +0000 (15:46 -0800)
commit72ea15f0ddd29b9facdab836a2f5d3e28df9b202
tree9f95596ad06bec7df04f4c24aef45322cba92302
parent9642946c6c851ba954689f184b3370e3594b6b1a
fsverity: pass pos and size to ->write_merkle_tree_block

fsverity_operations::write_merkle_tree_block is passed the index of the
block to write and the log base 2 of the block size.  However, all
implementations of it use these parameters only to calculate the
position and the size of the block, in bytes.

Therefore, make ->write_merkle_tree_block take 'pos' and 'size'
parameters instead of 'index' and 'log_blocksize'.

Suggested-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Acked-by: Dave Chinner <dchinner@redhat.com>
Link: https://lore.kernel.org/r/20221214224304.145712-5-ebiggers@kernel.org
fs/btrfs/verity.c
fs/ext4/verity.c
fs/f2fs/verity.c
fs/verity/enable.c
include/linux/fsverity.h