]> git.decadent.org.uk Git - nfs-utils.git/log
nfs-utils.git
16 years agoadd_mtab() calls unlock_mtab() twice in one of its error exit paths.
Steve Dickson [Wed, 16 Jan 2008 16:50:41 +0000 (11:50 -0500)]
add_mtab() calls unlock_mtab() twice in one of its error exit paths.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
16 years agoWhen mount.nfs reports that statd isn't running, it suggests using the "-o
Steve Dickson [Wed, 16 Jan 2008 16:48:23 +0000 (11:48 -0500)]
When mount.nfs reports that statd isn't running, it suggests using the "-o
nolocks" option, which doesn't exist.  It should say "-o nolock".

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
16 years agoAutomatically set 'nohide' on referral exports.
Steve Dickson [Wed, 9 Jan 2008 18:13:31 +0000 (13:13 -0500)]
Automatically set 'nohide' on referral exports.

Signed-off-by: Steve Dickson <steved@redhat.com>
16 years agoRedress some nits in the description of the timeo option
Steve Dickson [Wed, 9 Jan 2008 16:51:41 +0000 (11:51 -0500)]
Redress some nits in the description of the timeo option
in the nfs(5) man page.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
16 years agoFixed typo in rpc.mountd's man page
Steve Dickson [Mon, 7 Jan 2008 15:39:37 +0000 (10:39 -0500)]
Fixed typo in rpc.mountd's man page

Signed-off-by: Steve Dickson <steved@redhat.com>
16 years agoGet rid of the "-i" option for mount.nfs[4] and always use the text-
Steve Dickson [Fri, 4 Jan 2008 15:26:21 +0000 (10:26 -0500)]
Get rid of the "-i" option for mount.nfs[4] and always use the text-
based mount(2) system call for kernel version 2.6.23 and later.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
16 years agoIncorporated Chuck Lever's and Don Domingo's changes to the
Steve Dickson [Fri, 4 Jan 2008 14:27:35 +0000 (09:27 -0500)]
Incorporated Chuck Lever's and Don Domingo's changes to the
nfs(5) manual page.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Don Domingo <ddomingo@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
17 years agoWhen mountd gets a request to export a mountpoint which is not
Steve Dickson [Sat, 3 Nov 2007 14:40:36 +0000 (10:40 -0400)]
When mountd gets a request to export a mountpoint which is not
explicitly exported, but is below an export point that is flagged as
"crossmnt", it passes the wrong path name to the kernel for the
  "filehandle -> directory"
mapping.

This can badly confuse the NFS client, and is certainly wrong.
So use the correct path names.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Steve Dickson <steved@redhat.com>
17 years agoWhen following a list of mount versions to probe -
Steve Dickson [Sat, 3 Nov 2007 14:36:36 +0000 (10:36 -0400)]
When following a list of mount versions to probe -
e.g. probe_mnt1_first or probe_mnt3_first - probe_both will first
probe the appropriate NFS version and then, if that succeeds, probe
the actual mount version.  However instead of probing the target mount
version, it probes the "most appropriate" mount version for the given NFS version.
This results in it probing:
  NFSv2, MOUNTv1
twice rather than
  NFSv2, MOUNTv1
  NFSv2, MOUNTv2

as would be more correct.

This patch removes the "choose most correct" step and just use the
current mouint version for the probe_vers array.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Steve Dickson <steved@redhat.com>
17 years agoThis means that if mountd is run with "--no-nfs-version 3",
Steve Dickson [Sat, 3 Nov 2007 13:35:05 +0000 (09:35 -0400)]
This means that if mountd is run with "--no-nfs-version 3",
It will first probe for NFS version 3, which will succeed (assuming the
kernel supported NFSv3), then it will check the matching mountd version (3)
and probe_port on discovering that isn't supported will try other versions,
find "1" is supported will succeed.

This leaves up using mount version 1 for an NFSv3 mount, which doesn't work
and leads to a SIGSEGV

There is no case where trying other versions is needed the request one is
not supported, so simply remove that code.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Steve Dickson <steved@redhat.com>
17 years agoThe wording in the exportfs man page can be a bit confusing, implying
Steve Dickson [Sat, 3 Nov 2007 13:14:57 +0000 (09:14 -0400)]
The wording in the exportfs man page can be a bit confusing, implying
that "exportfs -u :/foo" will unexport /foo from all hosts, which it won't.

This patch cleans that wording up and adds a couple examples on how to
unexport directories

Signed-off-by: Steinar H. Gunderson <sesse@debian.org>
Signed-off-by: Steve Dickson <steved@redhat.com>
17 years agoAdded -S/--since to the nfsstat(1) manpage
Steve Dickson [Fri, 26 Oct 2007 11:57:10 +0000 (07:57 -0400)]
Added -S/--since to the nfsstat(1) manpage

Author: David Richter <richterd@citi.umich.edu>
Signed-off-by: Steve Dickson <steved@redhat.com>
17 years agoRelease 1.1.1 nfs-utils-1-1-1
Neil Brown [Fri, 19 Oct 2007 03:07:28 +0000 (13:07 +1000)]
Release 1.1.1

17 years agoRemove unnecessary code from idmapd.
Kevin Coffman [Fri, 12 Oct 2007 20:35:25 +0000 (16:35 -0400)]
Remove unnecessary code from idmapd.

