From: "J. Bruce Fields" <bfields@redhat.com>
To: linux-nfs@vger.kernel.org
Cc: Trond.Myklebust@netapp.com, chuck.lever@oracle.com,
simo@redhat.com, "J. Bruce Fields" <bfields@redhat.com>
Subject: [PATCH 2/6] SUNRPC: attempt AF_LOCAL connect on setup
Date: Thu, 21 Feb 2013 11:38:21 -0500 [thread overview]
Message-ID: <1361464705-12340-3-git-send-email-bfields@redhat.com> (raw)
In-Reply-To: <1361464705-12340-1-git-send-email-bfields@redhat.com>
From: "J. Bruce Fields" <bfields@redhat.com>
In the gss-proxy case, setup time is when I know I'll have the right
namespace for the connect.
In other cases, it might be useful to get any connection errors
earlier--though actually in practice it doesn't make any difference for
rpcbind.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
---
net/sunrpc/xprtsock.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index b1df874..f2cf652 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -1867,7 +1867,7 @@ static int xs_local_finish_connecting(struct rpc_xprt *xprt,
* @transport: socket transport to connect
* @create_sock: function to create a socket of the correct type
*/
-static void xs_local_setup_socket(struct sock_xprt *transport)
+static int xs_local_setup_socket(struct sock_xprt *transport)
{
struct rpc_xprt *xprt = &transport->xprt;
struct socket *sock;
@@ -1913,6 +1913,7 @@ out:
xprt_clear_connecting(xprt);
xprt_wake_pending_tasks(xprt, status);
current->flags &= ~PF_FSTRANS;
+ return status;
}
static void xs_local_connect(struct rpc_task *task)
@@ -2649,6 +2650,9 @@ static struct rpc_xprt *xs_setup_local(struct xprt_create *args)
}
xprt_set_bound(xprt);
xs_format_peer_addresses(xprt, "local", RPCBIND_NETID_LOCAL);
+ ret = ERR_PTR(xs_local_setup_socket(transport));
+ if (ret)
+ goto out_err;
break;
default:
ret = ERR_PTR(-EAFNOSUPPORT);
--
1.7.9.5
next prev parent reply other threads:[~2013-02-21 16:38 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-21 16:38 [PATCH 0/6] gss-proxy upcall for nfsd J. Bruce Fields
2013-02-21 16:38 ` [PATCH 1/6] SUNRPC: make AF_LOCAL connect synchronous J. Bruce Fields
2013-02-21 18:17 ` Myklebust, Trond
2013-02-21 19:48 ` J. Bruce Fields
2013-02-21 20:02 ` Myklebust, Trond
2013-02-21 20:36 ` J. Bruce Fields
2013-02-21 20:42 ` Myklebust, Trond
2013-02-26 4:06 ` [PATCH] " J. Bruce Fields
2013-02-21 16:38 ` J. Bruce Fields [this message]
2013-02-21 16:38 ` [PATCH 3/6] SUNRPC: no idle timeout for AF_LOCAL sockets J. Bruce Fields
2013-02-21 16:38 ` [PATCH 4/6] SUNRPC: conditionally return endtime from import_sec_context J. Bruce Fields
2013-02-21 16:38 ` [PATCH 5/6] SUNRPC: Add RPC based upcall mechanism for RPCGSS auth J. Bruce Fields
2013-02-21 18:35 ` Myklebust, Trond
2013-02-21 19:58 ` J. Bruce Fields
2013-02-21 21:37 ` J. Bruce Fields
2013-04-12 18:11 ` J. Bruce Fields
2013-04-12 18:21 ` Myklebust, Trond
2013-04-12 18:33 ` J. Bruce Fields
2013-02-21 16:38 ` [PATCH 6/6] SUNRPC: Use gssproxy upcall for server RPCGSS authentication J. Bruce Fields
2013-02-21 21:01 ` J. Bruce Fields
2013-02-26 13:27 ` Simo Sorce
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1361464705-12340-3-git-send-email-bfields@redhat.com \
--to=bfields@redhat.com \
--cc=Trond.Myklebust@netapp.com \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=simo@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.