aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_ialloc.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2018-12-12 11:46:23 -0500
committerDarrick J. Wong <darrick.wong@oracle.com>2018-12-12 11:47:16 -0500
commit7280fedaf3a0f9097c0621c7d5b35849954d7f54 (patch)
treea454c99dfb864a35505fed5744a09a0048db9493 /fs/xfs/libxfs/xfs_ialloc.c
parent66e3237e724c6650dca03627b40bb00a812d3f7a (diff)
xfs: remove xfs_rmap_ag_owner and friends
Owner information for static fs metadata can be defined readonly at build time because it never changes across filesystems. This enables us to reduce stack usage (particularly in scrub) because we can use the statically defined oinfo structures. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_ialloc.c')
-rw-r--r--fs/xfs/libxfs/xfs_ialloc.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/xfs/libxfs/xfs_ialloc.c b/fs/xfs/libxfs/xfs_ialloc.c
index a8f6db735d5d..fcf0d17405d8 100644
--- a/fs/xfs/libxfs/xfs_ialloc.c
+++ b/fs/xfs/libxfs/xfs_ialloc.c
@@ -641,7 +641,7 @@ xfs_ialloc_ag_alloc(
641 args.tp = tp; 641 args.tp = tp;
642 args.mp = tp->t_mountp; 642 args.mp = tp->t_mountp;
643 args.fsbno = NULLFSBLOCK; 643 args.fsbno = NULLFSBLOCK;
644 xfs_rmap_ag_owner(&args.oinfo, XFS_RMAP_OWN_INODES); 644 args.oinfo = XFS_RMAP_OINFO_INODES;
645 645
646#ifdef DEBUG 646#ifdef DEBUG
647 /* randomly do sparse inode allocations */ 647 /* randomly do sparse inode allocations */
@@ -1849,14 +1849,12 @@ xfs_difree_inode_chunk(
1849 int nextbit; 1849 int nextbit;
1850 xfs_agblock_t agbno; 1850 xfs_agblock_t agbno;
1851 int contigblk; 1851 int contigblk;
1852 struct xfs_owner_info oinfo;
1853 DECLARE_BITMAP(holemask, XFS_INOBT_HOLEMASK_BITS); 1852 DECLARE_BITMAP(holemask, XFS_INOBT_HOLEMASK_BITS);
1854 xfs_rmap_ag_owner(&oinfo, XFS_RMAP_OWN_INODES);
1855 1853
1856 if (!xfs_inobt_issparse(rec->ir_holemask)) { 1854 if (!xfs_inobt_issparse(rec->ir_holemask)) {
1857 /* not sparse, calculate extent info directly */ 1855 /* not sparse, calculate extent info directly */
1858 xfs_bmap_add_free(tp, XFS_AGB_TO_FSB(mp, agno, sagbno), 1856 xfs_bmap_add_free(tp, XFS_AGB_TO_FSB(mp, agno, sagbno),
1859 mp->m_ialloc_blks, &oinfo); 1857 mp->m_ialloc_blks, &XFS_RMAP_OINFO_INODES);
1860 return; 1858 return;
1861 } 1859 }
1862 1860
@@ -1900,7 +1898,7 @@ xfs_difree_inode_chunk(
1900 ASSERT(agbno % mp->m_sb.sb_spino_align == 0); 1898 ASSERT(agbno % mp->m_sb.sb_spino_align == 0);
1901 ASSERT(contigblk % mp->m_sb.sb_spino_align == 0); 1899 ASSERT(contigblk % mp->m_sb.sb_spino_align == 0);
1902 xfs_bmap_add_free(tp, XFS_AGB_TO_FSB(mp, agno, agbno), 1900 xfs_bmap_add_free(tp, XFS_AGB_TO_FSB(mp, agno, agbno),
1903 contigblk, &oinfo); 1901 contigblk, &XFS_RMAP_OINFO_INODES);
1904 1902
1905 /* reset range to current bit and carry on... */ 1903 /* reset range to current bit and carry on... */
1906 startidx = endidx = nextbit; 1904 startidx = endidx = nextbit;