Skip to content

Commit bcdfae6

Browse files
Christoph HellwigChandan Babu R
authored andcommitted
xfs: use the op name in trace_xlog_intent_recovery_failed
Instead of tracing the address of the recovery handler, use the name in the defer op, similar to other defer ops related tracepoints. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: "Darrick J. Wong" <djwong@kernel.org> Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
1 parent 4f6ac47 commit bcdfae6

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

fs/xfs/libxfs/xfs_defer.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -921,8 +921,7 @@ xfs_defer_finish_recovery(
921921
/* dfp is freed by recover_work and must not be accessed afterwards */
922922
error = ops->recover_work(dfp, capture_list);
923923
if (error)
924-
trace_xlog_intent_recovery_failed(mp, error,
925-
ops->recover_work);
924+
trace_xlog_intent_recovery_failed(mp, ops, error);
926925
return error;
927926
}
928927

fs/xfs/xfs_trace.h

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ struct xfs_buf_log_format;
6767
struct xfs_inode_log_format;
6868
struct xfs_bmbt_irec;
6969
struct xfs_btree_cur;
70+
struct xfs_defer_op_type;
7071
struct xfs_refcount_irec;
7172
struct xfs_fsmap;
7273
struct xfs_rmap_irec;
@@ -145,21 +146,23 @@ DEFINE_ATTR_LIST_EVENT(xfs_attr_leaf_list);
145146
DEFINE_ATTR_LIST_EVENT(xfs_attr_node_list);
146147

147148
TRACE_EVENT(xlog_intent_recovery_failed,
148-
TP_PROTO(struct xfs_mount *mp, int error, void *function),
149-
TP_ARGS(mp, error, function),
149+
TP_PROTO(struct xfs_mount *mp, const struct xfs_defer_op_type *ops,
150+
int error),
151+
TP_ARGS(mp, ops, error),
150152
TP_STRUCT__entry(
151153
__field(dev_t, dev)
154+
__string(name, ops->name)
152155
__field(int, error)
153-
__field(void *, function)
154156
),
155157
TP_fast_assign(
156158
__entry->dev = mp->m_super->s_dev;
159+
__assign_str(name, ops->name);
157160
__entry->error = error;
158-
__entry->function = function;
159161
),
160-
TP_printk("dev %d:%d error %d function %pS",
162+
TP_printk("dev %d:%d optype %s error %d",
161163
MAJOR(__entry->dev), MINOR(__entry->dev),
162-
__entry->error, __entry->function)
164+
__get_str(name),
165+
__entry->error)
163166
);
164167

165168
DECLARE_EVENT_CLASS(xfs_perag_class,

0 commit comments

Comments
 (0)