[PATCH] RPC: Return -EPFNOSUPPORT for RPC programs that are unavailable
Signed-off-by: Andreas Gruenbacher <agruen@suse.de> Signed-off-by: Olaf Kirch <okir@suse.de> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
6a19275ada
commit
cdf477068e
1 changed files with 14 additions and 10 deletions
|
@ -1021,10 +1021,11 @@ call_verify(struct rpc_task *task)
|
|||
case RPC_AUTH_ERROR:
|
||||
break;
|
||||
case RPC_MISMATCH:
|
||||
printk(KERN_WARNING "%s: RPC call version mismatch!\n", __FUNCTION__);
|
||||
goto out_eio;
|
||||
dprintk("%s: RPC call version mismatch!\n", __FUNCTION__);
|
||||
error = -EPROTONOSUPPORT;
|
||||
goto out_err;
|
||||
default:
|
||||
printk(KERN_WARNING "%s: RPC call rejected, unknown error: %x\n", __FUNCTION__, n);
|
||||
dprintk("%s: RPC call rejected, unknown error: %x\n", __FUNCTION__, n);
|
||||
goto out_eio;
|
||||
}
|
||||
if (--len < 0)
|
||||
|
@ -1075,23 +1076,26 @@ call_verify(struct rpc_task *task)
|
|||
case RPC_SUCCESS:
|
||||
return p;
|
||||
case RPC_PROG_UNAVAIL:
|
||||
printk(KERN_WARNING "RPC: call_verify: program %u is unsupported by server %s\n",
|
||||
dprintk("RPC: call_verify: program %u is unsupported by server %s\n",
|
||||
(unsigned int)task->tk_client->cl_prog,
|
||||
task->tk_client->cl_server);
|
||||
goto out_eio;
|
||||
error = -EPFNOSUPPORT;
|
||||
goto out_err;
|
||||
case RPC_PROG_MISMATCH:
|
||||
printk(KERN_WARNING "RPC: call_verify: program %u, version %u unsupported by server %s\n",
|
||||
dprintk("RPC: call_verify: program %u, version %u unsupported by server %s\n",
|
||||
(unsigned int)task->tk_client->cl_prog,
|
||||
(unsigned int)task->tk_client->cl_vers,
|
||||
task->tk_client->cl_server);
|
||||
goto out_eio;
|
||||
error = -EPROTONOSUPPORT;
|
||||
goto out_err;
|
||||
case RPC_PROC_UNAVAIL:
|
||||
printk(KERN_WARNING "RPC: call_verify: proc %p unsupported by program %u, version %u on server %s\n",
|
||||
dprintk("RPC: call_verify: proc %p unsupported by program %u, version %u on server %s\n",
|
||||
task->tk_msg.rpc_proc,
|
||||
task->tk_client->cl_prog,
|
||||
task->tk_client->cl_vers,
|
||||
task->tk_client->cl_server);
|
||||
goto out_eio;
|
||||
error = -EOPNOTSUPP;
|
||||
goto out_err;
|
||||
case RPC_GARBAGE_ARGS:
|
||||
dprintk("RPC: %4d %s: server saw garbage\n", task->tk_pid, __FUNCTION__);
|
||||
break; /* retry */
|
||||
|
@ -1104,7 +1108,7 @@ call_verify(struct rpc_task *task)
|
|||
task->tk_client->cl_stats->rpcgarbage++;
|
||||
if (task->tk_garb_retry) {
|
||||
task->tk_garb_retry--;
|
||||
dprintk(KERN_WARNING "RPC %s: retrying %4d\n", __FUNCTION__, task->tk_pid);
|
||||
dprintk("RPC %s: retrying %4d\n", __FUNCTION__, task->tk_pid);
|
||||
task->tk_action = call_bind;
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue