All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sunrpc: set cl_max_connect when cloning an rpc_clnt
@ 2022-06-01 17:34 Scott Mayhew
  2022-06-06 18:35 ` Anna Schumaker
  0 siblings, 1 reply; 4+ messages in thread
From: Scott Mayhew @ 2022-06-01 17:34 UTC (permalink / raw)
  To: trond.myklebust, anna; +Cc: kolga, linux-nfs

If the initial attempt at trunking detection using the krb5i auth flavor
fails with -EACCES, -NFS4ERR_CLID_INUSE, or -NFS4ERR_WRONGSEC, then the
NFS client tries again using auth_sys, cloning the rpc_clnt in the
process.  If this second attempt at trunking detection succeeds, then
the resulting nfs_client->cl_rpcclient winds up having cl_max_connect=0
and subsequent attempts to add additional transport connections to the
rpc_clnt will fail with a message similar to the following being logged:

[502044.312640] SUNRPC: reached max allowed number (0) did not add
transport to server: 192.168.122.3

Signed-off-by: Scott Mayhew <smayhew@redhat.com>
---
 net/sunrpc/clnt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index e2c6eca0271b..b6781ada3aa8 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -651,6 +651,7 @@ static struct rpc_clnt *__rpc_clone_client(struct rpc_create_args *args,
 	new->cl_discrtry = clnt->cl_discrtry;
 	new->cl_chatty = clnt->cl_chatty;
 	new->cl_principal = clnt->cl_principal;
+	new->cl_max_connect = clnt->cl_max_connect;
 	return new;
 
 out_err:
-- 
2.35.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] sunrpc: set cl_max_connect when cloning an rpc_clnt
  2022-06-01 17:34 [PATCH] sunrpc: set cl_max_connect when cloning an rpc_clnt Scott Mayhew
@ 2022-06-06 18:35 ` Anna Schumaker
  2022-06-07 12:53   ` Scott Mayhew
  0 siblings, 1 reply; 4+ messages in thread
From: Anna Schumaker @ 2022-06-06 18:35 UTC (permalink / raw)
  To: Scott Mayhew; +Cc: Trond Myklebust, Olga Kornievskaia, Linux NFS Mailing List

Hi Scott,

On Wed, Jun 1, 2022 at 1:34 PM Scott Mayhew <smayhew@redhat.com> wrote:
>
> If the initial attempt at trunking detection using the krb5i auth flavor
> fails with -EACCES, -NFS4ERR_CLID_INUSE, or -NFS4ERR_WRONGSEC, then the
> NFS client tries again using auth_sys, cloning the rpc_clnt in the
> process.  If this second attempt at trunking detection succeeds, then
> the resulting nfs_client->cl_rpcclient winds up having cl_max_connect=0
> and subsequent attempts to add additional transport connections to the
> rpc_clnt will fail with a message similar to the following being logged:
>
> [502044.312640] SUNRPC: reached max allowed number (0) did not add
> transport to server: 192.168.122.3

Good catch! I was wondering if you could give me a "Fixes:" tag so it
can be backported to stable?

Thanks,
Anna

>
> Signed-off-by: Scott Mayhew <smayhew@redhat.com>
> ---
>  net/sunrpc/clnt.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
> index e2c6eca0271b..b6781ada3aa8 100644
> --- a/net/sunrpc/clnt.c
> +++ b/net/sunrpc/clnt.c
> @@ -651,6 +651,7 @@ static struct rpc_clnt *__rpc_clone_client(struct rpc_create_args *args,
>         new->cl_discrtry = clnt->cl_discrtry;
>         new->cl_chatty = clnt->cl_chatty;
>         new->cl_principal = clnt->cl_principal;
> +       new->cl_max_connect = clnt->cl_max_connect;
>         return new;
>
>  out_err:
> --
> 2.35.3
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] sunrpc: set cl_max_connect when cloning an rpc_clnt
  2022-06-06 18:35 ` Anna Schumaker
@ 2022-06-07 12:53   ` Scott Mayhew
  2022-06-07 17:18     ` Anna Schumaker
  0 siblings, 1 reply; 4+ messages in thread
From: Scott Mayhew @ 2022-06-07 12:53 UTC (permalink / raw)
  To: Anna Schumaker; +Cc: Trond Myklebust, Olga Kornievskaia, Linux NFS Mailing List

On Mon, 06 Jun 2022, Anna Schumaker wrote:

