2002-08-13 02:59:30

by NeilBrown

[permalink] [raw]
Subject: PATCH - RPC/TCP 2 of 4 - Allow SO_REUSEADDR for NFS sockets


Otherwise if you cannot stop and restart nfsd while a client holds a
connection. Why this isn't the default I cannot imagine...

----------- Diffstat output ------------
./net/sunrpc/svcsock.c | 1 +
1 files changed, 1 insertion(+)

--- ./net/sunrpc/svcsock.c 2002/08/12 06:01:42 1.2
+++ ./net/sunrpc/svcsock.c 2002/08/13 01:54:39 1.3
@@ -1208,6 +1208,7 @@ svc_create_socket(struct svc_serv *serv,
return error;

if (sin != NULL) {
+ sock->sk->reuse = 1; /* allow address reuse */
error = sock->ops->bind(sock, (struct sockaddr *) sin,
sizeof(*sin));
if (error < 0)


-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs


2002-08-13 03:23:39

by Chuck Lever

[permalink] [raw]
Subject: Re: PATCH - RPC/TCP 2 of 4 - Allow SO_REUSEADDR for NFS sockets

it's been suggested that the client should also try reusing the port
number when reconnecting over TCP... any thoughts on that?

On Tue, 13 Aug 2002, Neil Brown wrote:

>
> Otherwise if you cannot stop and restart nfsd while a client holds a
> connection. Why this isn't the default I cannot imagine...
>
> ----------- Diffstat output ------------
> ./net/sunrpc/svcsock.c | 1 +
> 1 files changed, 1 insertion(+)
>
> --- ./net/sunrpc/svcsock.c 2002/08/12 06:01:42 1.2
> +++ ./net/sunrpc/svcsock.c 2002/08/13 01:54:39 1.3
> @@ -1208,6 +1208,7 @@ svc_create_socket(struct svc_serv *serv,
> return error;
>
> if (sin != NULL) {
> + sock->sk->reuse = 1; /* allow address reuse */
> error = sock->ops->bind(sock, (struct sockaddr *) sin,
> sizeof(*sin));
> if (error < 0)
>

- Chuck Lever
--
corporate: <[email protected]>
personal: <[email protected]>



-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs