Skip to content

Commit b9376c7

Browse files
jtlaytonchucklever
authored andcommitted
nfsd: new tracepoint for after op_func in compound processing
Turn nfsd_compound_encode_err tracepoint into a class and add a new nfsd_compound_op_err tracepoint. Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: Chuck Lever <[email protected]>
1 parent f6259e2 commit b9376c7

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

fs/nfsd/nfs4proc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2780,6 +2780,7 @@ nfsd4_proc_compound(struct svc_rqst *rqstp)
27802780
if (op->opdesc->op_get_currentstateid)
27812781
op->opdesc->op_get_currentstateid(cstate, &op->u);
27822782
op->status = op->opdesc->op_func(rqstp, cstate, &op->u);
2783+
trace_nfsd_compound_op_err(rqstp, op->opnum, op->status);
27832784

27842785
/* Only from SEQUENCE */
27852786
if (cstate->status == nfserr_replay_cache) {

fs/nfsd/trace.h

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ TRACE_EVENT(nfsd_compound_decode_err,
163163
__entry->opnum, __entry->status)
164164
);
165165

166-
TRACE_EVENT(nfsd_compound_encode_err,
166+
DECLARE_EVENT_CLASS(nfsd_compound_err_class,
167167
TP_PROTO(
168168
const struct svc_rqst *rqstp,
169169
u32 opnum,
@@ -184,6 +184,18 @@ TRACE_EVENT(nfsd_compound_encode_err,
184184
__entry->opnum, __entry->status)
185185
);
186186

187+
#define DEFINE_NFSD_COMPOUND_ERR_EVENT(name) \
188+
DEFINE_EVENT(nfsd_compound_err_class, nfsd_compound_##name##_err, \
189+
TP_PROTO( \
190+
const struct svc_rqst *rqstp, \
191+
u32 opnum, \
192+
__be32 status \
193+
), \
194+
TP_ARGS(rqstp, opnum, status))
195+
196+
DEFINE_NFSD_COMPOUND_ERR_EVENT(op);
197+
DEFINE_NFSD_COMPOUND_ERR_EVENT(encode);
198+
187199
#define show_fs_file_type(x) \
188200
__print_symbolic(x, \
189201
{ S_IFLNK, "LNK" }, \

0 commit comments

Comments
 (0)