aboutsummaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_bmap.c
diff options
context:
space:
mode:
authorGravatar Darrick J. Wong <djwong@kernel.org> 2024-02-22 12:43:53 -0800
committerGravatar Darrick J. Wong <djwong@kernel.org> 2024-02-22 12:43:53 -0800
commit2a15e7686094d1362b5026533b96f57ec989a245 (patch)
treeb5044f6850dbd17a0177c09e305bd23b6fd4700c /fs/xfs/libxfs/xfs_bmap.c
parentxfs: split tracepoint classes for deferred items (diff)
downloadlinux-2a15e7686094d1362b5026533b96f57ec989a245.tar.gz
linux-2a15e7686094d1362b5026533b96f57ec989a245.tar.bz2
linux-2a15e7686094d1362b5026533b96f57ec989a245.zip
xfs: clean up bmap log intent item tracepoint callsites
Pass the incore bmap structure to the tracepoints instead of open-coding the argument passing. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/libxfs/xfs_bmap.c')
-rw-r--r--fs/xfs/libxfs/xfs_bmap.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
index 06e329221cd5..b90a90305216 100644
--- a/fs/xfs/libxfs/xfs_bmap.c
+++ b/fs/xfs/libxfs/xfs_bmap.c
@@ -6191,15 +6191,6 @@ __xfs_bmap_add(
{
struct xfs_bmap_intent *bi;
- trace_xfs_bmap_defer(tp->t_mountp,
- XFS_FSB_TO_AGNO(tp->t_mountp, bmap->br_startblock),
- type,
- XFS_FSB_TO_AGBNO(tp->t_mountp, bmap->br_startblock),
- ip->i_ino, whichfork,
- bmap->br_startoff,
- bmap->br_blockcount,
- bmap->br_state);
-
bi = kmem_cache_alloc(xfs_bmap_intent_cache, GFP_KERNEL | __GFP_NOFAIL);
INIT_LIST_HEAD(&bi->bi_list);
bi->bi_type = type;
@@ -6207,6 +6198,8 @@ __xfs_bmap_add(
bi->bi_whichfork = whichfork;
bi->bi_bmap = *bmap;
+ trace_xfs_bmap_defer(bi);
+
xfs_bmap_update_get_group(tp->t_mountp, bi);
xfs_defer_add(tp, &bi->bi_list, &xfs_bmap_update_defer_type);
return 0;
@@ -6252,13 +6245,7 @@ xfs_bmap_finish_one(
ASSERT(tp->t_highest_agno == NULLAGNUMBER);
- trace_xfs_bmap_deferred(tp->t_mountp,
- XFS_FSB_TO_AGNO(tp->t_mountp, bmap->br_startblock),
- bi->bi_type,
- XFS_FSB_TO_AGBNO(tp->t_mountp, bmap->br_startblock),
- bi->bi_owner->i_ino, bi->bi_whichfork,
- bmap->br_startoff, bmap->br_blockcount,
- bmap->br_state);
+ trace_xfs_bmap_deferred(bi);
if (WARN_ON_ONCE(bi->bi_whichfork != XFS_DATA_FORK)) {
xfs_bmap_mark_sick(bi->bi_owner, bi->bi_whichfork);