aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_ialloc.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_ialloc.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_ialloc.c')
-rw-r--r--fs/xfs/xfs_ialloc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c
index 14d732f61a41..e87719c5bebe 100644
--- a/fs/xfs/xfs_ialloc.c
+++ b/fs/xfs/xfs_ialloc.c
@@ -40,6 +40,7 @@
40#include "xfs_icreate_item.h" 40#include "xfs_icreate_item.h"
41#include "xfs_icache.h" 41#include "xfs_icache.h"
42#include "xfs_dinode.h" 42#include "xfs_dinode.h"
43#include "xfs_trace.h"
43 44
44 45
45/* 46/*
@@ -1627,8 +1628,9 @@ xfs_read_agi(
1627{ 1628{
1628 int error; 1629 int error;
1629 1630
1630 ASSERT(agno != NULLAGNUMBER); 1631 trace_xfs_read_agi(mp, agno);
1631 1632
1633 ASSERT(agno != NULLAGNUMBER);
1632 error = xfs_trans_read_buf(mp, tp, mp->m_ddev_targp, 1634 error = xfs_trans_read_buf(mp, tp, mp->m_ddev_targp,
1633 XFS_AG_DADDR(mp, agno, XFS_AGI_DADDR(mp)), 1635 XFS_AG_DADDR(mp, agno, XFS_AGI_DADDR(mp)),
1634 XFS_FSS_TO_BB(mp, 1), 0, bpp, &xfs_agi_buf_ops); 1636 XFS_FSS_TO_BB(mp, 1), 0, bpp, &xfs_agi_buf_ops);
@@ -1651,6 +1653,8 @@ xfs_ialloc_read_agi(
1651 struct xfs_perag *pag; /* per allocation group data */ 1653 struct xfs_perag *pag; /* per allocation group data */
1652 int error; 1654 int error;
1653 1655
1656 trace_xfs_ialloc_read_agi(mp, agno);
1657
1654 error = xfs_read_agi(mp, tp, agno, bpp); 1658 error = xfs_read_agi(mp, tp, agno, bpp);
1655 if (error) 1659 if (error)
1656 return error; 1660 return error;