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

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: Trond Myklebust <trond.myklebust@hammerspace.com>

+19 -2
+10 -1
fs/nfs/nfs4trace.h
··· 701 701 ) 702 702 ); 703 703 704 - TRACE_EVENT(nfs4_xdr_status, 704 + DECLARE_EVENT_CLASS(nfs4_xdr_event, 705 705 TP_PROTO( 706 706 const struct xdr_stream *xdr, 707 707 u32 op, ··· 736 736 __entry->op 737 737 ) 738 738 ); 739 + #define DEFINE_NFS4_XDR_EVENT(name) \ 740 + DEFINE_EVENT(nfs4_xdr_event, name, \ 741 + TP_PROTO( \ 742 + const struct xdr_stream *xdr, \ 743 + u32 op, \ 744 + u32 error \ 745 + ), \ 746 + TP_ARGS(xdr, op, error)) 747 + DEFINE_NFS4_XDR_EVENT(nfs4_xdr_status); 739 748 740 749 DECLARE_EVENT_CLASS(nfs4_cb_error_class, 741 750 TP_PROTO(
+9 -1
fs/nfs/nfstrace.h
··· 1401 1401 { NFSERR_BADTYPE, "BADTYPE" }, \ 1402 1402 { NFSERR_JUKEBOX, "JUKEBOX" }) 1403 1403 1404 - TRACE_EVENT(nfs_xdr_status, 1404 + DECLARE_EVENT_CLASS(nfs_xdr_event, 1405 1405 TP_PROTO( 1406 1406 const struct xdr_stream *xdr, 1407 1407 int error ··· 1443 1443 nfs_show_status(__entry->error) 1444 1444 ) 1445 1445 ); 1446 + #define DEFINE_NFS_XDR_EVENT(name) \ 1447 + DEFINE_EVENT(nfs_xdr_event, name, \ 1448 + TP_PROTO( \ 1449 + const struct xdr_stream *xdr, \ 1450 + int error \ 1451 + ), \ 1452 + TP_ARGS(xdr, error)) 1453 + DEFINE_NFS_XDR_EVENT(nfs_xdr_status); 1446 1454 1447 1455 #endif /* _TRACE_NFS_H */ 1448 1456