Commit ca5d8e5b authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Darrick J. Wong

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: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
parent d138604f
This diff is collapsed.
......@@ -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_);
}
......@@ -187,8 +187,8 @@ bool xfs_iext_lookup_extent(struct xfs_inode *ip,
xfs_extnum_t *idxp, struct xfs_bmbt_irec *gotp);
bool xfs_iext_get_extent(struct xfs_ifork *ifp, xfs_extnum_t idx,
struct xfs_bmbt_irec *gotp);
void xfs_iext_update_extent(struct xfs_ifork *ifp, xfs_extnum_t idx,
struct xfs_bmbt_irec *gotp);
void xfs_iext_update_extent(struct xfs_inode *ip, int state,
xfs_extnum_t idx, struct xfs_bmbt_irec *gotp);
extern struct kmem_zone *xfs_ifork_zone;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment