]> git.neil.brown.name Git - nfs-utils.git/commit
Check nfs options (vers/protocol) before trying mount. for-steved
authorNeil Brown <neilb@suse.de>
Mon, 21 Jul 2008 02:45:50 +0000 (12:45 +1000)
committerNeil Brown <neilb@suse.de>
Mon, 21 Jul 2008 02:45:50 +0000 (12:45 +1000)
commit852424a9a02dbe1a7c3b75a014bc71cad2ab6d5e
tree21343ebb795783b3a04ecbe80b2f5222215f9232
parent59f85cc9ab483bea0da743a876bf70f483dd36eb
Check nfs options (vers/protocol) before trying mount.

As the kernels nfs-mount client does not have heuristics to pick the
best protocol/version, also check with portmap to find what is
available before requesting a mount.

However don't try to 'ping' the services.  For NFS, this ping would
need to come from a reserved port, and these are a scarce resource.

If the mount found, retry the probe doing any ping that might be
needed in the hope of finding the problem.

Note: this patch also removes the (recently added) setting of
mountport= in the mount arguments. This is because:
  1/ the kernel can find it easily itself
  2/ it could confuse unmount which may be run much later
      when mountd is running on a different port.

Signed-off-by: Neil Brown <neilb@suse.de>
utils/mount/network.c
utils/mount/network.h
utils/mount/nfsmount.c
utils/mount/stropts.c