SUNRPC: Clean up call_bind_status() observability
Time to remove dprintk call sites in here. Regarding the rpc_bind_status tracepoint: It's friendlier to administrators if they don't have to look up the error code to figure out what went wrong. Replace trace_rpc_bind_status with a set of tracepoints that report more specifically what the problem was, and what RPC program/version was being queried. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
parent
fd66e2a79d
commit
42ebfc2cbf
|
@ -259,7 +259,6 @@ DECLARE_EVENT_CLASS(rpc_task_status,
|
||||||
TP_ARGS(task))
|
TP_ARGS(task))
|
||||||
|
|
||||||
DEFINE_RPC_STATUS_EVENT(call);
|
DEFINE_RPC_STATUS_EVENT(call);
|
||||||
DEFINE_RPC_STATUS_EVENT(bind);
|
|
||||||
DEFINE_RPC_STATUS_EVENT(connect);
|
DEFINE_RPC_STATUS_EVENT(connect);
|
||||||
DEFINE_RPC_STATUS_EVENT(timeout);
|
DEFINE_RPC_STATUS_EVENT(timeout);
|
||||||
DEFINE_RPC_STATUS_EVENT(retry_refresh);
|
DEFINE_RPC_STATUS_EVENT(retry_refresh);
|
||||||
|
@ -520,6 +519,19 @@ DEFINE_RPC_REPLY_EVENT(stale_creds);
|
||||||
DEFINE_RPC_REPLY_EVENT(bad_creds);
|
DEFINE_RPC_REPLY_EVENT(bad_creds);
|
||||||
DEFINE_RPC_REPLY_EVENT(auth_tooweak);
|
DEFINE_RPC_REPLY_EVENT(auth_tooweak);
|
||||||
|
|
||||||
|
#define DEFINE_RPCB_ERROR_EVENT(name) \
|
||||||
|
DEFINE_EVENT(rpc_reply_event, rpcb_##name##_err, \
|
||||||
|
TP_PROTO( \
|
||||||
|
const struct rpc_task *task \
|
||||||
|
), \
|
||||||
|
TP_ARGS(task))
|
||||||
|
|
||||||
|
DEFINE_RPCB_ERROR_EVENT(prog_unavail);
|
||||||
|
DEFINE_RPCB_ERROR_EVENT(timeout);
|
||||||
|
DEFINE_RPCB_ERROR_EVENT(bind_version);
|
||||||
|
DEFINE_RPCB_ERROR_EVENT(unreachable);
|
||||||
|
DEFINE_RPCB_ERROR_EVENT(unrecognized);
|
||||||
|
|
||||||
TRACE_EVENT(rpc_buf_alloc,
|
TRACE_EVENT(rpc_buf_alloc,
|
||||||
TP_PROTO(
|
TP_PROTO(
|
||||||
const struct rpc_task *task,
|
const struct rpc_task *task,
|
||||||
|
|
|
@ -1957,7 +1957,6 @@ call_bind_status(struct rpc_task *task)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
trace_rpc_bind_status(task);
|
|
||||||
if (task->tk_status >= 0)
|
if (task->tk_status >= 0)
|
||||||
goto out_next;
|
goto out_next;
|
||||||
if (xprt_bound(xprt)) {
|
if (xprt_bound(xprt)) {
|
||||||
|
@ -1967,12 +1966,10 @@ call_bind_status(struct rpc_task *task)
|
||||||
|
|
||||||
switch (task->tk_status) {
|
switch (task->tk_status) {
|
||||||
case -ENOMEM:
|
case -ENOMEM:
|
||||||
dprintk("RPC: %5u rpcbind out of memory\n", task->tk_pid);
|
|
||||||
rpc_delay(task, HZ >> 2);
|
rpc_delay(task, HZ >> 2);
|
||||||
goto retry_timeout;
|
goto retry_timeout;
|
||||||
case -EACCES:
|
case -EACCES:
|
||||||
dprintk("RPC: %5u remote rpcbind: RPC program/version "
|
trace_rpcb_prog_unavail_err(task);
|
||||||
"unavailable\n", task->tk_pid);
|
|
||||||
/* fail immediately if this is an RPC ping */
|
/* fail immediately if this is an RPC ping */
|
||||||
if (task->tk_msg.rpc_proc->p_proc == 0) {
|
if (task->tk_msg.rpc_proc->p_proc == 0) {
|
||||||
status = -EOPNOTSUPP;
|
status = -EOPNOTSUPP;
|
||||||
|
@ -1989,17 +1986,14 @@ call_bind_status(struct rpc_task *task)
|
||||||
case -EAGAIN:
|
case -EAGAIN:
|
||||||
goto retry_timeout;
|
goto retry_timeout;
|
||||||
case -ETIMEDOUT:
|
case -ETIMEDOUT:
|
||||||
dprintk("RPC: %5u rpcbind request timed out\n",
|
trace_rpcb_timeout_err(task);
|
||||||
task->tk_pid);
|
|
||||||
goto retry_timeout;
|
goto retry_timeout;
|
||||||
case -EPFNOSUPPORT:
|
case -EPFNOSUPPORT:
|
||||||
/* server doesn't support any rpcbind version we know of */
|
/* server doesn't support any rpcbind version we know of */
|
||||||
dprintk("RPC: %5u unrecognized remote rpcbind service\n",
|
trace_rpcb_bind_version_err(task);
|
||||||
task->tk_pid);
|
|
||||||
break;
|
break;
|
||||||
case -EPROTONOSUPPORT:
|
case -EPROTONOSUPPORT:
|
||||||
dprintk("RPC: %5u remote rpcbind version unavailable, retrying\n",
|
trace_rpcb_bind_version_err(task);
|
||||||
task->tk_pid);
|
|
||||||
goto retry_timeout;
|
goto retry_timeout;
|
||||||
case -ECONNREFUSED: /* connection problems */
|
case -ECONNREFUSED: /* connection problems */
|
||||||
case -ECONNRESET:
|
case -ECONNRESET:
|
||||||
|
@ -2010,8 +2004,7 @@ call_bind_status(struct rpc_task *task)
|
||||||
case -EHOSTUNREACH:
|
case -EHOSTUNREACH:
|
||||||
case -ENETUNREACH:
|
case -ENETUNREACH:
|
||||||
case -EPIPE:
|
case -EPIPE:
|
||||||
dprintk("RPC: %5u remote rpcbind unreachable: %d\n",
|
trace_rpcb_unreachable_err(task);
|
||||||
task->tk_pid, task->tk_status);
|
|
||||||
if (!RPC_IS_SOFTCONN(task)) {
|
if (!RPC_IS_SOFTCONN(task)) {
|
||||||
rpc_delay(task, 5*HZ);
|
rpc_delay(task, 5*HZ);
|
||||||
goto retry_timeout;
|
goto retry_timeout;
|
||||||
|
@ -2019,8 +2012,7 @@ call_bind_status(struct rpc_task *task)
|
||||||
status = task->tk_status;
|
status = task->tk_status;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
dprintk("RPC: %5u unrecognized rpcbind error (%d)\n",
|
trace_rpcb_unrecognized_err(task);
|
||||||
task->tk_pid, -task->tk_status);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rpc_call_rpcerror(task, status);
|
rpc_call_rpcerror(task, status);
|
||||||
|
|
Loading…
Reference in New Issue