提交 2a76b3bf 编写于 作者: C Chuck Lever 提交者: Trond Myklebust

SUNRPC: Use TCP for local rpcbind upcalls

Use TCP with the soft connect semantic for local rpcbind upcalls so
the kernel can detect immediately if the local rpcbind daemon is not
running.
Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
上级 c526611d
...@@ -176,7 +176,7 @@ static DEFINE_MUTEX(rpcb_create_local_mutex); ...@@ -176,7 +176,7 @@ static DEFINE_MUTEX(rpcb_create_local_mutex);
static int rpcb_create_local(void) static int rpcb_create_local(void)
{ {
struct rpc_create_args args = { struct rpc_create_args args = {
.protocol = XPRT_TRANSPORT_UDP, .protocol = XPRT_TRANSPORT_TCP,
.address = (struct sockaddr *)&rpcb_inaddr_loopback, .address = (struct sockaddr *)&rpcb_inaddr_loopback,
.addrsize = sizeof(rpcb_inaddr_loopback), .addrsize = sizeof(rpcb_inaddr_loopback),
.servername = "localhost", .servername = "localhost",
...@@ -258,7 +258,7 @@ static int rpcb_register_call(struct rpc_clnt *clnt, struct rpc_message *msg) ...@@ -258,7 +258,7 @@ static int rpcb_register_call(struct rpc_clnt *clnt, struct rpc_message *msg)
msg->rpc_resp = &result; msg->rpc_resp = &result;
error = rpc_call_sync(clnt, msg, 0); error = rpc_call_sync(clnt, msg, RPC_TASK_SOFTCONN);
if (error < 0) { if (error < 0) {
dprintk("RPC: failed to contact local rpcbind " dprintk("RPC: failed to contact local rpcbind "
"server (errno %d).\n", -error); "server (errno %d).\n", -error);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册