summaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_inode_fork.c
diff options
context:
space:
mode:
authorChristoph Hellwig2017-10-19 20:04:44 +0200
committerDarrick J. Wong2017-10-27 00:38:27 +0200
commitca5d8e5b7b9030005e38e7c43e08c0cd4eb2a78f (patch)
tree7cf8ecba27b00724437132bf32ddb43721a0aa9b /fs/xfs/libxfs/xfs_inode_fork.c
parentxfs: remove post-bmap tracing in xfs_bmap_local_to_extents (diff)
downloadkernel-qcow2-linux-ca5d8e5b7b9030005e38e7c43e08c0cd4eb2a78f.tar.gz
kernel-qcow2-linux-ca5d8e5b7b9030005e38e7c43e08c0cd4eb2a78f.tar.xz
kernel-qcow2-linux-ca5d8e5b7b9030005e38e7c43e08c0cd4eb2a78f.zip
xfs: move pre/post-bmap tracing into xfs_iext_update_extent
xfs_iext_update_extent already has basically all the information needed to centralize the bmap pre/post tracing. We just need to pass inode + bmap state instead of the inode fork pointer to get all trace annotations. In addition to covering all the existing trace points this gives us tracing coverage for the extent shifting operations for free. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_inode_fork.c')
-rw-r--r--fs/xfs/libxfs/xfs_inode_fork.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_inode_fork.c b/fs/xfs/libxfs/xfs_inode_fork.c
index 31840ca24018..7f40f53e6c43 100644
--- a/fs/xfs/libxfs/xfs_inode_fork.c
+++ b/fs/xfs/libxfs/xfs_inode_fork.c
@@ -2023,12 +2023,17 @@ xfs_iext_get_extent(
void
xfs_iext_update_extent(
- struct xfs_ifork *ifp,
+ struct xfs_inode *ip,
+ int state,
xfs_extnum_t idx,
struct xfs_bmbt_irec *gotp)
{
+ struct xfs_ifork *ifp = xfs_iext_state_to_fork(ip, state);
+
ASSERT(idx >= 0);
ASSERT(idx < xfs_iext_count(ifp));
+ trace_xfs_bmap_pre_update(ip, idx, state, _RET_IP_);
xfs_bmbt_set_all(xfs_iext_get_ext(ifp, idx), gotp);
+ trace_xfs_bmap_post_update(ip, idx, state, _RET_IP_);
}