> Hi Scott,
> 
> On Wed, Jun 1, 2022 at 1:34 PM Scott Mayhew <smayhew@redhat.com> wrote:
> >
> > If the initial attempt at trunking detection using the krb5i auth flavor
> > fails with -EACCES, -NFS4ERR_CLID_INUSE, or -NFS4ERR_WRONGSEC, then the
> > NFS client tries again using auth_sys, cloning the rpc_clnt in the
> > process.  If this second attempt at trunking detection succeeds, then
> > the resulting nfs_client->cl_rpcclient winds up having cl_max_connect=0
> > and subsequent attempts to add additional transport connections to the
> > rpc_clnt will fail with a message similar to the following being logged:
> >
> > [502044.312640] SUNRPC: reached max allowed number (0) did not add
> > transport to server: 192.168.122.3
> 
> Good catch! I was wondering if you could give me a "Fixes:" tag so it
> can be backported to stable?

Fixes: dc48e0abee24 ("SUNRPC enforce creation of no more than max_connect xprts")

> 
> Thanks,
> Anna
> 
> >
> > Signed-off-by: Scott Mayhew <smayhew@redhat.com>
> > ---
> >  net/sunrpc/clnt.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
> > index e2c6eca0271b..b6781ada3aa8 100644
> > --- a/net/sunrpc/clnt.c
> > +++ b/net/sunrpc/clnt.c
> > @@ -651,6 +651,7 @@ static struct rpc_clnt *__rpc_clone_client(struct rpc_create_args *args,
> >         new->cl_discrtry = clnt->cl_discrtry;
> >         new->cl_chatty = clnt->cl_chatty;
> >         new->cl_principal = clnt->cl_principal;
> > +       new->cl_max_connect = clnt->cl_max_connect;
> >         return new;
> >
> >  out_err:
> > --
> > 2.35.3
> >
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] sunrpc: set cl_max_connect when cloning an rpc_clnt
  2022-06-07 12:53   ` Scott Mayhew
@ 2022-06-07 17:18     ` Anna Schumaker
  0 siblings, 0 replies; 4+ messages in thread
From: Anna Schumaker @ 2022-06-07 17:18 UTC (permalink / raw)
  To: Scott Mayhew; +Cc: Trond Myklebust, Olga Kornievskaia, Linux NFS Mailing List

On Tue, Jun 7, 2022 at 8:53 AM Scott Mayhew <smayhew@redhat.com> wrote:
>
> On Mon, 06 Jun 2022, Anna Schumaker wrote:
>
> > Hi Scott,
> >
> > On Wed, Jun 1, 2022 at 1:34 PM Scott Mayhew <smayhew@redhat.com> wrote:
> > >
> > > If the initial attempt at trunking detection using the krb5i auth flavor
> > > fails with -EACCES, -NFS4ERR_CLID_INUSE, or -NFS4ERR_WRONGSEC, then the
> > > NFS client tries again using auth_sys, cloning the rpc_clnt in the
> > > process.  If this second attempt at trunking detection succeeds, then
> > > the resulting nfs_client->cl_rpcclient winds up having cl_max_connect=0
> > > and subsequent attempts to add additional transport connections to the
> > > rpc_clnt will fail with a message similar to the following being logged:
> > >
> > > [502044.312640] SUNRPC: reached max allowed number (0) did not add
> > > transport to server: 192.168.122.3
> >
> > Good catch! I was wondering if you could give me a "Fixes:" tag so it
> > can be backported to stable?
>
> Fixes: dc48e0abee24 ("SUNRPC enforce creation of no more than max_connect xprts")

Thanks! Applied for a -rc pull request

>
> >
> > Thanks,
> > Anna
> >
> > >
> > > Signed-off-by: Scott Mayhew <smayhew@redhat.com>
> > > ---
> > >  net/sunrpc/clnt.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
> > > index e2c6eca0271b..b6781ada3aa8 100644
> > > --- a/net/sunrpc/clnt.c
> > > +++ b/net/sunrpc/clnt.c
> > > @@ -651,6 +651,7 @@ static struct rpc_clnt *__rpc_clone_client(struct rpc_create_args *args,
> > >         new->cl_discrtry = clnt->cl_discrtry;
> > >         new->cl_chatty = clnt->cl_chatty;
> > >         new->cl_principal = clnt->cl_principal;
> > > +       new->cl_max_connect = clnt->cl_max_connect;
> > >         return new;
> > >
> > >  out_err:
> > > --
> > > 2.35.3
> > >
> >
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-06-07 17:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-01 17:34 [PATCH] sunrpc: set cl_max_connect when cloning an rpc_clnt Scott Mayhew
2022-06-06 18:35 ` Anna Schumaker
2022-06-07 12:53   ` Scott Mayhew
2022-06-07 17:18     ` Anna Schumaker

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.