[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Zp5j2DW+2BNaIPif@tissot.1015granger.net>
Date: Mon, 22 Jul 2024 09:51:20 -0400
From: Chuck Lever <chuck.lever@...cle.com>
To: Jeff Layton <jlayton@...nel.org>
Cc: Neil Brown <neilb@...e.de>, Olga Kornievskaia <kolga@...app.com>,
Dai Ngo <Dai.Ngo@...cle.com>, Tom Talpey <tom@...pey.com>,
Lorenzo Bianconi <lorenzo@...nel.org>, linux-nfs@...r.kernel.org,
linux-kernel@...r.kernel.org, Steve Dickson <steved@...hat.com>
Subject: Re: [PATCH] nfsd: don't set SVC_SOCK_ANONYMOUS when creating nfsd
sockets
On Mon, Jul 22, 2024 at 08:32:39AM -0400, Jeff Layton wrote:
> On Fri, 2024-07-19 at 15:03 -0400, Chuck Lever wrote:
> > On Fri, Jul 19, 2024 at 02:55:53PM -0400, Jeff Layton wrote:
> > > When creating nfsd sockets via the netlink interface, we do want to
> > > register with the portmapper. Don't set SVC_SOCK_ANONYMOUS.
> >
> > NFSD's RDMA transports don't register with rpcbind, for example.
> >
>
> They still aren't registered with this patch either. After doing
> nfsdctl autostart:
>
> [kdevops@...vops-nfsd ~]$ rpcinfo -p
> program vers proto port service
> 100000 4 tcp 111 portmapper
> 100000 3 tcp 111 portmapper
> 100000 2 tcp 111 portmapper
> 100000 4 udp 111 portmapper
> 100000 3 udp 111 portmapper
> 100000 2 udp 111 portmapper
> 100024 1 udp 42104 status
> 100024 1 tcp 40159 status
> 100003 3 udp 2049 nfs
> 100227 3 udp 2049 nfs_acl
> 100003 3 tcp 2049 nfs
> 100003 4 tcp 2049 nfs
> 100227 3 tcp 2049 nfs_acl
> 100021 1 udp 46387 nlockmgr
> 100021 3 udp 46387 nlockmgr
> 100021 4 udp 46387 nlockmgr
> 100021 1 tcp 36565 nlockmgr
> 100021 3 tcp 36565 nlockmgr
> 100021 4 tcp 36565 nlockmgr
>
> I don't see a need to do anything else here.
Fair enough. Applied to nfsd-fixes (for v6.11-rc).
Not registering RDMA transports with rpcbind was done to mimic
Solaris behavior, IIRC. I don't remember any functional reason not
to register them.
> > > Fixes: 16a471177496 NFSD: add listener-{set,get} netlink command
> > > Reported-by: Steve Dickson <steved@...hat.com>
> > > Cc: Lorenzo Bianconi <lorenzo@...nel.org>
> > > Signed-off-by: Jeff Layton <jlayton@...nel.org>
> > > ---
> > > fs/nfsd/nfsctl.c | 3 +--
> > > 1 file changed, 1 insertion(+), 2 deletions(-)
> > >
> > > diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
> > > index 9e0ea6fc2aa3..34eb2c2cbcde 100644
> > > --- a/fs/nfsd/nfsctl.c
> > > +++ b/fs/nfsd/nfsctl.c
> > > @@ -2069,8 +2069,7 @@ int nfsd_nl_listener_set_doit(struct sk_buff *skb, struct genl_info *info)
> > > continue;
> > > }
> > >
> > > - ret = svc_xprt_create_from_sa(serv, xcl_name, net, sa,
> > > - SVC_SOCK_ANONYMOUS,
> > > + ret = svc_xprt_create_from_sa(serv, xcl_name, net, sa, 0,
> > > get_current_cred());
> > > /* always save the latest error */
> > > if (ret < 0)
> > >
> > > ---
> > > base-commit: 769d20028f45a4f442cfe558a32faba357a7f5e2
> > > change-id: 20240719-nfsd-next-d9582a2c50c2
> > >
> > > Best regards,
> > > --
> > > Jeff Layton <jlayton@...nel.org>
> > >
> >
>
> --
> Jeff Layton <jlayton@...nel.org>
--
Chuck Lever
Powered by blists - more mailing lists