OSDN Git Service

SUNRPC dont update timeout value on connection reset
authorOlga Kornievskaia <olga.kornievskaia@gmail.com>
Wed, 15 Jul 2020 17:17:52 +0000 (13:17 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Wed, 5 Aug 2020 03:17:11 +0000 (23:17 -0400)
commit7de62bc09fe6d100ebd6c931c3f9a6fa7e6ed10f
treee83e069724fc217ee7a108c05206d099de22423b
parentce368536dd614452407dc31e2449eb84681a06af
SUNRPC dont update timeout value on connection reset

Current behaviour: every time a v3 operation is re-sent to the server
we update (double) the timeout. There is no distinction between whether
or not the previous timer had expired before the re-sent happened.

Here's the scenario:
1. Client sends a v3 operation
2. Server RST-s the connection (prior to the timeout) (eg., connection
is immediately reset)
3. Client re-sends a v3 operation but the timeout is now 120sec.

As a result, an application sees 2mins pause before a retry in case
server again does not reply.

Instead, this patch proposes to keep track off when the minor timeout
should happen and if it didn't, then don't update the new timeout.
Value is updated based on the previous value to make timeouts
predictable.

Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
include/linux/sunrpc/xprt.h
net/sunrpc/xprt.c