Skip to contentSkip to conversation

Revert "SUNRPC dont update timeout value on connection reset"

PATCH In review [email protected] 3 participants 3 messages Sep 17, 2023 – Sep 18, 2023

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 1/1 Revert "SUNRPC dont update timeout value on connection reset"

From: Trond Myklebust <[email protected]>

This reverts commit 88428cc4ae7abcc879295fbb19373dd76aad2bdd.

The problem this commit is intended to fix was comprehensively fixed in commit 7de62bc09fe6 ("SUNRPC dont update timeout value on connection reset").
Since then, this commit has been preventing the correct timeout of soft mounted requests.

Cc: [email protected] # 5.9.x: 09252177d5f9: SUNRPC: Handle major timeout in xprt_adjust_timeout()
Cc: [email protected] # 5.9.x: 7de62bc09fe6: SUNRPC dont update timeout value on connection reset

---
 net/sunrpc/clnt.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
net/sunrpc/clnt.c +1 -2
index 5a7de7e55548..7f533c1041a4 100644
@@ -2476,8 +2476,7 @@ call_status(struct rpc_task *task)
 		goto out_exit;
 	}
 	task->tk_action = call_encode;
-	if (status != -ECONNRESET && status != -ECONNABORTED)
-		rpc_check_timeout(task);
+	rpc_check_timeout(task);
 	return;
 out_exit:
 	rpc_call_rpcerror(task, status);
Signature · 1 line
2.41.0
#1 lore raw
Quoted 10 lines · On Sun, Sep 17, 2023 at 7:38 PM <[email protected]> wrote:

From: Trond Myklebust <[email protected]>

This reverts commit 88428cc4ae7abcc879295fbb19373dd76aad2bdd.

The problem this commit is intended to fix was comprehensively fixed in commit 7de62bc09fe6 ("SUNRPC dont update timeout value on connection reset").
Since then, this commit has been preventing the correct timeout of soft mounted requests.

And if we revert this commit then we get back the problem that when the server RSTs the connection between the timeouts then the client waits double the time (instead of the correct time).

Quoted 26 lines

Cc: [email protected] # 5.9.x: 09252177d5f9: SUNRPC: Handle major timeout in xprt_adjust_timeout()
Cc: [email protected] # 5.9.x: 7de62bc09fe6: SUNRPC dont update timeout value on connection reset

---
 net/sunrpc/clnt.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
net/sunrpc/clnt.c +1 -3
index 5a7de7e55548..7f533c1041a4 100644
@@ -2476,8 +2476,7 @@ call_status(struct rpc_task *task)
                goto out_exit;
        }
        task->tk_action = call_encode;
-       if (status != -ECONNRESET && status != -ECONNABORTED)
-               rpc_check_timeout(task);
+       rpc_check_timeout(task);
        return;
 out_exit:
        rpc_call_rpcerror(task, status);
--

2.41.0

#2 lore raw
Quoted 15 lines · Olga Kornievskaia
Quoted 5 lines · On Sun, Sep 17, 2023 at 7:38 PM <[email protected]> wrote:

From: Trond Myklebust <[email protected]>

This reverts commit 88428cc4ae7abcc879295fbb19373dd76aad2bdd.

Quoted 8 lines

The problem this commit is intended to fix was comprehensively fixed
in commit 7de62bc09fe6 ("SUNRPC dont update timeout value on connection
reset").
Since then, this commit has been preventing the correct timeout of soft
mounted requests.

Quoted 3 lines

And if we revert this commit then we get back the problem that when the server RSTs the connection between the timeouts then the client waits double the time (instead of the correct time).

No, we don't. That's what commit 7de62bc09fe6 (mentioned above) fixes.

Quoted 29 lines
Quoted 29 lines

Cc: [email protected] # 5.9.x: 09252177d5f9: SUNRPC: Handle major timeout in xprt_adjust_timeout()
Cc: [email protected] # 5.9.x: 7de62bc09fe6: SUNRPC dont update timeout value on connection
reset

---
 net/sunrpc/clnt.c | 3 +--

 1 file changed, 1 insertion(+), 2 deletions(-)
net/sunrpc/clnt.c +1 -2
index 5a7de7e55548..7f533c1041a4 100644
@@ -2476,8 +2476,7 @@ call_status(struct rpc_task *task)
                 goto out_exit;
         }
         task->tk_action = call_encode;
-       if (status != -ECONNRESET && status != -ECONNABORTED)
-               rpc_check_timeout(task);
+       rpc_check_timeout(task);
         return;

 out_exit:
        rpc_call_rpcerror(task, status);
--
2.41.0

Signature · 3 lines
Trond Myklebust
Linux NFS client maintainer, Hammerspace
[email protected]