2022-03-24 15:58:15

by Olga Kornievskaia

[permalink] [raw]
Subject: [PATCH 1/1] NFSv4.1: don't retry BIND_CONN_TO_SESSION on session error

From: Olga Kornievskaia <[email protected]>

There is no reason to retry the operation if a session error had
occurred in such case result structure isn't filled out.

Fixes: dff58530c4ca ("NFSv4.1: fix handling of backchannel binding in BIND_CONN_TO_SESSION")
Signed-off-by: Olga Kornievskaia <[email protected]>
---
Documentation/admin-guide/kernel-parameters.txt | 9 ++++++++-
fs/nfs/nfs4proc.c | 1 +
2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index f5a27f067db9..cdef24eef648 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -5639,7 +5639,7 @@
pernode one pool for each NUMA node (equivalent
to global on non-NUMA machines)

- sunrpc.tcp_slot_table_entries=
+ sunrpc.max_tcp_slot_table_entries=
sunrpc.udp_slot_table_entries=
[NFS,SUNRPC]
Sets the upper limit on the number of simultaneous
@@ -5648,6 +5648,13 @@
improve throughput, but will also increase the
amount of memory reserved for use by the client.

+ sunrpc.tcp_slot_table_entries=
+ [NFS,SUNRPC]
+ Sets the minimum limit on the number of simultaneous
+ RPC calls that can be sent from the client to a
+ server. RPC session table then would dynamically grow
+ until it reaches the max_tcp_slot_table_entries.
+
suspend.pm_test_delay=
[SUSPEND]
Sets the number of seconds to remain in a suspend test
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index dd7a4c2a3f05..e3f5b380cefe 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -8340,6 +8340,7 @@ nfs4_bind_one_conn_to_session_done(struct rpc_task *task, void *calldata)
case -NFS4ERR_DEADSESSION:
nfs4_schedule_session_recovery(clp->cl_session,
task->tk_status);
+ return;
}
if (args->dir == NFS4_CDFC4_FORE_OR_BOTH &&
res->dir != NFS4_CDFS4_BOTH) {
--
2.27.0


2022-03-24 21:10:43

by Olga Kornievskaia

[permalink] [raw]
Subject: Re: [PATCH 1/1] NFSv4.1: don't retry BIND_CONN_TO_SESSION on session error

Apologies. Disregard this unclean patch. Seems like some unwanted
changes have gotten in. I will resend.

On Thu, Mar 24, 2022 at 10:22 AM Olga Kornievskaia
<[email protected]> wrote:
>
> From: Olga Kornievskaia <[email protected]>
>
> There is no reason to retry the operation if a session error had
> occurred in such case result structure isn't filled out.
>
> Fixes: dff58530c4ca ("NFSv4.1: fix handling of backchannel binding in BIND_CONN_TO_SESSION")
> Signed-off-by: Olga Kornievskaia <[email protected]>
> ---
> Documentation/admin-guide/kernel-parameters.txt | 9 ++++++++-
> fs/nfs/nfs4proc.c | 1 +
> 2 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> index f5a27f067db9..cdef24eef648 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -5639,7 +5639,7 @@
> pernode one pool for each NUMA node (equivalent
> to global on non-NUMA machines)
>
> - sunrpc.tcp_slot_table_entries=
> + sunrpc.max_tcp_slot_table_entries=
> sunrpc.udp_slot_table_entries=
> [NFS,SUNRPC]
> Sets the upper limit on the number of simultaneous
> @@ -5648,6 +5648,13 @@
> improve throughput, but will also increase the
> amount of memory reserved for use by the client.
>
> + sunrpc.tcp_slot_table_entries=
> + [NFS,SUNRPC]
> + Sets the minimum limit on the number of simultaneous
> + RPC calls that can be sent from the client to a
> + server. RPC session table then would dynamically grow
> + until it reaches the max_tcp_slot_table_entries.
> +
> suspend.pm_test_delay=
> [SUSPEND]
> Sets the number of seconds to remain in a suspend test
> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
> index dd7a4c2a3f05..e3f5b380cefe 100644
> --- a/fs/nfs/nfs4proc.c
> +++ b/fs/nfs/nfs4proc.c
> @@ -8340,6 +8340,7 @@ nfs4_bind_one_conn_to_session_done(struct rpc_task *task, void *calldata)
> case -NFS4ERR_DEADSESSION:
> nfs4_schedule_session_recovery(clp->cl_session,
> task->tk_status);
> + return;
> }
> if (args->dir == NFS4_CDFC4_FORE_OR_BOTH &&
> res->dir != NFS4_CDFS4_BOTH) {
> --
> 2.27.0
>