Skip to content

Commit

Permalink
xfs: Use xfs_rfsblock_t to count maximum blocks that can be used by BMBT
Browse files Browse the repository at this point in the history
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Chandan Babu R <chandan.babu@oracle.com>
  • Loading branch information
Chandan Babu R authored and intel-lab-lkp committed Jan 21, 2022
1 parent 5067c5c commit d0618bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/xfs/libxfs/xfs_bmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ xfs_bmap_compute_maxlevels(
int whichfork) /* data or attr fork */
{
xfs_extnum_t maxleafents; /* max leaf entries possible */
xfs_rfsblock_t maxblocks; /* max blocks at this level */
int level; /* btree level */
uint maxblocks; /* max blocks at this level */
int maxrootrecs; /* max records in root block */
int minleafrecs; /* min records in leaf block */
int minnoderecs; /* min records in node block */
Expand Down Expand Up @@ -88,7 +88,7 @@ xfs_bmap_compute_maxlevels(
if (maxblocks <= maxrootrecs)
maxblocks = 1;
else
maxblocks = (maxblocks + minnoderecs - 1) / minnoderecs;
maxblocks = howmany_64(maxblocks, minnoderecs);
}
mp->m_bm_maxlevels[whichfork] = level;
ASSERT(mp->m_bm_maxlevels[whichfork] <= xfs_bmbt_maxlevels_ondisk());
Expand Down

0 comments on commit d0618bd

Please sign in to comment.