summaryrefslogtreecommitdiffstats
path: root/utils/gssd/gss_util.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2010-10-13 13:55:10 -0400
committerSteve Dickson <steved@redhat.com>2010-10-14 10:26:59 -0400
commitdc08c702a6c7f824f317af561f491635ee898a71 (patch)
treeca340e2c642a5db640d79963b1c821e3ec71e14a /utils/gssd/gss_util.c
parent17962b82afb68ca8e6b0d3f432d36c6c7c4980ea (diff)
downloadnfs-utils-dc08c702a6c7f824f317af561f491635ee898a71.tar.gz
nfs-utils-dc08c702a6c7f824f317af561f491635ee898a71.tar.xz
nfs-utils-dc08c702a6c7f824f317af561f491635ee898a71.zip
umount.nfs: Distinguish between nfs4 and nfs mounts
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>
Diffstat (limited to 'utils/gssd/gss_util.c')
0 files changed, 0 insertions, 0 deletions