This patch removes unnecessary code from idmapd. setproctitle is not used
anywhere and it can be removed. In addition the kernel section of the
nfs_idmap.h header is not used and is out of date and thus is removed.

Signed-off-by: David P. Quigley <dpquigl@tycho.nsa.gov>
Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agoRemove old logging implementation for idmapd and rework gssd and idmapd to use the...
Kevin Coffman [Fri, 12 Oct 2007 20:35:20 +0000 (16:35 -0400)]
Remove old logging implementation for idmapd and rework gssd and idmapd to use the new xlog logging infrastructure.

This patch removes all of the old idmap_* logging functions and replaced them
with the corresponding xlog functions. In addition that that it also reworks
the gssd logging wrappers to use the new xlog_backend. Finally it makes
necessary changes to the build files to get the project compiling again.

Signed-off-by: David P. Quigley <dpquigl@tycho.nsa.gov>
Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agoCleanup xlog logging code to be safe and usable for all
Kevin Coffman [Fri, 12 Oct 2007 20:35:15 +0000 (16:35 -0400)]
Cleanup xlog logging code to be safe and usable for all

This patch reworks the xlog logging code to avoid rebuilding the message into a
fixed size buffer. It also adds two new logging functions xlog_warn and
xlog_err which are replacements for idmap_warn and idmap_err. There use to be
two different variates of these functions with the only difference being that
one flavor tacked on the error string to the end of the message. This
responsibility has been pushed to the called of the function since it
needlessly complicated the function and required us to rebuild the message
strings.

Signed-off-by: David P. Quigley <dpquigl@tycho.nsa.gov>
Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agoRemove svcgssd's private version of cacheio.c
Kevin Coffman [Fri, 12 Oct 2007 20:35:10 +0000 (16:35 -0400)]
Remove svcgssd's private version of cacheio.c

Now that svcgssd is using the qword_* functions in the
support library, remove the private version.

Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agoUse nfslib versions of cacheio functions
Kevin Coffman [Fri, 12 Oct 2007 20:35:05 +0000 (16:35 -0400)]
Use nfslib versions of cacheio functions

Now that the nfslib library has all the necessary functions and they
all operate as needed, use them instead of the private versions in
utils/gssd/cacheio.c.
The obsolete private versions are removed in the next patch.

Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agoCopy new cacheio functions used by svcgssd to nfslib
Kevin Coffman [Fri, 12 Oct 2007 20:35:00 +0000 (16:35 -0400)]
Copy new cacheio functions used by svcgssd to nfslib

Copy private qword_ functions from the svcgssd version into
the general nfslib library.   Add prototypes as needed.
Also, update readline to use a bigger buffer allocation as is
needed in the svcgssd version.

Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agoUse printerr to print svcgssd downcall debugging info
Kevin Coffman [Fri, 12 Oct 2007 20:34:54 +0000 (16:34 -0400)]
Use printerr to print svcgssd downcall debugging info

Rather than depending on modified qword_* functions to print
svcgssd debugging information, use printerr in the downcall
function.

And while we're at it, label things so we know what we're looking at!

Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agoMake print_hexl function write to stdout rather than using printerr
Kevin Coffman [Fri, 12 Oct 2007 20:34:49 +0000 (16:34 -0400)]
Make print_hexl function write to stdout rather than using printerr

print_hexl() currently uses printerr, but is really only necessary
for local debugging and should simply write to stdout.
Also change it to print the description internally.
Wrap it and its use in #ifdef DEBUG.

Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agoFix new warning after strict prototype checking enabled
Kevin Coffman [Fri, 12 Oct 2007 20:34:44 +0000 (16:34 -0400)]
Fix new warning after strict prototype checking enabled

Fix function declaration to eliminate compiler warning about it
not being a prototype after -Wstrict-prototypes was added.

Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agotext-based mount.nfs: Fix po_rightmost() enum return values
Chuck Lever [Thu, 11 Oct 2007 17:55:02 +0000 (13:55 -0400)]
text-based mount.nfs: Fix po_rightmost() enum return values

Neil observed that po_rightmost() now returns enum values from both

enum {
PO_NOT_FOUND = 0,
PO_FOUND = 1,
}

and

enum {
PO_KEY2_RIGHTMOST = 1,
PO_KEY1_RIGHTMOST = -1,
}

It would be cleaner to use a single enum for po_rightmost()'s return value.

We take the next logical step and create specific types for the return
values in order to ensure we don't mix the enum values, and to document
explicitly what return values callers can expect.

This could have been a simpler patch, but I think the end result is a
cleaner overall parser API.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agomountd: address a minor compiler warning
Chuck Lever [Thu, 11 Oct 2007 20:52:03 +0000 (16:52 -0400)]
mountd: address a minor compiler warning

auth.c: In function ‘auth_authenticate’:
auth.c:190: warning: ‘error’ may be used uninitialized in this function

"error" is used as an output parameter, but the compiler has no way of
knowing that.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agomountd: eliminate a spurious compiler warning
Chuck Lever [Thu, 11 Oct 2007 20:52:01 +0000 (16:52 -0400)]
mountd: eliminate a spurious compiler warning

auth.c:61: warning: function declaration isn’t a prototype

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agoFix version fallback for unmount.
Neil Brown [Thu, 11 Oct 2007 23:03:06 +0000 (09:03 +1000)]
Fix version fallback for unmount.

