aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/nfsd/nfs4proc.c9
-rw-r--r--fs/nfsd/trace.h39
2 files changed, 42 insertions, 6 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 250e0c550fd8..c6157ece46b1 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -1721,12 +1721,10 @@ nfsd4_proc_compound(struct svc_rqst *rqstp)
1721 goto encode_op; 1721 goto encode_op;
1722 } 1722 }
1723 1723
1724 trace_nfsd_compound(rqstp, args->opcnt);
1724 while (!status && resp->opcnt < args->opcnt) { 1725 while (!status && resp->opcnt < args->opcnt) {
1725 op = &args->ops[resp->opcnt++]; 1726 op = &args->ops[resp->opcnt++];
1726 1727
1727 dprintk("nfsv4 compound op #%d/%d: %d (%s)\n",
1728 resp->opcnt, args->opcnt, op->opnum,
1729 nfsd4_op_name(op->opnum));
1730 /* 1728 /*
1731 * The XDR decode routines may have pre-set op->status; 1729 * The XDR decode routines may have pre-set op->status;
1732 * for example, if there is a miscellaneous XDR error 1730 * for example, if there is a miscellaneous XDR error
@@ -1800,9 +1798,8 @@ encode_op:
1800 status = op->status; 1798 status = op->status;
1801 } 1799 }
1802 1800
1803 dprintk("nfsv4 compound op %p opcnt %d #%d: %d: status %d\n", 1801 trace_nfsd_compound_status(args->opcnt, resp->opcnt, status,
1804 args->ops, args->opcnt, resp->opcnt, op->opnum, 1802 nfsd4_op_name(op->opnum));
1805 be32_to_cpu(status));
1806 1803
1807 nfsd4_cstate_clear_replay(cstate); 1804 nfsd4_cstate_clear_replay(cstate);
1808 nfsd4_increment_op_stats(op->opnum); 1805 nfsd4_increment_op_stats(op->opnum);
diff --git a/fs/nfsd/trace.h b/fs/nfsd/trace.h
index a8bbd9d00a9e..80933e4334d8 100644
--- a/fs/nfsd/trace.h
+++ b/fs/nfsd/trace.h
@@ -11,6 +11,45 @@
11#include <linux/tracepoint.h> 11#include <linux/tracepoint.h>
12#include "nfsfh.h" 12#include "nfsfh.h"
13 13
14TRACE_EVENT(nfsd_compound,
15 TP_PROTO(const struct svc_rqst *rqst,
16 u32 args_opcnt),
17 TP_ARGS(rqst, args_opcnt),
18 TP_STRUCT__entry(
19 __field(u32, xid)
20 __field(u32, args_opcnt)
21 ),
22 TP_fast_assign(
23 __entry->xid = be32_to_cpu(rqst->rq_xid);
24 __entry->args_opcnt = args_opcnt;
25 ),
26 TP_printk("xid=0x%08x opcnt=%u",
27 __entry->xid, __entry->args_opcnt)
28)
29
30TRACE_EVENT(nfsd_compound_status,
31 TP_PROTO(u32 args_opcnt,
32 u32 resp_opcnt,
33 __be32 status,
34 const char *name),
35 TP_ARGS(args_opcnt, resp_opcnt, status, name),
36 TP_STRUCT__entry(
37 __field(u32, args_opcnt)
38 __field(u32, resp_opcnt)
39 __field(int, status)
40 __string(name, name)
41 ),
42 TP_fast_assign(
43 __entry->args_opcnt = args_opcnt;
44 __entry->resp_opcnt = resp_opcnt;
45 __entry->status = be32_to_cpu(status);
46 __assign_str(name, name);
47 ),
48 TP_printk("op=%u/%u %s status=%d",
49 __entry->resp_opcnt, __entry->args_opcnt,
50 __get_str(name), __entry->status)
51)
52
14DECLARE_EVENT_CLASS(nfsd_io_class, 53DECLARE_EVENT_CLASS(nfsd_io_class,
15 TP_PROTO(struct svc_rqst *rqstp, 54 TP_PROTO(struct svc_rqst *rqstp,
16 struct svc_fh *fhp, 55 struct svc_fh *fhp,