summaryrefslogtreecommitdiffstats
path: root/utils/mount
Commit message (Collapse)AuthorAgeFilesLines
* umount: use correct return value for is_vers4.NeilBrown2012-08-061-3/+3
| | | | | | | | | | | | | | is_vers4 in mount_libmount.c is based on nfs_umount_is_vers4 in nfsumount.c, except the return values are reversed. The result of this is: - a MOUNT_UMNT call is not sent when an NFSv3 or NFSv2 filesystem is unmounted - a MOUNT_UMNT call *is* sent when and 'nfs4' filesystem is unmounted (but not when an 'nfs -o vers=4 filesystem is unmounted, as that is checked elsewhere). Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Steve Dickson <steved@redhat.com>
* umount.nfs: ignore non-nfs filesystemsKarel Zak2012-08-011-2/+9
| | | | | | | | | | | | | | | | | | | | # umount.nfs /boot; echo $? umount.nfs: /boot: device is busy 32 expected and fixed behavior: # umount.nfs /boot; echo $? # umount.nfs: /boot: is not an NFS filesystem 1 Note that the function mnt_context_set_fstype_pattern() has never been used for mtab/fstab evaluation. It's usable only for "umount -a" and for "mount -t" operations. Reported-by: NeilBrown <neilb@suse.de> Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount.nfs: restore correct error status when umount failsNeilBrown2012-07-161-5/+4
| | | | | | | | | | | | | | | | | If nfs-utils is built without --enable-libmount-mount, then an unmount that failed due to the filesystem being busy will exit with '16' - EX_FILEIO. Autofs apparently relies on this. When built with --enable-libmount-mount, the same case will exit with '32' - EX_FAIL. Normally this is reserved for internal errors. This patch restores the use of EX_FILEIO for errors from umount. Reviewed-by: Karel Zak <kzak@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount.nfs: try the next address after mount fails with ETIMEDOUTJeff Layton2012-06-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a NFS mount attempt fails with an ETIMEDOUT error, the mount.nfs code doesn't currently attempt the next address in the list. For a NFSv4 mount the initial mount() call almost always ends up going over NFS_DEF_FG_TIMEOUT_MINUTES and the mount is never retried. For a v3 mount, it ends up continually retrying against the same IPv6 address, and never tries the IPv4 address. Eventually it gives up once it hits the NFS_DEF_FG_TIMEOUT_MINUTES timeout. It's possible that a server is just unreachable via IPv6 (due to a routing misconfiguration for instance), or is dropping IPv6 frames on the floor. In that situation, it might still be reachable via IPv4 and trying the next address could have allowed the mount to succeed. Fix this by treating ETIMEDOUT in a similar fashion to ECONNREFUSED. Have the client try the next address in the list before giving up and returning an error. Our QA folks noticed this after a routing problem in one of our test labs. I was able to reproduce it by having the server drop incoming IPv6 frames from the client's address. With this patch, the mount eventually succeeds over IPv4 instead of returning an error. Cc: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Makefile.am: Corrected a misspelling of overriddenSteve Dickson2012-05-171-1/+1
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* Manpage: Add a warning to the nfs manpage regarding using NFS over UDP onOlaf Kirch2012-05-091-0/+81
| | | | | | | | | | | | | | | high-speed links * Using NFS over UDP on high-speed links such as Gigabit can cause silent data corruption. * The man page text was written by Olaf Kirch and committed to (but not upstream): https://build.opensuse.org/package/view_file?file=warn-nfs-udp.patch&package=nfs-utils&project=openSUSE%3AFactory&rev=8e3e60c70e8270cd4afa036e13f6b2bb Signed-off-by: Harshula Jayasuriya <harshula@redhat.com> Acked-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Olaf Kirch <okir@suse.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mounts.nfs: v2 and v3 background mounts should retry when server is down.Steve Dickson2012-05-011-2/+4
| | | | | | | | | The point of background mounts is to have the mount retried if the mount fails. This patch allows the v2/v3 background mount to proceed in the case when the server is down by not making EOPNOTSUPP a permanent error. Signed-off-by: Steve Dickson <steved@redhat.com>
* Kill SPKM3: Remove also the dependent lipkey mechanismSimo Sorce2012-03-122-11/+2
| | | | | Signed-off-by: Simo Sorce <simo@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Kill SPKM3: Remove spkm3 support from nfs.mountSimo Sorce2012-03-123-14/+2
| | | | | Signed-off-by: Simo Sorce <simo@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* autoconf: only link binaries that need it to libtirpcJeff Layton2012-01-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is essentially the same as the previous version, but has been respun to fix up some merge conflicts with some of Chuck's recent changes. When we first added tirpc support, we took a "big hammer" approach, and had it add libtirpc to $LIBS. That had the effect of making it so that that library was linked into every binary. That's unnecessary, and wasteful with memory. Don't let AC_CHECK_LIB add -ltirpc to $LIBS. Instead, have the autoconf tests set $(LIBTIRPC) in the makefiles, and have the programs that need it explicitly include that library. In the event that we're not using libtirpc, then set $LIBTIRPC to a blank string. This necessitates a change to the bindresvport_sa check too. Since that library is no longer included in $LIBS, we need to convert that check to use AC_CHECK_LIB instead of AC_CHECK_FUNCS. This patch also fixes a subtle bug. If the library was usable, but the includes were not, the test would set $enable_tirpc to "no", but HAVE_LIBTIRPC would still be true. That configuration would likely fail to build. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount.nfs: don't overwrite mount options from /etc/nfsmount.confKarel Zak2012-01-051-0/+15
| | | | | | | | | | | | | | The libmount (as well as mount(8)) ignores mount options from command line if running in restricted mode (suid, non-root-user) and all options are read from fstab only. It means that all options are replaced with stuff from fstab, including mount options from nfsmount.conf. This is bug. We have to apply fstab and then nfsmount.conf. Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount.nfs: Background mounts failing on time out errors.Steve Dickson2011-12-051-0/+2
| | | | | | | | | Mounting with the "-o v3,bg,proto=udp" options will fail, instead of retrying, when the server is down. The reason being nfs_rewrite_pmap_mount_options() does not interrupt RPC timeouts correctly. Signed-off-by: Steve Dickson <steved@redhat.com>
* mount.nfs: Mount should really return from errno testYang Bai2011-10-181-2/+4
| | | | | | | | | We should only try next address family if we meet ECONNREFUSED or EHOSTUNREACH for v4 or ECONNREFUSED or EOPNOTSUPP or EHOSTUNREACH for v3v2. Before, only a break in swich can not make the program out of for loop. Signed-off-by: Yang Bai <hamo.by@gmail.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs.man: Fix macro useLuk Claes2011-10-031-3/+3
| | | | | | | | | | | | | The groff macros for filling (word-wrapping) and tabulation control are lower-case, but are written in upper-case here and so have been ignored. Change the .NF and .FI lines to lower-case. Change the .TA lines to lower-case and fix the tab stops to work both on a terminal and in Postscript output. Signed-off-by: Luk Claes <luk@debian.org> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfsumount: Squelch compiler warningChuck Lever2011-09-201-1/+2
| | | | | | | | | | | nfsumount.c: In function nfs_umount_is_vers4: nfsumount.c:164: warning: conversion to int from size_t may alter its value nfsumount.c:173: warning: conversion to ?size_t? from int may change the sign of the result Introduced by commit 3564ebbf. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount.nfs: Preserve any explicit port=2049 optionBen Hutchings2011-09-141-2/+2
| | | | | | | | If NFS port (2049) is supplied explicitly, don't ignore this setting by requesting it to portmapper again. Signed-off-by: Luk Claes <luk@debian.org> Signed-off-by: Steve Dickson <steved@redhat.com>
* Update nfs(5) manpage - timeo for NFS/TCPMax Matveev2011-08-301-6/+10
| | | | | | | | | NFS/TCP does linear backoff then retransmiting - the manpage was mistakenly asserting the "no backoff" theory. Signed-off-by: Max Matveev <makc@redhat.com> Signed-off-by: Jim Rees <rees@umich.edu> Signed-off-by: Steve Dickson <steved@redhat.com>
* pdate addres for Free Software FoundationNeilBrown2011-08-2916-32/+32
| | | | | | | | | | | | License texts contain multiple address for FSF, some wrong. So update them and replace COPYING file with http://www.gnu.org/licenses/gpl-2.0.txt which has a few changes to preamble and commentary. Also remove extra COPYING file from utils/statd/ Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Steve Dickson <steved@redhat.com>
* umount.nfs: fix nfs4 checkIan Kent2011-08-293-44/+84
| | | | | | | | | | | | | | | | From: Ian Kent <ikent@redhat.com> nfs_umount_is_vers4() doesn't take acount of the escaping of characters seen in /proc/mounts and /etc/mtab as the functions in fstab.c do. This leads to an inability to umount a mount containing any of these escaped characters (like spaces). This patch changes nfs_umount_is_vers4() to use functions in fstab.c and adds a function to fstab.c to read /proc/mounts specifically, as it was used for the check in nfs_umount_is_vers4() previously. Signed-off-by: Ian Kent <ikent@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs.man: Fix macro use for fstab examplesLuk Claes2011-08-291-19/+18
| | | | | | | | | | | | | | | | The groff macros for filling (word-wrapping) and tabulation control are lower-case, but are written in upper-case here and so have been ignored. Change the .NF and .FI lines to lower-case. Change the .TA lines to lower-case and fix the tab stops to work both on a terminal and in Postscript output. Delete the .SP line where .sp would be redundant. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Luk Claes <luk@debian.org> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs.man: man complains when line starts with quoteLuk Claes2011-08-291-2/+2
| | | | | | | | Fix "macro `local_lock=flock'.' not defined" by avoiding to put a quote at the beginning of the line. Signed-off-by: Luk Claes <luk@debian.org> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount.nfs: submarvellous messages from mount.nfsMax Matveev2011-08-161-0/+2
| | | | | | | | | | | | | | | | Consider a setup where mountd on the server is controlled via tcp_wrappers (usual RHEL setup) and will not process calls from a particular client because of something in /etc/hosts.deny. When such client attempts to do v3 mount, the error message printed by mount.nfs is misleading. This patch changes that error message from: mount.nfs: Argument list too long to mount.nfs: access denied by server while mounting server:/export Signed-off-by: Steve Dickson <steved@redhat.com>
* mount: fix for libmount from util-linux >= 2.20Karel Zak2011-08-031-3/+12
| | | | | | | | The function mnt_fs_set_fs_options() has been removed from the final version of the libmount API. Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount.nfs: Do not segfault because of kernel versionLuk Claes2011-07-121-7/+9
| | | | | | | | | | | | | | | | | mount.nfs segfaults if kernel version number does not contain at least 3 components delimited with a dot. Avoid this by matching up to three unsigned integers inialised to zero, separated by dots. A version that does not start with an integer is probably a future version where the versioning evolved to another scheme. Return UINT_MAX which is guaranteed to be higher than existing versions. This would also make it possible to easily identify versions that do not start with an integer. Signed-off-by: Luk Claes <luk@debian.org> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount.nfs: Fix for the bug in v1.2.4 that breaks mount.nfsPrem Karat2011-06-301-10/+1
| | | | | | | commit 30ebf047 failed to include these changes that breaks mount.nfs. mount.nfs will continue to work fine with these changes Signed-off-by: Steve Dickson <steved@redhat.com>
* Do not compile unnecessary files when the libmount code is enableNeilBrown2011-06-291-4/+4
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* mount.nfs: Don't hard code source and destinationPrem Karat2011-06-291-4/+9
| | | | | | | | | | | | | | | | Currently souce and destination parameters should be passed as first and second paramter while using mount.nfs. This patch allows them to be passed anywhere while mounting. Current functionality is mount.nfs source destn -o <options> This patch will allow to do this mount.nfs -o <options> source destn or mount.nfs -o <options> source -o <options> destn Signed-off-by: Prem Karat <prem.karat@linux.vnet.ibm.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount: improve signal management when locking mtabNeilBrown2011-06-291-5/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As mount.nfs can run setuid it must be careful about how the user can interact with in. In particular it needs to ensure it does not respond badly to any signals that the user might be able to generate. This is particularly an issue while updating /etc/mtab (when that is not linked to /proc/mounts). If the user can generate a signal which kills mount.nfs while /etc/mtab is locked, then it will leave the file locked, and could possibly corrupt mtab (particularly if 'ulimit 1' was previously issued). Currently lock_mtab does set some handlers for signals, but not enough. It arranges for every signal up to (but not including) SIGCHLD to cause mount.nfs to unlock mdadm promptly exit ... even if the default behaviour would be to ignore the signal. SIGALRM is handled specially, and signals after SIGCHLD are left with their default behaviour. This includes for example SIGXFSZ which can be generated by the user running "ulimit 1". So: change this so that some signals are left unchanged, SIGALRM is handled as required, and all signals that the user can generate are explicitly ignored. The remainder still cause mount.nfs to print a message, unlock mtab, and exit. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount: add --enable-libmount-mountKarel Zak2011-04-062-2/+424
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows to link mount.nfs with libmount from util-linux >= v2.19. The new libmount based code is enabled by CONFIG_LIBMOUNT and is stored in mount_libmount.c. The old code is not affected by this change. The libmount does not have officially stable API yet, so the --enable-libmount-mount is marked as experimental in the configure help output. The ./configure option is the same as we use in util-linux to enable support for libmount in mount(8). The addr= (and some other options necessary for remount/umount) are stored to /etc/mtab or to /dev/.mount/utab. The utab file is *private* libmount file. It's possible that some mount options (for example user=) will be moved to kernel, so the utab will not be necessary. About libmount: * supports systems without and with regular /etc/mtab * does not store VFS and FS mount options in userspace * manages user= option and evaluate permissions * parses VFS mount options and generate MS_* flags * parses /etc/{fstab,mtab}, /proc/mounts or /proc/self/mountinfo * long-term goal is to use the same code in all mount.<type> helpers Note, use LIBMOUNT_DEBUG=0xffff mount.nfs foo:/path /path to debug the library. On systems with util-linux v2.19 the findmnt(8) command uses libmount to list all/selected mount points: $ findmnt /path $ findmnt --mtab /path the --mtab appends userspace mount options (e.g. user=) to the output. CC: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount: move generic functions to utils.c and network.cKarel Zak2011-04-067-200/+286
| | | | | | | | | Move generic code that could be shared between standard mount.nfs and libmount version to utils.c and network.c. CC: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount.nfs: Don't leak socket in nfs_ca_sockname()Chuck Lever2011-04-061-15/+13
| | | | | | | | | | Ensure the test socket is always closed before nfs_ca_sockname() returns. Otherwise it's orphaned. BugLink: https://bugzilla.linux-nfs.org/show_bug.cgi?id=197 Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount: Remove MOUNT_CONFIG warningsSteve Dickson2011-03-052-4/+4
| | | | | | | The following changes are needed to remove compile warnings when MOUNT_CONFIG is not defined Signed-off-by: Steve Dickson <steved@redhat.com>
* mount: Recognize zero as a valid value for the port= optionChuck Lever2011-03-031-2/+2
| | | | | | | | | | While zero is not a valid IP port number, zero does represent a valid value for "port=". It means "query rpcbind to discover the actual non-zero port number to use". So the parsing functions that handle "port=" should not flag zero as an invalid value. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Removed a couple warnings from utils/mount/stropts.cSteve Dickson2010-11-221-2/+2
| | | | | | | stropts.c:740:6: warning: 'ret' may be used uninitialized in this function stropts.c:653:6: warning: 'ret' may be used uninitialized in this function Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs(5): Document remount behaviorChuck Lever2010-11-011-16/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It appears that, for a long while, NFS "remount" mounts have completely wiped the existing mount options in /etc/mtab for a given mount point. This is a problem for umount.nfs, since it reads its options out of /etc/mtab to find out how to do the unmount. The mount(8) command provides the NFS mount subcommand with the mount options to perform the remount. There are four cases to consider: 1. Both the device and mount directory are specified on the command line, and the target mount point is in /etc/fstab 2. Only one of the device and mount directory is specified on the command line, and the target mount point is in /etc/fstab 3. Both the device and mount directory are specified on the command line, and the target mount point is not in /etc/fstab 4. Only one of the device and mount directory is specified on the command line, and the target mount point is not in /etc/fstab Currently only case 4 works correctly. In that case, mount(8) provides the correct set of mount options to the mount.nfs subcommand and it can update /etc/mtab correctly. Cases 1 and 3 replace all mount options in /etc/mtab with the options provided on the command line during a remount. Case 2 replaces the mount options in /etc/mtab with a mix of options from /etc/fstab and /etc/mtab. Cases 1 and 3 are historical behavior. Basically this is a formal interface to allow administrators to replace the mount options in /etc/mtab completely, instead of merging in new ones. The present patch documents that behavior in nfs(5), and provides best practice for remounting NFS mount points. There are near-term plans to address case 2 by fixing mount(8) (provided by utils-linux-ng in most distributions). This is a partial fix for: https://bugzilla.linux-nfs.org/show_bug.cgi?id=188 Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs(5): Grammar and style fixesChuck Lever2010-11-011-8/+7
| | | | | | | | Clean up grammar and style issues introduced by recent updates. Also, I'm not certain inappropriate options are always ignored. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount.nfs: mnt_freq and mnt_pass are always zeroChuck Lever2010-11-011-15/+19
| | | | | | | | | | | Clean up. No need to pass constant zeros to add_mtab() from its only call site. Ensure that initialization of a struct mntent is consistent in both places that it is done. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount.nfs: Fix memory leak in nfs_sys_mount()Chuck Lever2010-11-011-3/+5
| | | | | | | | This appears to have been left behind by last year's adjustments to how the extra_opts string is constructed. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount: Fix compiler warning in nfs_parse_retry_option()Chuck Lever2010-11-011-2/+5
| | | | | | | | | | | | stropts.c: In function nfs_parse_retry_option: stropts.c:131: warning: conversion to unsigned int from long int may alter its value Make it more clear what the second argument is for, and flag the switch fallthrough case. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: Remove all uses of AI_ADDRCONFIGChuck Lever2010-11-012-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was reported that, if only "lo" is up, mount.nfs 127.0.0.1:/export /mount fails with "Name or service not known". "man 3 getaddrinfo" says this: If hints.ai_flags includes the AI_ADDRCONFIG flag, then IPv4 addresses are returned in the list pointed to by res only if the local system has at least one IPv4 address configured, and IPv6 addresses are only returned if the local system has at least one IPv6 address configured. The man page oversimplifies here. A review of glibc shows that getaddrinfo(3) explicitly ignores loopback addresses when deciding whether an IPv4 or IPv6 address is configured. This behavior around loopback is a problem not just for mount.nfs, but also for RPC daemons that have to start up before a system's networking is fully configured and started. Given the history of other problems with AI_ADDRCONFIG and the unpredictable behavior it introduces, let's just remove it everywhere in nfs-utils. This fix addresses: https://bugzilla.linux-nfs.org/show_bug.cgi?id=191 Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* behavior as file systems that use the monolithic /sbin/mount command.Chuck Lever2010-10-142-2/+6
| | | | | | | | | | | | | | | | | See the MS_NOMTAB macro in utils-linux-ng/mount/mount.c. Note that mount(8) has MS_USERS and MS_USER in the "nomtab" category as well, but mount.nfs needs to record those values so that unmounting a user-mounted NFS file system can work. While we're here, fix some white space damage in fix_opts_string(). This is a partial fix for: https://bugzilla.linux-nfs.org/show_bug.cgi?id=188 Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* umount.nfs: Distinguish between nfs4 and nfs mountsChuck Lever2010-10-141-7/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Neil Brown reports that umount.nfs is still confused by "-t nfs -o vers=4" mounts. /etc/mtab can be confused. /proc/mounts is authoritative on the fstype of a mount. Have umount.nfs consult it to determine which mechanism to use for unmounting. The code to read /proc/mounts was lifted from the nfsstat command. The code introduced by this patch may look like belt-n-suspenders, but we have two use cases to consider: 1. Old kernels don't support the "vers=4" mount option, so umount.nfs must look for the "nfs4" fstype 2. Upcoming kernels may eliminate support the "nfs4" fstype, so umount.nfs must look for the "vers=4" mount option Thus this logic checks for "nfs4" first then looks for the NFS version setting. Note that we could handle unmounting entirely in the kernel, but that won't help older kernels that have this issue. See: https://bugzilla.linux-nfs.org/show_bug.cgi?id=189 Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount.nfs: mountproto does not support RDMAChuck Lever2010-10-141-1/+5
| | | | | | | | | | | Clean up. Our client does not support the MNT protocol on RDMA. nfs_mount_protocol() isn't invoked for RDMA mounts (they are shunted off before nfs_options2pmap() is invoked). But in case it ever is, it should return the expected response. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount.nfs: Eliminate compiler warnings in utils/mount/network.cChuck Lever2010-10-141-16/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up. network.c: In function get_socket: network.c:431: warning: dereferencing type-punned pointer might break strict-aliasing rules network.c: In function probe_bothports: network.c:759: warning: dereferencing type-punned pointer might break strict-aliasing rules network.c:762: warning: dereferencing type-punned pointer might break strict-aliasing rules network.c: In function nfs_probe_statd: network.c:775: warning: dereferencing type-punned pointer might break strict-aliasing rules network.c: In function nfs_call_umount: network.c:904: warning: dereferencing type-punned pointer might break strict-aliasing rules network.c: In function nfs_ca_sockname: network.c:1106: warning: dereferencing type-punned pointer might break strict-aliasing rules network.c:1112: warning: dereferencing type-punned pointer might break strict-aliasing rules Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount.nfs: Eliminate compiler warning in utils/mount/parse_opt.cChuck Lever2010-10-141-1/+1
| | | | | | | | | | | | parse_opt.c: In function po_rightmost: parse_opt.c:517: warning: conversion to int from unsigned int may change the sign of the result "i" contains the function's result value, so it should be defined as the same type as the function's return type. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount.nfs: Eliminate compiler warning in utils/mount/nfsumount.cChuck Lever2010-10-141-4/+4
| | | | | | | | | | | | Clean up. nfsumount.c:374: warning: ISO C forbids omitting the middle term of a ?: expression This is also probably harmless, but let's make the code unambiguous. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount.nfs: Eliminate compiler warning in utils/mount/nfsumount.cChuck Lever2010-10-141-0/+1
| | | | | | | | | | | | Clean up. nfsumount.c:265: warning: no previous prototype for nfsumount It's also a good idea if the compiler can ensure that the prototype in nfsmount.h matches the actual function defined in nfsumount.c. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount.nfs: Eliminate compiler warnings in utils/mount/mount.cChuck Lever2010-10-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Clean up. mount.c: In function parse_opt: mount.c:354: warning: conversion to size_t from int may change the sign of the result mount.c:354: warning: conversion to int from size_t may change the sign of the result mount.c:359: warning: conversion to size_t from int may change the sign of the result mount.c:359: warning: conversion to int from size_t may change the sign of the result mount.c: In function parse_opts: mount.c:374: warning: conversion to int from size_t may change the sign of the result mount.c:377: warning: conversion to size_t from int may change the sign of the result Character string lengths are usually size_t anyway. We can easily avoid the implicit type cast here. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount.nfs: Eliminate compiler warning in utils/mount/mount.cChuck Lever2010-10-141-1/+1
| | | | | | | | | | | | | Clean up. mount.c: At top level: mount.c:324: warning: no previous prototype for ?mount_usage? mount_usage() has no callers outside of utils/mount/mount.c and no prototype is provided in a header file. Make it static. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount.nfs: Eliminate compiler warnings in utils/mount/version.hChuck Lever2010-10-141-3/+3
| | | | | | | | | | | | | | | | Clean up. In file included from mount.c:50: version.h: In function linux_version_code: version.h:48: warning: conversion to unsigned int from int may change the sign of the result version.h:48: warning: conversion to unsigned int from int may change the sign of the result version.h:48: warning: conversion to unsigned int from int may change the sign of the result Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>