mount.nfs: rearchitect mount version/protocol negotiation logic
authorChuck Lever <chuck.lever@oracle.com>
Tue, 14 Jul 2009 20:35:26 +0000 (16:35 -0400)
committerSteve Dickson <steved@redhat.com>
Tue, 14 Jul 2009 20:35:26 +0000 (16:35 -0400)
commitca4e817b083553b6244e81ac91d9db86c09948b1
treefb60dad47dd903bc39bd0ea10964d2633fe4f535
parent19ba81f64447dca205362a119f1e72701438aecc
mount.nfs: rearchitect mount version/protocol negotiation logic

Text-based mounts try a mount operation first with default settings,
then negotiate via rpcbind queries and retry the mount, if the default
settings don't work.  This method introduces long delays in certain
common scenarios, and makes it difficult to tell when it is
appropriate to fail immediately or negotiate and retry.

To address these behavioral regressions, make text-based mounts
operate the same way that legacy mounts work.  Perform rpcbind queries
with short timeouts first, then use the results to determine
transport, version, and port number settings for the mount.

This allows the mount.nfs command to detect server settings, or
whether negotiation is even possible, quickly.  It also makes it
simple to determine when to fail vs. when to retry.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
utils/mount/stropts.c