Previously, if the mtab record didn't mention a version, unmount
would assume a v3 umount and send an UNMOUNT request accordingly.
This is wrong.

So remove the 'v3' assumption, and allow probe_port to continue when
it gets a version number mis-match.

Also there was some overloading of the meaning of pm_vers==0 relating
to v4 mounts.  As do_nfs_umount is never called for v4, rename it to
do_nfs_umount23, and remove v4 handling from there and from
nfs_call_umount.

Signed-off-by: Neil Brown <neilb@suse.de>
17 years agoDon't fail an unmount just because we couldn't contact the NFS server.
Neil Brown [Thu, 11 Oct 2007 01:29:07 +0000 (11:29 +1000)]
Don't fail an unmount just because we couldn't contact the NFS server.

If we fail to talk to the NFS server when unmounted a v2 or v3 mount,
still do the unmount, but allow the error to propagate up.

Signed-off-by: Neil Brown <neilb@suse.de>
17 years agotext-based mount.nfs: Plug "fg" and "bg" processing into nfsmount_string()
Chuck Lever [Wed, 10 Oct 2007 19:06:46 +0000 (15:06 -0400)]
text-based mount.nfs: Plug "fg" and "bg" processing into nfsmount_string()

We have all the pre-requisites now, so add "fg" and "bg" mount processing
to text-based NFS mounts.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agotext-based mount.nfs: Add functions to handle background mounting
Chuck Lever [Wed, 10 Oct 2007 19:06:43 +0000 (15:06 -0400)]
text-based mount.nfs: Add functions to handle background mounting

Add helper functions that handle background mounts; one each for
foreground processing (to try the request, and determine when to fork);
and one for background processing (retry the request multiple times as
a forked background daemon).

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agotext-based mount.nfs: add function to do foreground retries
Chuck Lever [Wed, 10 Oct 2007 19:06:41 +0000 (15:06 -0400)]
text-based mount.nfs: add function to do foreground retries

Make the differences between the foreground and background mount logic
explicit by creating separate functions to handle each -- think of them as
separate scripts for doing a foreground or a background mount.

NFS foreground mounts are supposed to retry for a little while before
giving up.  Add a function to handle this.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agotext-based mount.nfs: sort between permanent and temporary errors
Chuck Lever [Wed, 10 Oct 2007 19:06:39 +0000 (15:06 -0400)]
text-based mount.nfs: sort between permanent and temporary errors

The text-based mount.nfs program must distinguish between different types
of errors returned from the kernel.  Permanent errors, like bad mount
options, should cause an immediate failure.  Temporary errors, such as a
connection timeout, should result in a retry of some type.

Add a function that sorts between the two types of errors.  The list of
permanent errors can be adjusted later if needed.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agotext-based mount.nfs: Use helpers for invoking mount(2) system call
Chuck Lever [Wed, 10 Oct 2007 19:06:37 +0000 (15:06 -0400)]
text-based mount.nfs: Use helpers for invoking mount(2) system call

Expose support for NFS version and transport protocol fallback for NFSv2/3
mounts.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agotext-based mount.nfs: Implement falling back to NFSv2 and UDP
Chuck Lever [Wed, 10 Oct 2007 19:06:35 +0000 (15:06 -0400)]
text-based mount.nfs: Implement falling back to NFSv2 and UDP

If the initial user-specified options fail (with EOPNOTSUPP or
EPROTONOSUPPORT) then the server has rejected the requested NFS version
or transport protocol.

In that case, probe the server, then construct a fresh set of mount
options that ask for the specific mountd and NFS version and transport
protocol that the server supports.  Rewrite the mount options based on
the results of the probe, then try the request again.

An additional kernel patch is required to cause the kernel to return
EOPNOTSUPP when an rpcbind fails during a NULL request.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agotext-based mount.nfs: Add rewrite_mount_options() function
Chuck Lever [Wed, 10 Oct 2007 19:06:33 +0000 (15:06 -0400)]
text-based mount.nfs: Add rewrite_mount_options() function

Introduce a function for probing the server for what it supports, and then
rewriting the mount options using the probe results.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agotext-based mount.nfs: add a few useful parser return codes
Chuck Lever [Wed, 10 Oct 2007 19:06:30 +0000 (15:06 -0400)]
text-based mount.nfs: add a few useful parser return codes

I forgot to add symbolic return codes for po_rightmost().  Add return codes
for PO_KEY1_RIGHTMOST and PO_KEY2_RIGHTMOST.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agotext-based mount.nfs: Create helpers for invoking mount(2) system call
Chuck Lever [Mon, 8 Oct 2007 15:54:02 +0000 (11:54 -0400)]
text-based mount.nfs: Create helpers for invoking mount(2) system call

Add simple helper functions that invoke the mount(2) system call for
text-based mounts.  These look the same right now, but the NFSv2/v3 helper
will become more complex over the following patches as we implement version
and transport protocol fallback.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agotext-based mount.nfs: Remove unused top level functions
Chuck Lever [Mon, 8 Oct 2007 15:53:57 +0000 (11:53 -0400)]
text-based mount.nfs: Remove unused top level functions

