]> git.baikalelectronics.ru Git - kernel.git/commit
SUNRPC: ECONNREFUSED should cause a rebind.
authorNeilBrown <neilb@suse.com>
Fri, 18 Aug 2017 07:12:51 +0000 (17:12 +1000)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Sun, 20 Aug 2017 16:39:28 +0000 (12:39 -0400)
commit8b95504c6071535308a21b938e1ba524d11cdf49
tree8b557a85fb38917bde44706cfe3b4b8b444625e6
parent56b88aebb79f53556d4bab1317aeb5127736b55e
SUNRPC: ECONNREFUSED should cause a rebind.

If you
 - mount and NFSv3 filesystem
 - do some file locking which requires the server
   to make a GRANT call back
 - unmount
 - mount again and do the same locking

then the second attempt at locking suffers a 30 second delay.
Unmounting and remounting causes lockd to stop and restart,
which causes it to bind to a new port.
The server still thinks the old port is valid and gets ECONNREFUSED
when trying to contact it.
ECONNREFUSED should be seen as a hard error that is not worth
retrying.  Rebinding is the only reasonable response.

This patch forces a rebind if that makes sense.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
net/sunrpc/clnt.c