SUNRPC: Add tracepoint for socket errors
authorTrond Myklebust <trond.myklebust@primarydata.com>
Tue, 31 Dec 2013 18:39:22 +0000 (13:39 -0500)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Tue, 31 Dec 2013 19:02:46 +0000 (14:02 -0500)
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
include/trace/events/sunrpc.h
net/sunrpc/xprtsock.c

index d51d16c7afd86d64b02092f0a8e4969b4ab5eaa2..ddc179b7a1052aa6c3fb9df408e3b5ad9e50d792 100644 (file)
@@ -301,6 +301,7 @@ DECLARE_EVENT_CLASS(xs_socket_event_done,
 
 DEFINE_RPC_SOCKET_EVENT(rpc_socket_state_change);
 DEFINE_RPC_SOCKET_EVENT_DONE(rpc_socket_connect);
+DEFINE_RPC_SOCKET_EVENT_DONE(rpc_socket_error);
 DEFINE_RPC_SOCKET_EVENT_DONE(rpc_socket_reset_connection);
 DEFINE_RPC_SOCKET_EVENT(rpc_socket_close);
 DEFINE_RPC_SOCKET_EVENT(rpc_socket_shutdown);
index ab006b7b7ab81a9a14a01c6e9cff68f58e28def7..25dbfa9719482acef0e9d859c1172a04493f8869 100644 (file)
@@ -837,6 +837,7 @@ static void xs_error_report(struct sock *sk)
                goto out;
        dprintk("RPC:       xs_error_report client %p, error=%d...\n",
                        xprt, -err);
+       trace_rpc_socket_error(xprt, sk->sk_socket, err);
        xprt_wake_pending_tasks(xprt, err);
  out:
        read_unlock_bh(&sk->sk_callback_lock);