diff options
author | Olga Kornievskaia <olga.kornievskaia@gmail.com> | 2020-07-15 19:17:52 +0200 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2020-08-05 05:17:11 +0200 |
commit | 7de62bc09fe6d100ebd6c931c3f9a6fa7e6ed10f (patch) | |
tree | e83e069724fc217ee7a108c05206d099de22423b /include | |
parent | nfs: nfs_file_write() should check for writeback errors (diff) | |
download | linux-7de62bc09fe6d100ebd6c931c3f9a6fa7e6ed10f.tar.xz linux-7de62bc09fe6d100ebd6c931c3f9a6fa7e6ed10f.zip |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/sunrpc/xprt.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index e64bd8222f55..a603d48d2b2c 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h @@ -101,6 +101,7 @@ struct rpc_rqst { * used in the softirq. */ unsigned long rq_majortimeo; /* major timeout alarm */ + unsigned long rq_minortimeo; /* minor timeout alarm */ unsigned long rq_timeout; /* Current timeout value */ ktime_t rq_rtt; /* round-trip time */ unsigned int rq_retries; /* # of retries */ |