summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_ialloc.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2013-11-01 15:27:19 +1100
committerBen Myers <bpm@sgi.com>2013-11-06 12:42:52 -0600
commitd123031a5673cd38a85ce66cc07243dfe5f424c9 (patch)
treea1620c83c6460575f31c71470c4d4200334d4315 /fs/xfs/xfs_ialloc.c
parent750b9c90668b173a92b20e747b9736b8537eda5a (diff)
downloadlinux-d123031a5673cd38a85ce66cc07243dfe5f424c9.tar.bz2
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 @@
#include "xfs_icreate_item.h"
#include "xfs_icache.h"
#include "xfs_dinode.h"
+#include "xfs_trace.h"
/*
@@ -1627,8 +1628,9 @@ xfs_read_agi(
{
int error;
- ASSERT(agno != NULLAGNUMBER);
+ trace_xfs_read_agi(mp, agno);
+ ASSERT(agno != NULLAGNUMBER);
error = xfs_trans_read_buf(mp, tp, mp->m_ddev_targp,
XFS_AG_DADDR(mp, agno, XFS_AGI_DADDR(mp)),
XFS_FSS_TO_BB(mp, 1), 0, bpp, &xfs_agi_buf_ops);
@@ -1651,6 +1653,8 @@ xfs_ialloc_read_agi(
struct xfs_perag *pag; /* per allocation group data */
int error;
+ trace_xfs_ialloc_read_agi(mp, agno);
+
error = xfs_read_agi(mp, tp, agno, bpp);
if (error)
return error;