]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
nfsd: new tracepoint for after op_func in compound processing
authorJeff Layton <jlayton@kernel.org>
Fri, 18 Oct 2024 18:45:01 +0000 (14:45 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Tue, 19 Nov 2024 01:22:58 +0000 (20:22 -0500)
Turn nfsd_compound_encode_err tracepoint into a class and add a new
nfsd_compound_op_err tracepoint.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/nfs4proc.c
fs/nfsd/trace.h

index d32f2dfd148fe3080006eb6346be7a69065a04f9..93089f7064f0b4ae07523cc910c49aef2a0b05d5 100644 (file)
@@ -2780,6 +2780,7 @@ nfsd4_proc_compound(struct svc_rqst *rqstp)
                if (op->opdesc->op_get_currentstateid)
                        op->opdesc->op_get_currentstateid(cstate, &op->u);
                op->status = op->opdesc->op_func(rqstp, cstate, &op->u);
+               trace_nfsd_compound_op_err(rqstp, op->opnum, op->status);
 
                /* Only from SEQUENCE */
                if (cstate->status == nfserr_replay_cache) {
index b8470d4cbe99e92009467cd546e60a18559fbaf2..344803cf8004a6fdbfd3683c48104305720cee12 100644 (file)
@@ -163,7 +163,7 @@ TRACE_EVENT(nfsd_compound_decode_err,
                __entry->opnum, __entry->status)
 );
 
-TRACE_EVENT(nfsd_compound_encode_err,
+DECLARE_EVENT_CLASS(nfsd_compound_err_class,
        TP_PROTO(
                const struct svc_rqst *rqstp,
                u32 opnum,
@@ -184,6 +184,18 @@ TRACE_EVENT(nfsd_compound_encode_err,
                __entry->opnum, __entry->status)
 );
 
+#define DEFINE_NFSD_COMPOUND_ERR_EVENT(name)                           \
+DEFINE_EVENT(nfsd_compound_err_class, nfsd_compound_##name##_err,      \
+       TP_PROTO(                                                       \
+               const struct svc_rqst *rqstp,                           \
+               u32 opnum,                                              \
+               __be32 status                                           \
+       ),                                                              \
+       TP_ARGS(rqstp, opnum, status))
+
+DEFINE_NFSD_COMPOUND_ERR_EVENT(op);
+DEFINE_NFSD_COMPOUND_ERR_EVENT(encode);
+
 #define show_fs_file_type(x) \
        __print_symbolic(x, \
                { S_IFLNK,              "LNK" }, \