diff options
author | NeilBrown <neilb@suse.com> | 2017-06-01 09:42:16 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2017-06-01 09:52:29 -0400 |
commit | d406648690fa0fdf5333d7d54cf8210dab7f4d9c (patch) | |
tree | 7c8de5cb2b0e3a9921f490d87dfbd1d2218db106 /support/include/nfs | |
parent | 0277815d9509ffc197c27973313f364616245704 (diff) | |
download | nfs-utils-d406648690fa0fdf5333d7d54cf8210dab7f4d9c.tar.gz nfs-utils-d406648690fa0fdf5333d7d54cf8210dab7f4d9c.tar.xz nfs-utils-d406648690fa0fdf5333d7d54cf8210dab7f4d9c.zip |
mount.nfs: improve version negotiation when vers=4 is specified.
If NFSv4, in general, is requested (possibly by -t nfs4 or -o v4 or -o
vers=4 etc) then we need to negotiate the best minor version, but must
not fallback to v3 or v2. Internally, this state is reflected in v_mode
== V_GENERAL. This means that a major version was given, but the minor
version still needs to be negotiated.
This is handled by nfs_autonegotiate(). It currently does the right
thing for EPROTONOSUPPORT and EINVAL, but not for other errors.
In particular, ENOENT can cause problems as NFSv4 might export
a different namespace than NFSv3 (e.g. by using fsid=0 in the Linux
NFS server). Currently a mount request for NFSv4 and a particular path
can result if an NFSv3 mount if the path is available with v3 but
not v4.
So move the special handling of V_GENERAL into the common fall_back:
code, and add extra checking in the ENCONNREFUSED case, which does
not use fall_back:.
Tested-by: Steve Dickson <steved@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'support/include/nfs')
0 files changed, 0 insertions, 0 deletions