summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/svc.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@primarydata.com>2014-10-28 14:24:12 -0400
committerTrond Myklebust <trond.myklebust@primarydata.com>2014-11-24 12:53:34 -0500
commit860a0d9e511f278bedab62d555a457c18e0841d5 (patch)
tree4e5348dd4d2e9abf81dea3c9715fe887a4f3fedc /net/sunrpc/svc.c
parent878ffa9f855e84d35d950f1abeb5a37b8435baea (diff)
downloadblackbird-op-linux-860a0d9e511f278bedab62d555a457c18e0841d5.tar.gz
blackbird-op-linux-860a0d9e511f278bedab62d555a457c18e0841d5.zip
sunrpc: add some tracepoints in svc_rqst handling functions
...just around svc_send, svc_recv and svc_process for now. Signed-off-by: Jeff Layton <jlayton@primarydata.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'net/sunrpc/svc.c')
-rw-r--r--net/sunrpc/svc.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index ca8a7958f4e6..371a8bbb43d6 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -28,6 +28,8 @@
#include <linux/sunrpc/clnt.h>
#include <linux/sunrpc/bc_xprt.h>
+#include <trace/events/sunrpc.h>
+
#define RPCDBG_FACILITY RPCDBG_SVCDSP
static void svc_unregister(const struct svc_serv *serv, struct net *net);
@@ -1314,24 +1316,25 @@ svc_process(struct svc_rqst *rqstp)
rqstp->rq_res.tail[0].iov_base = NULL;
rqstp->rq_res.tail[0].iov_len = 0;
- rqstp->rq_xid = svc_getu32(argv);
-
dir = svc_getnl(argv);
if (dir != 0) {
/* direction != CALL */
svc_printk(rqstp, "bad direction %d, dropping request\n", dir);
serv->sv_stats->rpcbadfmt++;
- svc_drop(rqstp);
- return 0;
+ goto out_drop;
}
/* Returns 1 for send, 0 for drop */
- if (svc_process_common(rqstp, argv, resv))
- return svc_send(rqstp);
- else {
- svc_drop(rqstp);
- return 0;
+ if (likely(svc_process_common(rqstp, argv, resv))) {
+ int ret = svc_send(rqstp);
+
+ trace_svc_process(rqstp, ret);
+ return ret;
}
+out_drop:
+ trace_svc_process(rqstp, 0);
+ svc_drop(rqstp);
+ return 0;
}
#if defined(CONFIG_SUNRPC_BACKCHANNEL)
OpenPOWER on IntegriCloud