Re: [PATCH 16/17] xfs: compute absolute maximum nlevels for each btree type

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

 



On Thu, Oct 14, 2021 at 01:18:22PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@xxxxxxxxxx>
> 
> Add code for all five btree types so that we can compute the absolute
> maximum possible btree height for each btree type.  This is a setup for
> the next patch, which makes every btree type have its own cursor cache.
> 
> The functions are exported so that we can have xfs_db report the
> absolute maximum btree heights for each btree type, rather than making
> everyone run their own ad-hoc computations.
> 
> Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>
> ---
>  fs/xfs/libxfs/xfs_alloc.c          |    1 +
>  fs/xfs/libxfs/xfs_alloc_btree.c    |   33 ++++++++++++++++++-
>  fs/xfs/libxfs/xfs_alloc_btree.h    |    2 +
>  fs/xfs/libxfs/xfs_bmap.c           |    1 +
>  fs/xfs/libxfs/xfs_bmap_btree.c     |   31 +++++++++++++++++-
>  fs/xfs/libxfs/xfs_bmap_btree.h     |    2 +
>  fs/xfs/libxfs/xfs_fs.h             |    2 +
>  fs/xfs/libxfs/xfs_ialloc.c         |    1 +
>  fs/xfs/libxfs/xfs_ialloc_btree.c   |   61 ++++++++++++++++++++++++++++++++++--
>  fs/xfs/libxfs/xfs_ialloc_btree.h   |    2 +
>  fs/xfs/libxfs/xfs_refcount_btree.c |   45 ++++++++++++++++++++++-----
>  fs/xfs/libxfs/xfs_refcount_btree.h |    2 +
>  fs/xfs/libxfs/xfs_rmap_btree.c     |   43 +++++++++++++++++++++++--
>  fs/xfs/libxfs/xfs_rmap_btree.h     |    2 +
>  14 files changed, 207 insertions(+), 21 deletions(-)

It's a little more verbose than the previous version, but the clear
explanations of how we are calculating the maximum levels is a big
improvement. Nice!

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