Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

authored by

Jeff Layton and committed by
Chuck Lever
b9376c7e f6259e2e

+14 -1
+1
fs/nfsd/nfs4proc.c
··· 2780 2780 if (op->opdesc->op_get_currentstateid) 2781 2781 op->opdesc->op_get_currentstateid(cstate, &op->u); 2782 2782 op->status = op->opdesc->op_func(rqstp, cstate, &op->u); 2783 + trace_nfsd_compound_op_err(rqstp, op->opnum, op->status); 2783 2784 2784 2785 /* Only from SEQUENCE */ 2785 2786 if (cstate->status == nfserr_replay_cache) {
+13 -1
fs/nfsd/trace.h
··· 163 163 __entry->opnum, __entry->status) 164 164 ); 165 165 166 - TRACE_EVENT(nfsd_compound_encode_err, 166 + DECLARE_EVENT_CLASS(nfsd_compound_err_class, 167 167 TP_PROTO( 168 168 const struct svc_rqst *rqstp, 169 169 u32 opnum, ··· 183 183 TP_printk("opnum=%u status=%lu", 184 184 __entry->opnum, __entry->status) 185 185 ); 186 + 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); 186 198 187 199 #define show_fs_file_type(x) \ 188 200 __print_symbolic(x, \