nfsmount_s() and nfs4mount_s() are no longer used, so eliminate them.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agotext-based mount.nfs: combine nfsmount_s() and nfs4mount_s() paths
Chuck Lever [Mon, 8 Oct 2007 15:53:51 +0000 (11:53 -0400)]
text-based mount.nfs: combine nfsmount_s() and nfs4mount_s() paths

The top-level logic that handles text-based mount options is mostly the
same for NFS and NFSv4 mounts.  To improve maintainability, let's combine
the nfsmount_s() and nfs4mount_s() functions.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agotext-based mount.nfs: refactor mandatory mount option processing
Chuck Lever [Mon, 8 Oct 2007 15:53:46 +0000 (11:53 -0400)]
text-based mount.nfs: refactor mandatory mount option processing

We're about to combine nfsmount_s() and nfs4mount_s().  Refactor the
version-specific mount option processing into a separate function.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agotext-based mount.nfs: rename fix_up_mounthost_opt()
Chuck Lever [Mon, 8 Oct 2007 15:53:41 +0000 (11:53 -0400)]
text-based mount.nfs: rename fix_up_mounthost_opt()

Spell out _option, just like other mount-option specific functions.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agotext-based mount.nfs: Fix mounthost= processing
Chuck Lever [Fri, 28 Sep 2007 20:37:06 +0000 (16:37 -0400)]
text-based mount.nfs: Fix mounthost= processing

The 'mounthost=' option names a host where the mountd service is running.
The option is used to direct clients to use a different host for the mountd
procotol than the host where the NFS service is running.

The nfs(5) man page shows that the 'mounthost=' option takes a name, not
an address.  The kernel's text-based mount option parsing logic expects an
IPv4 address.  This is necessary because the kernel cannot itself resolve
hostnames to addresses.

Resolve the hostname and pass in a new mount option that contains the
resolved address, 'mountaddr=', to the kernel.

This requires a patch to the kernel to recognize the new 'mountaddr='
option, and to change the 'mounthost=' parsing logic to treat the value of
this option as a simple string.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agotext-based mount.nfs: Clean up helper functions that are no longer used
Chuck Lever [Fri, 28 Sep 2007 20:37:01 +0000 (16:37 -0400)]
text-based mount.nfs: Clean up helper functions that are no longer used

Remove older string parsing functions in the text-based mount.nfs
implementation that are now no longer used.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agotext-based mount.nfs: start using new mount option parsing facility
Chuck Lever [Fri, 28 Sep 2007 20:36:56 +0000 (16:36 -0400)]
text-based mount.nfs: start using new mount option parsing facility

Use the new mount option parsing functions to handle existing mount
option string parsing needs in the text-based mount implementation.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agotext-based mount.nfs: add parser init and destroy calls
Chuck Lever [Fri, 28 Sep 2007 20:36:51 +0000 (16:36 -0400)]
text-based mount.nfs: add parser init and destroy calls

Introduce parser init and destroy calls in the main text-based mount
handling routines.  Don't actually use the parsed option object yet.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agotext-based mount.nfs: prepare for more complex error exit handling
Chuck Lever [Fri, 28 Sep 2007 20:36:45 +0000 (16:36 -0400)]
text-based mount.nfs: prepare for more complex error exit handling

I'm about to add an object or two that needs to be freed before the main
functions exit.  Prepare the logic by adding an 'out' label and some
goto's.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agotext-based mount.nfs: Use new parser to handle 'addr=' and 'clientaddr='
Chuck Lever [Fri, 28 Sep 2007 20:36:40 +0000 (16:36 -0400)]
text-based mount.nfs: Use new parser to handle 'addr=' and 'clientaddr='

Introduce, but don't yet use, functions that will eventually replace
append_addr_opt() and append_clientaddr_opt().

Note the behavioral change in append_addr_opt() -- it simply removes
any previous 'addr=' rather than throwing an error.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agotext-based mount.nfs: parse option strings into lists
Chuck Lever [Fri, 28 Sep 2007 20:36:35 +0000 (16:36 -0400)]
text-based mount.nfs: parse option strings into lists

Adapt a parsing trick used by Python.

Parse mount option strings into an abstract data type so we don't have to
copy and/or tokenize the whole option string multiple times while trying
to manipulate the mount options.  Then, just before calling the mount(2)
system call, convert the object back into a C string.

One major advantage of this approach is that we can copy the final version
of the mount options into /etc/mtab when we're done, instead of copying in
the original mount options that the user specified.  Any fallback from NFS
v3 to NFS v2 or TCP to UDP that was done by mount.nfs will be reflected in
/etc/mtab.

This patch adds methods for creating and manipulating mount option data
objects.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agomount.nfs: add new string tokenizer facility
Chuck Lever [Fri, 28 Sep 2007 20:36:30 +0000 (16:36 -0400)]
mount.nfs: add new string tokenizer facility

To quote the strtok(3) man page: "Avoid using these functions."

OK.  We've created our own.  The main reason for this is that strtok(3)
doesn't handle quoted delimiters at all.  We need to handle this:

   context="foo,bar"

where 'context' is a single mount option that sets a token string that
possibly uses the same delimiter that the mount command uses to separate
options (that is, a comma).

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agorpc.mountd: add new mode for handling netgroup-heavy configurations
Jeff Layton [Thu, 27 Sep 2007 10:54:04 +0000 (06:54 -0400)]
rpc.mountd: add new mode for handling netgroup-heavy configurations

