Re: [PATCH 13/17] xfs: clean up xfs_btree_{calc_size,compute_maxlevels}

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 14, 2021 at 01:18:06PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@xxxxxxxxxx>
> 
> During review of the next patch, Dave remarked that he found these two
> btree geometry calculation functions lacking in documentation and that
> they performed more work than was really necessary.
> 
> These functions take the same parameters and have nearly the same logic;
> the only real difference is in the return values.  Reword the function
> comment to make it clearer what each function does, and move them to be
> adjacent to reinforce their relation.
> 
> Clean up both of them to stop opencoding the howmany functions, stop
> using the uint typedefs, and make them both support computations for
> more than 2^32 leaf records, since we're going to need all of the above
> for files with large data forks and large rmap btrees.
> 
> Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>
> ---
>  fs/xfs/libxfs/xfs_btree.c |   67 ++++++++++++++++++++++-----------------------
>  fs/xfs/libxfs/xfs_btree.h |    6 +++-
>  2 files changed, 37 insertions(+), 36 deletions(-)

Nice! that's soooo much easier for my simple brain to understand. :)

Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>

-- 
Dave Chinner
david@xxxxxxxxxxxxx



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux