diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2018-12-12 17:46:24 +0100 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2018-12-12 17:47:16 +0100 |
commit | 43004b2a8da2652b5ec526269a8acfba7d3d219c (patch) | |
tree | 197c76e61334c576f18530dd05a86958aac4101e /fs/xfs/xfs_itable.c | |
parent | xfs: remove xfs_rmap_ag_owner and friends (diff) | |
download | linux-43004b2a8da2652b5ec526269a8acfba7d3d219c.tar.xz linux-43004b2a8da2652b5ec526269a8acfba7d3d219c.zip |
xfs: add a block to inode count converter
Add new helpers to convert units of fs blocks into inodes, and AG blocks
into AG inodes, respectively. Convert all the open-coded conversions
and XFS_OFFBNO_TO_AGINO(, , 0) calls to use them, as appropriate. The
OFFBNO_TO_AGINO macro is retained for xfs_repair.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Diffstat (limited to 'fs/xfs/xfs_itable.c')
-rw-r--r-- | fs/xfs/xfs_itable.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_itable.c b/fs/xfs/xfs_itable.c index e9508ba01ed1..18d8d3b812a7 100644 --- a/fs/xfs/xfs_itable.c +++ b/fs/xfs/xfs_itable.c @@ -173,7 +173,7 @@ xfs_bulkstat_ichunk_ra( agbno = XFS_AGINO_TO_AGBNO(mp, irec->ir_startino); blks_per_cluster = xfs_icluster_size_fsb(mp); - inodes_per_cluster = blks_per_cluster << mp->m_sb.sb_inopblog; + inodes_per_cluster = XFS_FSB_TO_INO(mp, blks_per_cluster); blk_start_plug(&plug); for (i = 0; i < XFS_INODES_PER_CHUNK; |