Re: [PATCH 08/13] fsverity: expose merkle tree geometry to callers

Eric Biggers
2024-04-25T00:49:29Z

On Wed, Apr 24, 2024 at 05:45:45PM -0700, Darrick J. Wong wrote:
> On Thu, Apr 04, 2024 at 10:50:45PM -0400, Eric Biggers wrote:
> > On Fri, Mar 29, 2024 at 05:34:45PM -0700, Darrick J. Wong wrote:
> > > +/**
> > > + * fsverity_merkle_tree_geometry() - return Merkle tree geometry
> > > + * @inode: the inode for which the Merkle tree is being built
> >
> > This function is actually for inodes that already have fsverity enabled. So the
> > above comment is misleading.
>
> How about:
>
> /**
> * fsverity_merkle_tree_geometry() - return Merkle tree geometry
> * @inode: the inode to query
> * @block_size: size of a merkle tree block, in bytes
> * @tree_size: size of the merkle tree, in bytes
> *
> * Callers are not required to have opened the file.
> */

Looks okay, but it would be helpful to document that the two output parameters
are outputs, and to document the return value.

- Eric