summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2015-04-18 16:08:06 +0000
committertrasz <trasz@FreeBSD.org>2015-04-18 16:08:06 +0000
commit7ba042082b083de7e31762c9a6b4ab4975bb2a2f (patch)
tree81ef82396e83699122d91168cd0e1600584e4367
parentf5cd924224bb3a40d1410f9ca7aa6b158f7a4646 (diff)
downloadFreeBSD-src-7ba042082b083de7e31762c9a6b4ab4975bb2a2f.zip
FreeBSD-src-7ba042082b083de7e31762c9a6b4ab4975bb2a2f.tar.gz
Remove some oldnfs remnants.
Differential Revision: https://reviews.freebsd.org/D2287 Reviewed by: rmacklem@ Sponsored by: The FreeBSD Foundation
-rw-r--r--ObsoleteFiles.inc3
-rw-r--r--etc/defaults/rc.conf3
-rwxr-xr-xetc/rc.d/mountd6
-rwxr-xr-xetc/rc.d/nfsd51
-rw-r--r--sbin/mount/mount.81
-rw-r--r--sbin/mount/mount.c2
-rw-r--r--sbin/mount_nfs/Makefile3
-rw-r--r--sbin/mount_nfs/mount_nfs.86
-rw-r--r--share/man/man5/rc.conf.58
-rw-r--r--sys/nfsclient/nfs.h3
-rw-r--r--usr.bin/nfsstat/nfsstat.c7
-rw-r--r--usr.sbin/nfsd/nfsd.87
12 files changed, 26 insertions, 74 deletions
diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc
index 12b3625..12497e7 100644
--- a/ObsoleteFiles.inc
+++ b/ObsoleteFiles.inc
@@ -38,6 +38,9 @@
# xargs -n1 | sort | uniq -d;
# done
+# 20150418
+OLD_FILES+=sbin/mount_oldnfs
+OLD_FILES+=usr/share/man/man8/mount_oldnfs.8.gz
# 20150416: ALTQ moved to net/altq
OLD_FILES+=usr/include/altq/altq_rmclass_debug.h
OLD_FILES+=usr/include/altq/altq.h
diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf
index 3499465..2f5cbca 100644
--- a/etc/defaults/rc.conf
+++ b/etc/defaults/rc.conf
@@ -88,7 +88,7 @@ fsck_y_enable="NO" # Set to YES to do fsck -y if the initial preen fails.
fsck_y_flags="" # Additional flags for fsck -y
background_fsck="YES" # Attempt to run fsck in the background where possible.
background_fsck_delay="60" # Time to wait (seconds) before starting the fsck.
-netfs_types="nfs:NFS oldnfs:OLDNFS smbfs:SMB" # Net filesystems.
+netfs_types="nfs:NFS smbfs:SMB" # Net filesystems.
extra_netfs_types="NO" # List of network extra filesystem types for delayed
# mount at startup (or NO).
@@ -324,7 +324,6 @@ autounmountd_flags="" # Flags to autounmountd(8) (if autofs enabled).
nfs_client_enable="NO" # This host is an NFS client (or NO).
nfs_access_cache="60" # Client cache timeout in seconds
nfs_server_enable="NO" # This host is an NFS server (or NO).
-oldnfs_server_enable="NO" # Run the old NFS server (YES/NO).
nfs_server_flags="-u -t" # Flags to nfsd (if enabled).
mountd_enable="NO" # Run mountd (or NO).
mountd_flags="-r" # Flags to mountd (if NFS server enabled).
diff --git a/etc/rc.d/mountd b/etc/rc.d/mountd
index f3ebfdb..a7ad6c2 100755
--- a/etc/rc.d/mountd
+++ b/etc/rc.d/mountd
@@ -33,12 +33,6 @@ mountd_precmd()
fi
fi
- # If oldnfs_server_enable is yes, force use of the old NFS server
- #
- if checkyesno oldnfs_server_enable; then
- rc_flags="-o ${rc_flags}"
- fi
-
if checkyesno zfs_enable; then
rc_flags="${rc_flags} /etc/exports /etc/zfs/exports"
fi
diff --git a/etc/rc.d/nfsd b/etc/rc.d/nfsd
index e067ad1..8c67308 100755
--- a/etc/rc.d/nfsd
+++ b/etc/rc.d/nfsd
@@ -19,40 +19,25 @@ sig_stop="USR1"
nfsd_precmd()
{
- if checkyesno oldnfs_server_enable; then
- rc_flags="-o ${nfs_server_flags}"
-
- # Load the module now, so that the vfs.nfsrv sysctl
- # oids are available.
- load_kld nfsserver
-
- if checkyesno nfs_reserved_port_only; then
- echo 'NFS on reserved port only=YES'
- sysctl vfs.nfsrv.nfs_privport=1 > /dev/null
- else
- sysctl vfs.nfsrv.nfs_privport=0 > /dev/null
- fi
+ rc_flags="${nfs_server_flags}"
+
+ # Load the modules now, so that the vfs.nfsd sysctl
+ # oids are available.
+ load_kld nfsd
+
+ if checkyesno nfs_reserved_port_only; then
+ echo 'NFS on reserved port only=YES'
+ sysctl vfs.nfsd.nfs_privport=1 > /dev/null
+ else
+ sysctl vfs.nfsd.nfs_privport=0 > /dev/null
+ fi
+
+ if checkyesno nfsv4_server_enable; then
+ sysctl vfs.nfsd.server_max_nfsvers=4 > /dev/null
+ force_depend nfsuserd || err 1 "Cannot run nfsuserd"
else
- rc_flags="${nfs_server_flags}"
-
- # Load the modules now, so that the vfs.nfsd sysctl
- # oids are available.
- load_kld nfsd
-
- if checkyesno nfs_reserved_port_only; then
- echo 'NFS on reserved port only=YES'
- sysctl vfs.nfsd.nfs_privport=1 > /dev/null
- else
- sysctl vfs.nfsd.nfs_privport=0 > /dev/null
- fi
-
- if checkyesno nfsv4_server_enable; then
- sysctl vfs.nfsd.server_max_nfsvers=4 > /dev/null
- force_depend nfsuserd || err 1 "Cannot run nfsuserd"
- else
- echo 'NFSv4 is disabled'
- sysctl vfs.nfsd.server_max_nfsvers=3 > /dev/null
- fi
+ echo 'NFSv4 is disabled'
+ sysctl vfs.nfsd.server_max_nfsvers=3 > /dev/null
fi
force_depend rpcbind || return 1
diff --git a/sbin/mount/mount.8 b/sbin/mount/mount.8
index 55a45e7..2b1ac52 100644
--- a/sbin/mount/mount.8
+++ b/sbin/mount/mount.8
@@ -457,7 +457,6 @@ However, for the following file system types:
.Cm msdosfs ,
.Cm nfs ,
.Cm nullfs ,
-.Cm oldnfs ,
.Cm smbfs ,
.Cm udf ,
and
diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c
index 5ea45df..6427fc8 100644
--- a/sbin/mount/mount.c
+++ b/sbin/mount/mount.c
@@ -144,7 +144,7 @@ use_mountprog(const char *vfstype)
unsigned int i;
const char *fs[] = {
"cd9660", "mfs", "msdosfs", "nfs",
- "nullfs", "oldnfs", "smbfs", "udf", "unionfs",
+ "nullfs", "smbfs", "udf", "unionfs",
NULL
};
diff --git a/sbin/mount_nfs/Makefile b/sbin/mount_nfs/Makefile
index eceed2b..75f7817 100644
--- a/sbin/mount_nfs/Makefile
+++ b/sbin/mount_nfs/Makefile
@@ -5,14 +5,11 @@
PROG= mount_nfs
SRCS= mount_nfs.c getmntopts.c mounttab.c
MAN= mount_nfs.8
-MLINKS= mount_nfs.8 mount_oldnfs.8
MOUNT= ${.CURDIR}/../mount
UMNTALL= ${.CURDIR}/../../usr.sbin/rpc.umntall
CFLAGS+= -DNFS -I${MOUNT} -I${UMNTALL}
-LINKS= ${BINDIR}/mount_nfs ${BINDIR}/mount_oldnfs
-
.PATH: ${MOUNT} ${UMNTALL}
.include <bsd.prog.mk>
diff --git a/sbin/mount_nfs/mount_nfs.8 b/sbin/mount_nfs/mount_nfs.8
index f3d28b3..3a9cff5 100644
--- a/sbin/mount_nfs/mount_nfs.8
+++ b/sbin/mount_nfs/mount_nfs.8
@@ -63,12 +63,6 @@ It implements the mount protocol as described in RFC 1094, Appendix A and
.%T "NFS: Network File System Version 3 Protocol Specification" ,
Appendix I.
.Pp
-If the file system type is specified as ``oldnfs'', which implies this
-command is run as ``mount_oldnfs'', then it forces use of the old NFS
-client, which does not support the
-.Cm nfsv4
-option.
-.Pp
By default,
.Nm
keeps retrying until the mount succeeds.
diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5
index 2eccd7e..c263111 100644
--- a/share/man/man5/rc.conf.5
+++ b/share/man/man5/rc.conf.5
@@ -2294,14 +2294,6 @@ is set to
these are the flags to pass to the
.Xr nfscbd 8
daemon.
-.It Va oldnfs_server_enable
-.Pq Vt bool
-If
-.Va oldnfs_server_enable
-is set to
-.Dq Li YES ,
-force the NFS server daemons to run the old NFS server code
-that does not support NFSv4.
.It Va mountd_enable
.Pq Vt bool
If set to
diff --git a/sys/nfsclient/nfs.h b/sys/nfsclient/nfs.h
index 22a291a..a085da1 100644
--- a/sys/nfsclient/nfs.h
+++ b/sys/nfsclient/nfs.h
@@ -114,10 +114,7 @@
#ifdef _KERNEL
#ifdef MALLOC_DECLARE
-MALLOC_DECLARE(M_NFSREQ);
MALLOC_DECLARE(M_NFSDIROFF);
-MALLOC_DECLARE(M_NFSBIGFH);
-MALLOC_DECLARE(M_NFSHASH);
MALLOC_DECLARE(M_NFSDIRECTIO);
#endif
diff --git a/usr.bin/nfsstat/nfsstat.c b/usr.bin/nfsstat/nfsstat.c
index a5537f7..cea4519 100644
--- a/usr.bin/nfsstat/nfsstat.c
+++ b/usr.bin/nfsstat/nfsstat.c
@@ -245,13 +245,6 @@ readstats(struct nfsstats **stp, struct nfsrvstats **srvstp, int zero)
} else {
if (zero)
bzero(&zerostat, sizeof(zerostat));
- buflen = sizeof(struct nfsstats);
- if (*stp != NULL && sysctlbyname("vfs.oldnfs.nfsstats", *stp,
- &buflen, zero ? &zerostat : NULL, zero ? buflen : 0) < 0) {
- if (errno != ENOENT)
- err(1, "sysctl: vfs.oldnfs.nfsstats");
- *stp = NULL;
- }
buflen = sizeof(struct nfsrvstats);
if (*srvstp != NULL && sysctlbyname("vfs.nfsrv.nfsrvstats",
*srvstp, &buflen, zero ? &zerostat : NULL,
diff --git a/usr.sbin/nfsd/nfsd.8 b/usr.sbin/nfsd/nfsd.8
index 157fc52..9f2c6d4 100644
--- a/usr.sbin/nfsd/nfsd.8
+++ b/usr.sbin/nfsd/nfsd.8
@@ -112,11 +112,10 @@ Serve
.Tn UDP NFS
clients.
.It Fl e
-The new NFS server that includes NFSv4 support is now the default, so this
-option is now a no-op and should be considered deprecated.
+Enable NFSv4 support.
+It is enabled by default; this option should be considered deprecated.
.It Fl o
-Forces the use of the old NFS server that does not include NFSv4 support
-in it.
+Disable NFSv4 support.
.El
.Pp
For example,
OpenPOWER on IntegriCloud