summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_alloc.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2024-02-22 12:39:47 -0800
committerDarrick J. Wong <djwong@kernel.org>2024-02-22 12:39:47 -0800
commit77953b97bb19dc031673d055c811a5ba7df92307 (patch)
tree3ffcfabd0e9efccacbcea54310e9ac5fcdfccd06 /fs/xfs/libxfs/xfs_alloc.c
parente45ea3645178c6db91aef4314945b05e4c6ee1fc (diff)
xfs: add a name field to struct xfs_btree_ops
The btnum in struct xfs_btree_ops is often used for printing a symbolic name for the btree. Add a name field to the ops structure and use that directly. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/libxfs/xfs_alloc.c')
-rw-r--r--fs/xfs/libxfs/xfs_alloc.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/xfs/libxfs/xfs_alloc.c b/fs/xfs/libxfs/xfs_alloc.c
index 7300dc219589..44d4f0da90ba 100644
--- a/fs/xfs/libxfs/xfs_alloc.c
+++ b/fs/xfs/libxfs/xfs_alloc.c
@@ -273,9 +273,8 @@ xfs_alloc_complain_bad_rec(
struct xfs_mount *mp = cur->bc_mp;
xfs_warn(mp,
- "%s Freespace BTree record corruption in AG %d detected at %pS!",
- cur->bc_btnum == XFS_BTNUM_BNO ? "Block" : "Size",
- cur->bc_ag.pag->pag_agno, fa);
+ "%sbt record corruption in AG %d detected at %pS!",
+ cur->bc_ops->name, cur->bc_ag.pag->pag_agno, fa);
xfs_warn(mp,
"start block 0x%x block count 0x%x", irec->ar_startblock,
irec->ar_blockcount);
@@ -996,8 +995,7 @@ xfs_alloc_cur_check(
out:
if (deactivate)
cur->bc_flags &= ~XFS_BTREE_ALLOCBT_ACTIVE;
- trace_xfs_alloc_cur_check(args->mp, cur->bc_btnum, bno, len, diff,
- *new);
+ trace_xfs_alloc_cur_check(cur, bno, len, diff, *new);
return 0;
}