aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_alloc.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_alloc.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_alloc.c')
-rw-r--r--fs/xfs/libxfs/xfs_alloc.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/xfs/libxfs/xfs_alloc.c b/fs/xfs/libxfs/xfs_alloc.c
index e9eb4b2768f2..b715668886a4 100644
--- a/fs/xfs/libxfs/xfs_alloc.c
+++ b/fs/xfs/libxfs/xfs_alloc.c
@@ -1594,7 +1594,6 @@ xfs_alloc_ag_vextent_small(
1594 xfs_extlen_t *flenp, /* result length */ 1594 xfs_extlen_t *flenp, /* result length */
1595 int *stat) /* status: 0-freelist, 1-normal/none */ 1595 int *stat) /* status: 0-freelist, 1-normal/none */
1596{ 1596{
1597 struct xfs_owner_info oinfo;
1598 int error; 1597 int error;
1599 xfs_agblock_t fbno; 1598 xfs_agblock_t fbno;
1600 xfs_extlen_t flen; 1599 xfs_extlen_t flen;
@@ -1648,9 +1647,8 @@ xfs_alloc_ag_vextent_small(
1648 * doesn't live in the free space, we need to clear 1647 * doesn't live in the free space, we need to clear
1649 * out the OWN_AG rmap. 1648 * out the OWN_AG rmap.
1650 */ 1649 */
1651 xfs_rmap_ag_owner(&oinfo, XFS_RMAP_OWN_AG);
1652 error = xfs_rmap_free(args->tp, args->agbp, args->agno, 1650 error = xfs_rmap_free(args->tp, args->agbp, args->agno,
1653 fbno, 1, &oinfo); 1651 fbno, 1, &XFS_RMAP_OINFO_AG);
1654 if (error) 1652 if (error)
1655 goto error0; 1653 goto error0;
1656 1654
@@ -2314,10 +2312,11 @@ xfs_alloc_fix_freelist(
2314 * repair/rmap.c in xfsprogs for details. 2312 * repair/rmap.c in xfsprogs for details.
2315 */ 2313 */
2316 memset(&targs, 0, sizeof(targs)); 2314 memset(&targs, 0, sizeof(targs));
2315 /* struct copy below */
2317 if (flags & XFS_ALLOC_FLAG_NORMAP) 2316 if (flags & XFS_ALLOC_FLAG_NORMAP)
2318 xfs_rmap_skip_owner_update(&targs.oinfo); 2317 targs.oinfo = XFS_RMAP_OINFO_SKIP_UPDATE;
2319 else 2318 else
2320 xfs_rmap_ag_owner(&targs.oinfo, XFS_RMAP_OWN_AG); 2319 targs.oinfo = XFS_RMAP_OINFO_AG;
2321 while (!(flags & XFS_ALLOC_FLAG_NOSHRINK) && pag->pagf_flcount > need) { 2320 while (!(flags & XFS_ALLOC_FLAG_NOSHRINK) && pag->pagf_flcount > need) {
2322 error = xfs_alloc_get_freelist(tp, agbp, &bno, 0); 2321 error = xfs_alloc_get_freelist(tp, agbp, &bno, 0);
2323 if (error) 2322 if (error)