All of lore.kernel.org
 help / color / mirror / Atom feed
* PATCH - RPC/TCP 2 of 4 - Allow  SO_REUSEADDR for NFS sockets
@ 2002-08-13  2:57 Neil Brown
  2002-08-13  3:23 ` Chuck Lever
  0 siblings, 1 reply; 5+ messages in thread
From: Neil Brown @ 2002-08-13  2:57 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Minoura Makoto, Chuck Lever, nfs


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  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PATCH - RPC/TCP 2 of 4 - Allow  SO_REUSEADDR for NFS sockets
  2002-08-13  2:57 PATCH - RPC/TCP 2 of 4 - Allow SO_REUSEADDR for NFS sockets Neil Brown
@ 2002-08-13  3:23 ` Chuck Lever
  2002-08-13  6:01   ` Neil Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Chuck Lever @ 2002-08-13  3:23 UTC (permalink / raw)
  To: Neil Brown; +Cc: Linus Torvalds, Minoura Makoto, nfs

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:	<cel@netapp.com>
personal:	<chucklever@bigfoot.com>



-------------------------------------------------------
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  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PATCH - RPC/TCP 2 of 4 - Allow  SO_REUSEADDR for NFS sockets
  2002-08-13  3:23 ` Chuck Lever
@ 2002-08-13  6:01   ` Neil Brown
  2002-08-14  1:04     ` Julian Cowley
  2002-08-14  1:17     ` Trond Myklebust
  0 siblings, 2 replies; 5+ messages in thread
From: Neil Brown @ 2002-08-13  6:01 UTC (permalink / raw)
  To: Chuck Lever; +Cc: nfs


[ cc list trimmed ]
On Monday August 12, cel@citi.umich.edu wrote:
> it's been suggested that the client should also try reusing the port
> number when reconnecting over TCP... any thoughts on that?

Why?
You would not be able to reconnect until the TCP timeout on connection
re-use has passed, and by that time any benefit that you might gain is
probably lost.
How does the TCP timeout compare with the replay-cache timeout??

NeilBrown


-------------------------------------------------------
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  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Re: PATCH - RPC/TCP 2 of 4 - Allow  SO_REUSEADDR for NFS sockets
  2002-08-13  6:01   ` Neil Brown
@ 2002-08-14  1:04     ` Julian Cowley
  2002-08-14  1:17     ` Trond Myklebust
  1 sibling, 0 replies; 5+ messages in thread
From: Julian Cowley @ 2002-08-14  1:04 UTC (permalink / raw)
  To: Neil Brown; +Cc: Chuck Lever, nfs

On Tue, 13 Aug 2002, Neil Brown wrote:
> [ cc list trimmed ]
> On Monday August 12, cel@citi.umich.edu wrote:
> > it's been suggested that the client should also try reusing the port
> > number when reconnecting over TCP... any thoughts on that?
>
> Why?
> You would not be able to reconnect until the TCP timeout on connection
> re-use has passed, and by that time any benefit that you might gain is
> probably lost.
> How does the TCP timeout compare with the replay-cache timeout??

Just an aside here...

The last time I looked at NFS over TCP on Linux (maybe 6-12 months
ago?), there was a problem related to this.  With my test setup,
I required NFS clients to use a reserved port (the "secure" option
in mountd, although the server was acutally an OpenBSD machine).
After the server would reboot, the Linux client would reconnect,
but it would reconnect using a non-reserved port number even though
the original mount used a reserved port number.  This meant that the
mount would never come back up.

If the client used the same port number, at least it would reconnect in
this case.  A better solution would be to have it keep track of whether
a reserved port was required for the mount or not.



-------------------------------------------------------
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  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Re: PATCH - RPC/TCP 2 of 4 - Allow  SO_REUSEADDR for NFS sockets
  2002-08-13  6:01   ` Neil Brown
  2002-08-14  1:04     ` Julian Cowley
@ 2002-08-14  1:17     ` Trond Myklebust
  1 sibling, 0 replies; 5+ messages in thread
From: Trond Myklebust @ 2002-08-14  1:17 UTC (permalink / raw)
  To: Neil Brown; +Cc: Chuck Lever, nfs

>>>>> " " == Neil Brown <neilb@cse.unsw.edu.au> writes:

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

     > Why?  You would not be able to reconnect until the TCP timeout
     > on connection re-use has passed, and by that time any benefit
     > that you might gain is probably lost.  How does the TCP timeout
     > compare with the replay-cache timeout??

The connection may break for other reasons (network partition for
instance). Reusing the port number guarantees that the replay cache
works as expected.

Cheers,
  Trond


-------------------------------------------------------
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  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-08-14  1:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-13  2:57 PATCH - RPC/TCP 2 of 4 - Allow SO_REUSEADDR for NFS sockets Neil Brown
2002-08-13  3:23 ` Chuck Lever
2002-08-13  6:01   ` Neil Brown
2002-08-14  1:04     ` Julian Cowley
2002-08-14  1:17     ` Trond Myklebust

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.