If a host is a member of a large number of netgroups, it becomes easily
possible for client_compose to generate a m_hostname string that
overflows the maximum string length allowed by the kernel caches.

This patch adds a new mode for mountd where it will map IP address to IP
address in the auth.unix.ip cache. When this enabled, mountd doesn't
bother using client_compose to build the m_hostname string. It just
populates it with the dotted-quad ip address. When mountd handles a
mount request, it then has an IP address and a path. It then calls
client_check to check the host against export entries where the path has
already matched.

Since we don't bother looking up netgroups which have no relation to the
mount, this can be a big performance gain in netgroup-heavy
configurations.  The downside is that every host has a corresponding
entry in the nfsd.export and nfsd.fh caches as well as the auth.unix.ip
cache.

The new behavior is automatically enabled if the length of all of the
concatenated netgroup names in the export table is longer than half
NFSCLNT_IDMAX. The rationale for this logic is that this should allow
for a host to be a member of a long list of netgroups while still
allowing for other matches.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Acked-by: Steve Dickson <steved@redhat.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agorpc.mountd: create client_resolve and change client_compose to take a hostent arg
Jeff Layton [Thu, 27 Sep 2007 10:53:58 +0000 (06:53 -0400)]
rpc.mountd: create client_resolve and change client_compose to take a hostent arg

This moves the resolution of IP address to hostent into a helper function
and has other functions call it. Having client_compose take a hostent arg
allows us to avoid an extra hostname lookup in the auth_authenticate
codepath as well. Instead of redoing this lookup in client_compose, we can
simply reuse the hostent that was already generated in auth_authenticate.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Acked-by: Steve Dickson <steved@redhat.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agorpc.mountd: make exportent->e_hostname a dynamically-allocated string
Jeff Layton [Thu, 27 Sep 2007 10:53:53 +0000 (06:53 -0400)]
rpc.mountd: make exportent->e_hostname a dynamically-allocated string

This makes the e_hostname field of the exportent into a pointer to a
dynamically allocated string. This is necessary since this is field is
often filled out from the m_hostname. This too adds a few
micro-optimizations as we can avoid copying the string in some places
and simply pass a pointer to the original string instead.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Acked-by: Steve Dickson <steved@redhat.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agorpc.mountd: Change nfs_client->m_hostname to be a dynamically-allocated string
Jeff Layton [Thu, 27 Sep 2007 10:53:48 +0000 (06:53 -0400)]
rpc.mountd: Change nfs_client->m_hostname to be a dynamically-allocated string

Change nfs_client->m_hostname to be dynamically allocated rather than a
fixed length array of size NFSCLNT_IDMAX. This also adds a bit of
micro-optimization in a few places since it reduces the amount of string
copying that needs to be done.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Acked-by: Steve Dickson <steved@redhat.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agorpc.mountd: fix memory leak and error handling in nfsd_fh
Jeff Layton [Thu, 27 Sep 2007 10:53:43 +0000 (06:53 -0400)]
rpc.mountd: fix memory leak and error handling in nfsd_fh

nfsd_fh() uses strdup for creating found_path and doesn't check the
return value. It also doesn't free this memory when the function
returns. Check the return value of strdup and return immediately
if it's NULL. Also, free found_path on exit.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Acked-by: Steve Dickson <steved@redhat.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agoDon't do_nfs_umount() for NFSv4 unmounts
Chuck Lever [Mon, 24 Sep 2007 15:29:36 +0000 (11:29 -0400)]
Don't do_nfs_umount() for NFSv4 unmounts

No need to talk to mountd when unmounting nfs4 filesystems.

Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
Acked-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agoumount.nfs: umount doesn't recognize a busy file system
Chuck Lever [Mon, 24 Sep 2007 15:29:31 +0000 (11:29 -0400)]
umount.nfs: umount doesn't recognize a busy file system

umount.nfs shouldn't remove a busy file system from /etc/mtab, and should
report and return an error.  I also added an extra "goto" to make the flow
of control more clear, and to reduce the chance that a future change in
this logic will break it.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agoumount.nfs: Refactor remount logic in umount.nfs
Chuck Lever [Mon, 24 Sep 2007 15:29:26 +0000 (11:29 -0400)]
umount.nfs: Refactor remount logic in umount.nfs

Clean up: move the remount logic into its own function.  This makes it
easier to fix a bug in the next patch.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agoumount.nfs: Fix white space damage in nfsumount.c
Chuck Lever [Mon, 24 Sep 2007 15:29:20 +0000 (11:29 -0400)]
umount.nfs: Fix white space damage in nfsumount.c

Replace leading blanks with tabs in del_mtab().

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agomount.nfs: Add error messages for errors reported by text-based mount(2)
Chuck Lever [Mon, 24 Sep 2007 15:29:15 +0000 (11:29 -0400)]
mount.nfs: Add error messages for errors reported by text-based mount(2)

The text-based mount(2) system call API can return some additional errors
that we would like to report correctly to our users.  These should be safe
to use with the legacy mount(2) ABI as well.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agotext-based mount.nfs: Add text-based error reporting function
Chuck Lever [Mon, 24 Sep 2007 15:29:10 +0000 (11:29 -0400)]
text-based mount.nfs: Add text-based error reporting function

