Commit 3d66bae1 authored by Trond Myklebust's avatar Trond Myklebust

NFSv4: Convert nfs_xdr_status tracepoint to an event class

We would like the ability to record other XDR errors, particularly
those that are due to server bugs.
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent da934ae0
...@@ -701,7 +701,7 @@ TRACE_EVENT(nfs4_xdr_bad_operation, ...@@ -701,7 +701,7 @@ TRACE_EVENT(nfs4_xdr_bad_operation,
) )
); );
TRACE_EVENT(nfs4_xdr_status, DECLARE_EVENT_CLASS(nfs4_xdr_event,
TP_PROTO( TP_PROTO(
const struct xdr_stream *xdr, const struct xdr_stream *xdr,
u32 op, u32 op,
...@@ -736,6 +736,15 @@ TRACE_EVENT(nfs4_xdr_status, ...@@ -736,6 +736,15 @@ TRACE_EVENT(nfs4_xdr_status,
__entry->op __entry->op
) )
); );
#define DEFINE_NFS4_XDR_EVENT(name) \
DEFINE_EVENT(nfs4_xdr_event, name, \
TP_PROTO( \
const struct xdr_stream *xdr, \
u32 op, \
u32 error \
), \
TP_ARGS(xdr, op, error))
DEFINE_NFS4_XDR_EVENT(nfs4_xdr_status);
DECLARE_EVENT_CLASS(nfs4_cb_error_class, DECLARE_EVENT_CLASS(nfs4_cb_error_class,
TP_PROTO( TP_PROTO(
......
...@@ -1401,7 +1401,7 @@ TRACE_DEFINE_ENUM(NFSERR_JUKEBOX); ...@@ -1401,7 +1401,7 @@ TRACE_DEFINE_ENUM(NFSERR_JUKEBOX);
{ NFSERR_BADTYPE, "BADTYPE" }, \ { NFSERR_BADTYPE, "BADTYPE" }, \
{ NFSERR_JUKEBOX, "JUKEBOX" }) { NFSERR_JUKEBOX, "JUKEBOX" })
TRACE_EVENT(nfs_xdr_status, DECLARE_EVENT_CLASS(nfs_xdr_event,
TP_PROTO( TP_PROTO(
const struct xdr_stream *xdr, const struct xdr_stream *xdr,
int error int error
...@@ -1443,6 +1443,14 @@ TRACE_EVENT(nfs_xdr_status, ...@@ -1443,6 +1443,14 @@ TRACE_EVENT(nfs_xdr_status,
nfs_show_status(__entry->error) nfs_show_status(__entry->error)
) )
); );
#define DEFINE_NFS_XDR_EVENT(name) \
DEFINE_EVENT(nfs_xdr_event, name, \
TP_PROTO( \
const struct xdr_stream *xdr, \
int error \
), \
TP_ARGS(xdr, error))
DEFINE_NFS_XDR_EVENT(nfs_xdr_status);
#endif /* _TRACE_NFS_H */ #endif /* _TRACE_NFS_H */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment