diff options
| author | Eric Biggers <[email protected]> | 2022-12-14 14:43:04 -0800 |
|---|---|---|
| committer | Eric Biggers <[email protected]> | 2023-01-01 15:46:48 -0800 |
| commit | 72ea15f0ddd29b9facdab836a2f5d3e28df9b202 (patch) | |
| tree | 9f95596ad06bec7df04f4c24aef45322cba92302 /include/linux | |
| parent | 9642946c6c851ba954689f184b3370e3594b6b1a (diff) | |
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 <[email protected]>
Signed-off-by: Eric Biggers <[email protected]>
Acked-by: Dave Chinner <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/fsverity.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/fsverity.h b/include/linux/fsverity.h index 203f4962c54a..f5ed7ecfd9ab 100644 --- a/include/linux/fsverity.h +++ b/include/linux/fsverity.h @@ -109,9 +109,9 @@ struct fsverity_operations { * Write a Merkle tree block to the given inode. * * @inode: the inode for which the Merkle tree is being built - * @buf: block to write - * @index: 0-based index of the block within the Merkle tree - * @log_blocksize: log base 2 of the Merkle tree block size + * @buf: the Merkle tree block to write + * @pos: the position of the block in the Merkle tree (in bytes) + * @size: the Merkle tree block size (in bytes) * * This is only called between ->begin_enable_verity() and * ->end_enable_verity(). @@ -119,7 +119,7 @@ struct fsverity_operations { * Return: 0 on success, -errno on failure */ int (*write_merkle_tree_block)(struct inode *inode, const void *buf, - u64 index, int log_blocksize); + u64 pos, unsigned int size); }; #ifdef CONFIG_FS_VERITY |