Re: [nfs-utils PATCH v2 0/2] nfsdctl version handling fixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 11 Jan 2025, Jeff Layton wrote:

> On Fri, 2025-01-10 at 15:17 -0500, Scott Mayhew wrote:
> > Two changes in how nfsdctl does version handling.  The first patch makes
> > the 'nfsdctl version' command behave according to the man page for w.r.t
> > handling +4/-4, e.g.
> > 
> > # utils/nfsdctl/nfsdctl
> > nfsdctl> threads 0
> > nfsdctl> version
> > +3.0 +4.0 +4.1 +4.2
> > nfsdctl> version -4
> > nfsdctl> version
> > +3.0 -4.0 -4.1 -4.2
> > nfsdctl> version +4
> > nfsdctl> version
> > +3.0 +4.0 +4.1 +4.2
> > nfsdctl> version -4 +4.2
> > nfsdctl> version
> > +3.0 -4.0 -4.1 +4.2
> > nfsdctl> ^D
> > 
> > The second patch makes nfsdctl's handling of the nfsd version options in
> > nfs.conf behave like rpc.nfsd's.  This is important since the systemd
> > service file will fall back to rpc.nfsd if nfsdctl fails.  I'll send a
> > test script and test results in a followup email.
> > 
> > -Scott
> > 
> > Scott Mayhew (2):
> >   nfsdctl: tweak the version subcommand behavior
> >   nfsdctl: tweak the nfs.conf version handling
> > 
> >  utils/nfsdctl/nfsdctl.c | 69 +++++++++++++++++++++++++++++++++++------
> >  1 file changed, 59 insertions(+), 10 deletions(-)
> > 
> 
> LGTM!
> 
> Reviewed-by: Jeff Layton <jlayton@xxxxxxxxxx>
> 
If you look at my test results, you'll notice that I was skipping the
test whenever vers3=n and vers4=n.  I was mainly doing this because in
those cases rpc.nfsd would error out with the message "no version
specified", while nfsdctl would not.  But when I went ahead and tested
those scenarios, rpc.nfsd's behavior seemed incorrect in several of
them.

For example, consider this scenario:

# cat /etc/nfs.conf
[nfsd]
vers3=n
vers4=n
vers4.0=n
vers4.1=n
vers4.2=y
# rpc.nfsd 16
rpc.nfsd: no version specified

That shouldn't have failed, because v4.2 is enabled... and before anyone
chimes in claiming that vers4=n should override any vers4.x=y config option,
consider this scenario:

# cat /etc/nfs.conf
[nfsd]
vers3=3
vers4=n
vers4.0=n
vers4.1=n
vers4.2=y
# rpc.nfsd 16
# cat /proc/fs/nfsd/versions 
+3 +4 -4.0 -4.1 +4.2

So anyways, a v3 patchset is incoming that changes both nfsdctl and
rpc.nfsd so that they behave more consistently.

-Scott





[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux