Re: [PATCH 0/7 nfs-utils] Assorted improvements to handling nfsmount.conf

Steve Dickson
2020-12-17T15:11:57Z

On 12/15/20 11:43 PM, NeilBrown wrote:
> The handling of version specifiers in mount.nfs, and even in the kernel,
> is somewhat ideosyncratic when multiple versions are listed.
>
> For example, "-o vers=4.1,nfsvers=3" will result in both versions being
> passed to the kernel, and the kernel complaining because version 3
> doesn't support minor version numbers.
> Conversly, "-o nfsvers=4.1,vers=3" will result in the "nfsvers=4.1"
> being stripped off and vers=3 being used.
>
> Further, version settings found in /etc/nfsmount.conf are sometimes
> ignored if a version is given on the command line, and sometimes not.
> If "nfsvers=3" is in the config file, then the presense of "-o vers=4.1"
> will cause it to be ignored, the presense of "-o nfsvers=4.1" will too, but
> mainly because of sloppy code. However "-o v4.1" won't cause the config
> file setting to be ignored.
>
> This series cleans up all of this and some related issues, and updates
> the man page.
>
> With other options, the last option listed on the command line wins.
> I have not tried to provide that for version options. Instead, if there
> are multiple version options listed, and error is reported.
>
> Thanks,
> NeilBrown
The series is Committed! (tag: nfs-utils-2-5-3-rc3)

steved.

>
> ---
>
> NeilBrown (7):
> mount: configfile: remove whitesspace from end of lines
> mount: report error if multiple version specifiers are given.
> Revert "mount.nfs: merge in vers= and nfsvers= options"
> mount: convert configfile.c to use parse_opt.c
> mount: options in config file shouldn't over-ride command-line options.
> mount: don't add config-file protcol version options when already present.
> mount: update nfsmount.conf man page
>
>
> utils/mount/configfile.c | 230 +++++++++++-----------------------
> utils/mount/network.c | 36 +++---
> utils/mount/nfsmount.conf.man | 110 ++++++++++------
> utils/mount/parse_opt.c | 12 +-
> utils/mount/parse_opt.h | 3 +-
> 5 files changed, 174 insertions(+), 217 deletions(-)
>
> --
> Signature
>