[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:
Родитель
6a19275ada
Коммит
cdf477068e
|
@ -1021,10 +1021,11 @@ call_verify(struct rpc_task *task)
|
||||||
case RPC_AUTH_ERROR:
|
case RPC_AUTH_ERROR:
|
||||||
break;
|
break;
|
||||||
case RPC_MISMATCH:
|
case RPC_MISMATCH:
|
||||||
printk(KERN_WARNING "%s: RPC call version mismatch!\n", __FUNCTION__);
|
dprintk("%s: RPC call version mismatch!\n", __FUNCTION__);
|
||||||
goto out_eio;
|
error = -EPROTONOSUPPORT;
|
||||||
|
goto out_err;
|
||||||
default:
|
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;
|
goto out_eio;
|
||||||
}
|
}
|
||||||
if (--len < 0)
|
if (--len < 0)
|
||||||
|
@ -1075,23 +1076,26 @@ call_verify(struct rpc_task *task)
|
||||||
case RPC_SUCCESS:
|
case RPC_SUCCESS:
|
||||||
return p;
|
return p;
|
||||||
case RPC_PROG_UNAVAIL:
|
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,
|
(unsigned int)task->tk_client->cl_prog,
|
||||||
task->tk_client->cl_server);
|
task->tk_client->cl_server);
|
||||||
goto out_eio;
|
error = -EPFNOSUPPORT;
|
||||||
|
goto out_err;
|
||||||
case RPC_PROG_MISMATCH:
|
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_prog,
|
||||||
(unsigned int)task->tk_client->cl_vers,
|
(unsigned int)task->tk_client->cl_vers,
|
||||||
task->tk_client->cl_server);
|
task->tk_client->cl_server);
|
||||||
goto out_eio;
|
error = -EPROTONOSUPPORT;
|
||||||
|
goto out_err;
|
||||||
case RPC_PROC_UNAVAIL:
|
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_msg.rpc_proc,
|
||||||
task->tk_client->cl_prog,
|
task->tk_client->cl_prog,
|
||||||
task->tk_client->cl_vers,
|
task->tk_client->cl_vers,
|
||||||
task->tk_client->cl_server);
|
task->tk_client->cl_server);
|
||||||
goto out_eio;
|
error = -EOPNOTSUPP;
|
||||||
|
goto out_err;
|
||||||
case RPC_GARBAGE_ARGS:
|
case RPC_GARBAGE_ARGS:
|
||||||
dprintk("RPC: %4d %s: server saw garbage\n", task->tk_pid, __FUNCTION__);
|
dprintk("RPC: %4d %s: server saw garbage\n", task->tk_pid, __FUNCTION__);
|
||||||
break; /* retry */
|
break; /* retry */
|
||||||
|
@ -1104,7 +1108,7 @@ out_retry:
|
||||||
task->tk_client->cl_stats->rpcgarbage++;
|
task->tk_client->cl_stats->rpcgarbage++;
|
||||||
if (task->tk_garb_retry) {
|
if (task->tk_garb_retry) {
|
||||||
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;
|
task->tk_action = call_bind;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче