All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chuck Lever III <chuck.lever@oracle.com>
To: Benjamin Coddington <bcodding@redhat.com>
Cc: Bruce Fields <bfields@fieldses.org>,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH v2] NFSD: Keep existing listeners on portlist error
Date: Wed, 6 Oct 2021 17:27:10 +0000	[thread overview]
Message-ID: <D6AB2AA2-CBED-45EE-90C3-7D4F4FFD8540@oracle.com> (raw)
In-Reply-To: <547ee3794ac9678bc20ccb6ec35ba0fca5fe92f2.1633540771.git.bcodding@redhat.com>



> On Oct 6, 2021, at 1:20 PM, Benjamin Coddington <bcodding@redhat.com> wrote:
> 
> Why V2: further testing to verify INET6 handling, fix spelling mistakes
> 
> 8<------------------------------------------------------------------------
> 
> If nfsd has existing listening sockets without any processes, then an error
> returned from svc_create_xprt() for an additional transport will remove
> those existing listeners.  We're seeing this in practice when userspace
> attempts to create rpcrdma transports without having the rpcrdma modules
> present before creating nfsd kernel processes.  Fix this by checking for
> existing sockets before calling nfsd_destroy().
> 
> Signed-off-by: Benjamin Coddington <bcodding@redhat.com>

Thanks, applied to the for-next topic branch at

git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git


> ---
> fs/nfsd/nfsctl.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
> index c2c3d9077dc5..696a217255fc 100644
> --- a/fs/nfsd/nfsctl.c
> +++ b/fs/nfsd/nfsctl.c
> @@ -793,7 +793,10 @@ static ssize_t __write_ports_addxprt(char *buf, struct net *net, const struct cr
> 		svc_xprt_put(xprt);
> 	}
> out_err:
> -	nfsd_destroy(net);
> +	if (!list_empty(&nn->nfsd_serv->sv_permsocks))
> +		nn->nfsd_serv->sv_nrthreads--;
> +	 else
> +		nfsd_destroy(net);
> 	return err;
> }
> 
> -- 
> 2.30.2
> 

--
Chuck Lever




      reply	other threads:[~2021-10-06 17:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-06 14:18 [PATCH] NFSD: Keep existing listners on portlist error Benjamin Coddington
2021-10-06 14:22 ` Benjamin Coddington
2021-10-06 14:22 ` Chuck Lever III
2021-10-06 14:33 ` J. Bruce Fields
2021-10-06 14:43   ` Benjamin Coddington
2021-10-06 14:46     ` J. Bruce Fields
2021-10-06 17:16 ` Benjamin Coddington
2021-10-06 17:20 ` [PATCH v2] NFSD: Keep existing listeners " Benjamin Coddington
2021-10-06 17:27   ` Chuck Lever III [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D6AB2AA2-CBED-45EE-90C3-7D4F4FFD8540@oracle.com \
    --to=chuck.lever@oracle.com \
    --cc=bcodding@redhat.com \
    --cc=bfields@fieldses.org \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.