mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
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>
This commit is contained in:
parent
7280fedaf3
commit
43004b2a8d
8 changed files with 18 additions and 17 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue