aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_alloc.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2013-11-01 00:27:19 -0400
committerBen Myers <bpm@sgi.com>2013-11-06 13:42:52 -0500
commitd123031a5673cd38a85ce66cc07243dfe5f424c9 (patch)
treea1620c83c6460575f31c71470c4d4200334d4315 /fs/xfs/xfs_alloc.c
parent750b9c90668b173a92b20e747b9736b8537eda5a (diff)
xfs: add tracepoints to AGF/AGI read operations
To help track down AGI/AGF lock ordering issues, I added these tracepoints to tell us when an AGI or AGF is read and locked. With these we can now determine if the lock ordering goes wrong from tracing captures. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_alloc.c')
-rw-r--r--fs/xfs/xfs_alloc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/xfs/xfs_alloc.c b/fs/xfs/xfs_alloc.c
index bcf16528bac5..9eab2dfdcbb5 100644
--- a/fs/xfs/xfs_alloc.c
+++ b/fs/xfs/xfs_alloc.c
@@ -2294,6 +2294,8 @@ xfs_read_agf(
2294{ 2294{
2295 int error; 2295 int error;
2296 2296
2297 trace_xfs_read_agf(mp, agno);
2298
2297 ASSERT(agno != NULLAGNUMBER); 2299 ASSERT(agno != NULLAGNUMBER);
2298 error = xfs_trans_read_buf( 2300 error = xfs_trans_read_buf(
2299 mp, tp, mp->m_ddev_targp, 2301 mp, tp, mp->m_ddev_targp,
@@ -2324,8 +2326,9 @@ xfs_alloc_read_agf(
2324 struct xfs_perag *pag; /* per allocation group data */ 2326 struct xfs_perag *pag; /* per allocation group data */
2325 int error; 2327 int error;
2326 2328
2327 ASSERT(agno != NULLAGNUMBER); 2329 trace_xfs_alloc_read_agf(mp, agno);
2328 2330
2331 ASSERT(agno != NULLAGNUMBER);
2329 error = xfs_read_agf(mp, tp, agno, 2332 error = xfs_read_agf(mp, tp, agno,
2330 (flags & XFS_ALLOC_FLAG_TRYLOCK) ? XBF_TRYLOCK : 0, 2333 (flags & XFS_ALLOC_FLAG_TRYLOCK) ? XBF_TRYLOCK : 0,
2331 bpp); 2334 bpp);