xfs: get rid of XFS_IALLOC_BLOCKS macros
Get rid of XFS_IALLOC_BLOCKS() marcos, use mp->m_ialloc_blks directly. Signed-off-by: Jie Liu <jeff.liu@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
@@ -333,7 +333,7 @@ xfs_ialloc_ag_alloc(
|
||||
if (args.mp->m_maxicount &&
|
||||
args.mp->m_sb.sb_icount + newlen > args.mp->m_maxicount)
|
||||
return XFS_ERROR(ENOSPC);
|
||||
args.minlen = args.maxlen = XFS_IALLOC_BLOCKS(args.mp);
|
||||
args.minlen = args.maxlen = args.mp->m_ialloc_blks;
|
||||
/*
|
||||
* First try to allocate inodes contiguous with the last-allocated
|
||||
* chunk of inodes. If the filesystem is striped, this will fill
|
||||
@@ -343,7 +343,7 @@ xfs_ialloc_ag_alloc(
|
||||
newino = be32_to_cpu(agi->agi_newino);
|
||||
agno = be32_to_cpu(agi->agi_seqno);
|
||||
args.agbno = XFS_AGINO_TO_AGBNO(args.mp, newino) +
|
||||
XFS_IALLOC_BLOCKS(args.mp);
|
||||
args.mp->m_ialloc_blks;
|
||||
if (likely(newino != NULLAGINO &&
|
||||
(args.agbno < be32_to_cpu(agi->agi_length)))) {
|
||||
args.fsbno = XFS_AGB_TO_FSB(args.mp, agno, args.agbno);
|
||||
@@ -585,7 +585,7 @@ xfs_ialloc_ag_select(
|
||||
* Is there enough free space for the file plus a block of
|
||||
* inodes? (if we need to allocate some)?
|
||||
*/
|
||||
ineed = XFS_IALLOC_BLOCKS(mp);
|
||||
ineed = mp->m_ialloc_blks;
|
||||
longest = pag->pagf_longest;
|
||||
if (!longest)
|
||||
longest = pag->pagf_flcount > 0;
|
||||
@@ -1228,9 +1228,9 @@ xfs_difree(
|
||||
goto error0;
|
||||
}
|
||||
|
||||
xfs_bmap_add_free(XFS_AGB_TO_FSB(mp,
|
||||
agno, XFS_AGINO_TO_AGBNO(mp, rec.ir_startino)),
|
||||
XFS_IALLOC_BLOCKS(mp), flist, mp);
|
||||
xfs_bmap_add_free(XFS_AGB_TO_FSB(mp, agno,
|
||||
XFS_AGINO_TO_AGBNO(mp, rec.ir_startino)),
|
||||
mp->m_ialloc_blks, flist, mp);
|
||||
} else {
|
||||
*delete = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user