exportfs: exit with error code if there was any error (take 2).

exportfs currently exits with a non-zero error for some errors,
but not for others.

It does this by having various support routines set the global
variable "export_errno".

Change this to have 'xlog' set export_errno if an ERROR is
reported.  That way all errors will be caught.

Note that the exit error code is changed from 22 (EINVAL)
to the more traditional '1'.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Steve Dickson <steved@redhat.com>
mountd: Use protocol bit fields to turn protocols off.

Convert the current code to used the NFSCTL_XXX macros
to turn off the TCP listener.

Signed-off-by: Steve Dickson <steved@redhat.com>
mountd: Add the ability to disable UDP listeners.

Add the ability to turn off UDP listeners with the
new "-u | --no-udp" flag.

Signed-off-by: Steve Dickson <steved@redhat.com>
statd: fix race condition for parallel startup of statd

When start_statd figures out that statd is not yet running it starts
it, waits for the invoked process to complete, and finally verifies
that statd is working.  This approach works for serially mounting NFS
file systems but has a race condition for parallel mounting.

In the parallel case it can happen that two mount commands A and B
both decide that statd needs to be started. Both of them try to start
statd.  Obviously only one of them can successfully do so, let's
assume this is command A in our case.  The statd invoked by B
terminates because the resource is already claimed by the statd
invoked by A.  The termination of B's statd though is before the
statd of A has completely set up all things.  This causes the check
for a working statd of command B to fail and terminate the mount
request with an error.

To prevent this we define a timeout value.  In case the initial check
after invoking statd fails we try again in a loop 10 times a second
until the timeout is reached.

In our tests when the race occurred we typically were successful
already on the first retry within the loop.

Signed-off-by: Steve Dickson <steved@redhat.com>
nfs.man: add description of multiple sec= options

The client now supports multiple sec= options as a colon delimited list.

Signed-off-by: Weston Andros Adamson <dros@netapp.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
Release 1.2.9

Signed-off-by: Steve Dickson <steved@redhat.com>