The mount_errors() function prints an error based on what just happened in
the user-space RPC library.  This is meaningless for text-based mounts,
since they don't use the RPC library for most things.

Add a new error printing function that the text-based logic can use to
report an error.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agomount.nfs: rename mount_errors()
Chuck Lever [Mon, 24 Sep 2007 15:29:05 +0000 (11:29 -0400)]
mount.nfs: rename mount_errors()

The function mount_errors() actually reports RPC errors generated by the
user-land RPC library.  We're about to add a similar function for reporting
system call errors via errno, so rename mount_errors() to be more specific
about what it does.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agotext-based mount.nfs: Use "child" instead of "bg" for nfsmount_s
Chuck Lever [Mon, 24 Sep 2007 15:28:59 +0000 (11:28 -0400)]
text-based mount.nfs: Use "child" instead of "bg" for nfsmount_s

Match a recent change to nfs4mount_s -- eventually it will become clear why
these were renamed.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agomount.nfs: Don't leak mount_opts
Chuck Lever [Mon, 24 Sep 2007 15:28:54 +0000 (11:28 -0400)]
mount.nfs: Don't leak mount_opts

A C string containing the user's requested mount options is constructed by
the main mount function in utils/mount/mount.c, but is never freed.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agomount.nfs: Don't leak extra_opts
Chuck Lever [Mon, 24 Sep 2007 15:28:49 +0000 (11:28 -0400)]
mount.nfs: Don't leak extra_opts

The mount.nfs[4] command should properly release extra_opts before exiting.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agotext-based mount.nfs: Fix memory leak in add_mtab()
Chuck Lever [Mon, 24 Sep 2007 15:28:44 +0000 (11:28 -0400)]
text-based mount.nfs: Fix memory leak in add_mtab()

The add_mtab() function in utils/mount/mount.c calls fix_opts_string() to
construct an /etc/mtab entry, but never frees the result.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agomount.nfs: teach [u]mount.nfs[4] to exit with EX_SUCCESS instead of 0
Chuck Lever [Mon, 24 Sep 2007 15:28:38 +0000 (11:28 -0400)]
mount.nfs: teach [u]mount.nfs[4] to exit with EX_SUCCESS instead of 0

Use the newly defined EX_SUCCESS exit code in all the right places.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agomount.nfs: add EX_SUCCESS exit code
Chuck Lever [Mon, 24 Sep 2007 15:28:33 +0000 (11:28 -0400)]
mount.nfs: add EX_SUCCESS exit code

We've had some recent trouble, especially in the umount code, that appears
to be due to functions returning a 1 or a 0 return code when they should be
returning a mount exit code (such as EX_FAIL) or a 0.

To help clearly distinguish these two classes of functions, define an
EX_SUCCESS exit code, which is equal to zero.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agomount.nfs: Provide comments for public network functions
Chuck Lever [Mon, 24 Sep 2007 15:28:28 +0000 (11:28 -0400)]
mount.nfs: Provide comments for public network functions

Clean up: Document public functions in util/mount/network.c with block
comments.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agoFix the usage message for gssd to reflect new option
Kevin Coffman [Fri, 7 Sep 2007 14:18:40 +0000 (10:18 -0400)]
Fix the usage message for gssd to reflect new option

Fix the usage message for gssd to reflect new -M option added in 1.1.0

Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agoChange to a dependency on libgssglue rather than libgssapi
Kevin Coffman [Fri, 7 Sep 2007 14:18:35 +0000 (10:18 -0400)]
Change to a dependency on libgssglue rather than libgssapi

From: Guillaume Rousse <Guillaume.Rousse@inria.fr>

Use the renamed library libgssglue rather than libgssapi.
Also bump the required version for librpcsecgss (to the one that
also requires libgssglue rather than libgssapi).

Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agomount.nfs: Update description of clientaddr= in nfs(5)
Chuck Lever [Tue, 4 Sep 2007 20:13:55 +0000 (16:13 -0400)]
mount.nfs: Update description of clientaddr= in nfs(5)

The description of clientaddr= in nfs(5) is out of date and omits some
other typical reasons for using it.  Expand its description.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agomount.nfs: restore admin-specified clientaddr option
Chuck Lever [Tue, 4 Sep 2007 20:13:50 +0000 (16:13 -0400)]
mount.nfs: restore admin-specified clientaddr option

Revert an earlier change to make specifying the clientaddr= option illegal.

Jeff Layton pointed out that admins may want to specify the clientaddr=
option to advertise a different callback address when accessing an NFSv4
server through a NAT router.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agomount.nfs: Add a block comment before mount_error() and umount_error()
Chuck Lever [Fri, 24 Aug 2007 17:11:53 +0000 (13:11 -0400)]
mount.nfs: Add a block comment before mount_error() and umount_error()

Add block comments before mount_error() and umount_error() to help
distinguish them from the other error reporting functions.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agomount.nfs: Remove get_my_ipv4addr() from utils/mount/stropts.c
Chuck Lever [Fri, 24 Aug 2007 17:11:48 +0000 (13:11 -0400)]
mount.nfs: Remove get_my_ipv4addr() from utils/mount/stropts.c

