xfs: add more dquot tracepoints
Add all the xfs_dquot fields to the tracepoint for that type; add a new tracepoint type for the qtrx structure (dquot transaction deltas); and use our new tracepoints. This makes it easier for the author to trace changes to dquot counters for debugging. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Allison Collins <allison.henderson@oracle.com> Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include "xfs_trans_priv.h"
|
||||
#include "xfs_quota.h"
|
||||
#include "xfs_qm.h"
|
||||
#include "xfs_trace.h"
|
||||
|
||||
STATIC void xfs_trans_alloc_dqinfo(xfs_trans_t *);
|
||||
|
||||
@@ -203,6 +204,11 @@ xfs_trans_mod_dquot(
|
||||
if (qtrx->qt_dquot == NULL)
|
||||
qtrx->qt_dquot = dqp;
|
||||
|
||||
if (delta) {
|
||||
trace_xfs_trans_mod_dquot_before(qtrx);
|
||||
trace_xfs_trans_mod_dquot(tp, dqp, field, delta);
|
||||
}
|
||||
|
||||
switch (field) {
|
||||
|
||||
/*
|
||||
@@ -266,6 +272,10 @@ xfs_trans_mod_dquot(
|
||||
default:
|
||||
ASSERT(0);
|
||||
}
|
||||
|
||||
if (delta)
|
||||
trace_xfs_trans_mod_dquot_after(qtrx);
|
||||
|
||||
tp->t_flags |= XFS_TRANS_DQ_DIRTY;
|
||||
}
|
||||
|
||||
@@ -391,6 +401,13 @@ xfs_trans_apply_dquot_deltas(
|
||||
qtrx->qt_delbcnt_delta;
|
||||
totalrtbdelta = qtrx->qt_rtbcount_delta +
|
||||
qtrx->qt_delrtb_delta;
|
||||
|
||||
if (totalbdelta != 0 || totalrtbdelta != 0 ||
|
||||
qtrx->qt_icount_delta != 0) {
|
||||
trace_xfs_trans_apply_dquot_deltas_before(dqp);
|
||||
trace_xfs_trans_apply_dquot_deltas(qtrx);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
if (totalbdelta < 0)
|
||||
ASSERT(dqp->q_blk.count >= -totalbdelta);
|
||||
@@ -410,6 +427,10 @@ xfs_trans_apply_dquot_deltas(
|
||||
if (totalrtbdelta)
|
||||
dqp->q_rtb.count += totalrtbdelta;
|
||||
|
||||
if (totalbdelta != 0 || totalrtbdelta != 0 ||
|
||||
qtrx->qt_icount_delta != 0)
|
||||
trace_xfs_trans_apply_dquot_deltas_after(dqp);
|
||||
|
||||
/*
|
||||
* Get any default limits in use.
|
||||
* Start/reset the timer(s) if needed.
|
||||
|
Reference in New Issue
Block a user