The get_my_ipv4addr() function is no longer used, so remove it from
utils/mount/stropts.c.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agomount.nfs: Use get_client_addr() to build clientaddr= option
Chuck Lever [Fri, 24 Aug 2007 17:11:43 +0000 (13:11 -0400)]
mount.nfs: Use get_client_addr() to build clientaddr= option

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agomount.nfs: Create a new API to find out client's address
Chuck Lever [Fri, 24 Aug 2007 17:11:38 +0000 (13:11 -0400)]
mount.nfs: Create a new API to find out client's address

Provide a version of clnt_ping() that discovers the client's address, but
doesn't do an RPC ping.  The in-kernel text-based mount code already does
a ping, so all we need here is address discovery.

As well, add a block comment in front of clnt_ping() that hopefully
elucidates the differences.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agomount.nfs: Refactor parse_devname and fill_ipv4_addr
Chuck Lever [Fri, 24 Aug 2007 17:11:32 +0000 (13:11 -0400)]
mount.nfs: Refactor parse_devname and fill_ipv4_addr

We will eventually need the server address in both append_addr_opt()
and append_clientaddr_opt().  Call parse_devname() and fill_ipv4_addr()
from the top level functions.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agomount.nfs: Use dynamically allocated character buffers
Chuck Lever [Fri, 24 Aug 2007 17:11:27 +0000 (13:11 -0400)]
mount.nfs: Use dynamically allocated character buffers

Replace the use of static character arrays with buffers allocated via
xstrdup() in stropts.c.

I added a couple of extra length checks; not sure if these are really
necessary.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agomount.nfs: Remove get_my_ipv4addr() from append_addr_opt()
Chuck Lever [Fri, 24 Aug 2007 17:11:22 +0000 (13:11 -0400)]
mount.nfs: Remove get_my_ipv4addr() from append_addr_opt()

The result of the get_my_ipv4addr() function is not used in
append_addr_opt(), so remove the call and the ip_addr variable.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agomount.nfs: Don't allow the user to specify addr= or clientaddr=.
Chuck Lever [Fri, 24 Aug 2007 17:11:16 +0000 (13:11 -0400)]
mount.nfs: Don't allow the user to specify addr= or clientaddr=.

The current mount.nfs implementation doesn't allow users to specify their
own addr= or clientaddr= option.  The new string-based interface does
allow this, even though nfs(5) does not document 'addr=' and specifically
forbids adding 'clientaddr='.

Make the addition of either option by the user a permanent error.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agomount.nfs: Fix nfs4mount_s prototype.
Chuck Lever [Fri, 24 Aug 2007 17:11:11 +0000 (13:11 -0400)]
mount.nfs: Fix nfs4mount_s prototype.

The definition of nfs4mount_s in utils/mount/stropts.c doesn't match the
prototype declared in utils/mount/stropts.h.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agomount.nfs: Combine two verbose messages into one
Chuck Lever [Tue, 21 Aug 2007 16:19:18 +0000 (12:19 -0400)]
mount.nfs: Combine two verbose messages into one

A little less noise.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agomount.nfs: getport() should avoid modifying passed-in arguments
Chuck Lever [Tue, 21 Aug 2007 16:19:13 +0000 (12:19 -0400)]
mount.nfs: getport() should avoid modifying passed-in arguments

Defensive coding: getport() shouldn't alter the passed-in server address,
but should treat it as read only.  Have it operate on a copy.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agomount.nfs: Replace fork() with daemon() for backgrounding mounts
Chuck Lever [Tue, 21 Aug 2007 16:19:08 +0000 (12:19 -0400)]
mount.nfs: Replace fork() with daemon() for backgrounding mounts

Neil recommended this change to address a problem with background mount
processes handling signals properly during an init level change.  It is
also useful for preventing background mount processes from reporting
progress on the parent's tty, which is generally just annoying noise.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agomount: Small tidy up.
Neil Brown [Fri, 24 Aug 2007 03:11:00 +0000 (13:11 +1000)]
mount: Small tidy up.

1/ remove confusing sentence from a comment.
2/ remove needless 'exit' - just fall through to common exit.

Signed-off-by: Neil Brown <neilb@suse.de>
17 years agonfsstat: Add -S/--since flag.
david m. richter [Mon, 13 Aug 2007 19:16:14 +0000 (15:16 -0400)]
nfsstat: Add -S/--since flag.

Read statistics from the file given with -S/--since and display
the difference between those and the current statistics.  Valid stat files
are those in the form of /proc/net/rpc/nfs, /proc/net/rpc/nfsd, or any
"pretty" output from nfsstat itself.  Statistics that are missing from a
"pretty" stat file are treated as zeroes.

Similar to Neil Brown's suggestion, one might use this in
conjunction with watch(1) like this:

$ watch "nfsstat --since /tmp/stats; nfsstat >/tmp/stats"

Signed-off-by: David M. Richter <richterd@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agonfsstat: #define stat header labels.
david m. richter [Mon, 13 Aug 2007 19:15:57 +0000 (15:15 -0400)]
nfsstat: #define stat header labels.

Make #defines for the stat header labels, use for output, and add
to struct statinfo.  This will be used by a subsequent patch for
-S/--since.

Signed-off-by: David M. Richter <richterd@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agonfsstat: Remove some pointer comparisons against global statinfos.
david m. richter [Mon, 13 Aug 2007 19:15:48 +0000 (15:15 -0400)]
nfsstat: Remove some pointer comparisons against global statinfos.

Pass-in an "is_srv" arg instead of doing pointer comparisons
against the static statinfo arrays themselves.

Signed-off-by: David M. Richter <richterd@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agonfsstat: Obviate and remove copy_stats().
david m. richter [Mon, 13 Aug 2007 19:15:40 +0000 (15:15 -0400)]
nfsstat: Obviate and remove copy_stats().

Rather than copying stats during --sleep, instead introduce a few
pointers and rearrange them to avoid the copy.  Will be useful with
--since, too.

Signed-off-by: David M. Richter <richterd@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agonfsstat: rename *_tmp variables to *_old.
david m. richter [Mon, 13 Aug 2007 19:15:31 +0000 (15:15 -0400)]
nfsstat: rename *_tmp variables to *_old.

To make a subsequent patch a little clearer, make it explicit that
current *_tmp variables are actually always/only the "old" set used in
comparisons.

Signed-off-by: David M. Richter <richterd@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agoRestrict -i option to root.
Neil Brown [Fri, 10 Aug 2007 23:52:29 +0000 (09:52 +1000)]
Restrict -i option to root.

As it is still under development, don't expose it - just in case.

Signed-off-by: Neil Brown <neilb@suse.de>
17 years agomount.nfs: Enable mount.nfs to do text-based mount support
Chuck Lever [Fri, 10 Aug 2007 22:20:01 +0000 (18:20 -0400)]
mount.nfs: Enable mount.nfs to do text-based mount support

A new command line option, "-i", is added to mount.nfs to force the use of
the string interface for testing purposes.  "-s", "-t", and "-r" are
already taken or have legacy meaning so I picked "-i".

At some later point, when everyone is comfortable with the string mount
option parsing implementation, we will add a switch based on kernel
version, and remove the "-i" command line option.  For now, I am more
comfortable enabling it by hand instead.

Since this is a temporary arrangement, I'm leaving the option undocumented
in the mount.nfs man page.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agomount.nfs: Add new files for supporting string-ified mount options
Chuck Lever [Fri, 10 Aug 2007 22:19:55 +0000 (18:19 -0400)]
mount.nfs: Add new files for supporting string-ified mount options

Introduce support files which contain code that builds string mount
options and passes them to the kernel.  This is a pre-requisite for
actually enabling /sbin/mount.nfs to do text-based mounts.

This is only partially complete at the moment, but is presented so that
folks can start banging on the kernel mount option string parsing code.
There are clearly still parts that are not implemented quite yet, such
as bg and retry support, but it should be enough to get going.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agomount.nfs: Replace a "return 0; " that should be an "exit(0); "
Chuck Lever [Fri, 10 Aug 2007 22:19:50 +0000 (18:19 -0400)]
mount.nfs: Replace a "return 0; " that should be an "exit(0); "

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agomount.nfs: Treat another UDP/TCP pair of strings like the rest
Chuck Lever [Fri, 10 Aug 2007 22:19:45 +0000 (18:19 -0400)]
mount.nfs: Treat another UDP/TCP pair of strings like the rest

See the error messages at the end of utils/mount/network.c:get_socket()

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agoumount.nfs: Update umount.nfs(8)
Chuck Lever [Thu, 9 Aug 2007 21:37:01 +0000 (17:37 -0400)]
umount.nfs: Update umount.nfs(8)

Account for recent changes to the umount.nfs command.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agomount.nfs: Update the mount.nfs(8) man page
Chuck Lever [Thu, 9 Aug 2007 21:36:56 +0000 (17:36 -0400)]
mount.nfs: Update the mount.nfs(8) man page

Account for recent changes to the mount.nfs command.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agonfs-utils: specify a create mode with open(...O_CREAT) call in xflock
Jeff Layton [Tue, 7 Aug 2007 12:01:08 +0000 (08:01 -0400)]
nfs-utils: specify a create mode with open(...O_CREAT) call in xflock

The xflock function can create a file via open() with O_CREAT, but does
not specify the create mode when it does so. I think 0644 should be
appropriate given the current usage of this function.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agoRemove ARCH-specific compile flags for ALPHA.
Neil Brown [Thu, 9 Aug 2007 01:23:24 +0000 (11:23 +1000)]
Remove ARCH-specific compile flags for ALPHA.

 -mno-fp-regs -ffixed-8

are used for compiling the kernel on alphas, and it seems they
were copied into nfs-utils long ago, even though they have no
relevance now.
As we now use floating point (just a little bit in nfsstat), remove
these pointless flags.

17 years agonfsstat: include -Z/--sleep in the manpage
david m. richter [Tue, 7 Aug 2007 23:53:48 +0000 (19:53 -0400)]
nfsstat: include -Z/--sleep in the manpage

Add a little blurb about -Z/--sleep to the nfsstat manpage.

Signed-off-by: David M. Richter <richterd@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
17 years agonfsstat: rename --diff-stat to --sleep
david m. richter [Tue, 7 Aug 2007 23:53:11 +0000 (19:53 -0400)]
nfsstat: rename --diff-stat to --sleep

As per Bruce Fields' suggestion, rename the clunky -D/--diff-stat
to the more-intuitive -Z/--sleep.

Signed-off-by: David M. Richter <richterd@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>