aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRick Macklem <rmacklem@FreeBSD.org>2011-04-27 17:51:51 +0000
committerRick Macklem <rmacklem@FreeBSD.org>2011-04-27 17:51:51 +0000
commit4309e17add45d7e8ce0cce845f83c7c9599b8512 (patch)
treeee19f38f0278c8c957f0412e1d8ee665274c8aa4
parenta011c62e8b30c23d4eeae7b7b6503f8239e13d6e (diff)
downloadsrc-4309e17add45d7e8ce0cce845f83c7c9599b8512.tar.gz
src-4309e17add45d7e8ce0cce845f83c7c9599b8512.zip
This patch changes head so that the default NFS client is now the new
NFS client (which I guess is no longer experimental). The fstype "newnfs" is now "nfs" and the regular/old NFS client is now fstype "oldnfs". Although mounts via fstype "nfs" will usually work without userland changes, an updated mount_nfs(8) binary is needed for kernels built with "options NFSCL" but not "options NFSCLIENT". Updated mount_nfs(8) and mount(8) binaries are needed to do mounts for fstype "oldnfs". The GENERIC kernel configs have been changed to use options NFSCL and NFSD (the new client and server) instead of NFSCLIENT and NFSSERVER. For kernels being used on diskless NFS root systems, "options NFSCL" must be in the kernel config. Discussed on freebsd-fs@.
Notes
Notes: svn path=/head/; revision=221124
-rw-r--r--UPDATING18
-rw-r--r--sbin/mount/mount.c4
-rw-r--r--sbin/mount_nfs/Makefile2
-rw-r--r--sbin/mount_nfs/mount_nfs.c12
-rw-r--r--sys/amd64/conf/GENERIC4
-rw-r--r--sys/fs/nfsclient/nfs_clvfsops.c2
-rw-r--r--sys/i386/conf/GENERIC4
-rw-r--r--sys/ia64/conf/GENERIC4
-rw-r--r--sys/nfsclient/nfs_vfsops.c2
-rw-r--r--sys/pc98/conf/GENERIC4
-rw-r--r--sys/powerpc/conf/GENERIC4
-rw-r--r--sys/powerpc/conf/GENERIC644
-rw-r--r--sys/sparc64/conf/GENERIC4
-rw-r--r--sys/sun4v/conf/GENERIC4
14 files changed, 43 insertions, 29 deletions
diff --git a/UPDATING b/UPDATING
index e404c7d164a6..b541a572315f 100644
--- a/UPDATING
+++ b/UPDATING
@@ -22,6 +22,24 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9.x IS SLOW:
machines to maximize performance. (To disable malloc debugging, run
ln -s aj /etc/malloc.conf.)
+20110427:
+ The default NFS client is now the new NFS client, so fstype "newnfs"
+ is now "nfs" and the regular/old NFS client is now fstype "oldnfs".
+ Although mounts via fstype "nfs" will usually work without userland
+ changes, it is recommended that the mount(8) and mount_nfs(8)
+ commands be rebuilt from sources and that a link to mount_nfs called
+ mount_oldnfs be created. The new client is compiled into the
+ kernel with "options NFSCL" and this is needed for diskless root
+ file systems. The GENERIC kernel configs have been changed to use
+ NFSCL and NFSD (the new server) instead of NFSCLIENT and NFSSERVER.
+ To use the regular/old client, you can "mount -t oldnfs ...". For
+ a diskless root file system, you must also include a line like:
+
+ vfs.root.mountfrom="oldnfs:"
+
+ in the boot/loader.conf on the root fs on the NFS server to make
+ a diskless root fs use the old client.
+
20110424:
The GENERIC kernels for all architectures now default to the new
CAM-based ATA stack. It means that all legacy ATA drivers were
diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c
index d0d0faa19f47..acded1c24379 100644
--- a/sbin/mount/mount.c
+++ b/sbin/mount/mount.c
@@ -141,8 +141,8 @@ use_mountprog(const char *vfstype)
*/
unsigned int i;
const char *fs[] = {
- "cd9660", "mfs", "msdosfs", "newnfs", "nfs", "ntfs",
- "nwfs", "nullfs", "portalfs", "smbfs", "udf", "unionfs",
+ "cd9660", "mfs", "msdosfs", "nfs", "ntfs",
+ "nwfs", "nullfs", "oldnfs", "portalfs", "smbfs", "udf", "unionfs",
NULL
};
diff --git a/sbin/mount_nfs/Makefile b/sbin/mount_nfs/Makefile
index 2e255b27271e..3068f0b86fab 100644
--- a/sbin/mount_nfs/Makefile
+++ b/sbin/mount_nfs/Makefile
@@ -12,7 +12,7 @@ UMNTALL= ${.CURDIR}/../../usr.sbin/rpc.umntall
CFLAGS+= -DNFS -I${MOUNT} -I${UMNTALL}
WARNS?= 3
-LINKS= ${BINDIR}/mount_nfs ${BINDIR}/mount_newnfs
+LINKS= ${BINDIR}/mount_nfs ${BINDIR}/mount_oldnfs
.PATH: ${MOUNT} ${UMNTALL}
diff --git a/sbin/mount_nfs/mount_nfs.c b/sbin/mount_nfs/mount_nfs.c
index 4f72b9a3b03e..5386723c242b 100644
--- a/sbin/mount_nfs/mount_nfs.c
+++ b/sbin/mount_nfs/mount_nfs.c
@@ -273,7 +273,7 @@ main(int argc, char *argv[])
} else if (strcmp(opt, "nfsv4") == 0) {
pass_flag_to_nmount=0;
mountmode = V4;
- fstype = "newnfs";
+ fstype = "nfs";
nfsproto = IPPROTO_TCP;
if (portspec == NULL)
portspec = "2049";
@@ -381,14 +381,10 @@ main(int argc, char *argv[])
retrycnt = 0;
/*
- * If the experimental nfs subsystem is loaded into the kernel
- * and the regular one is not, use it. Otherwise, use it if the
- * fstype is set to "newnfs", either via "mount -t newnfs ..."
- * or by specifying an nfsv4 mount.
+ * If the fstye is "oldnfs", run the old NFS client unless the
+ * "nfsv4" option was specified.
*/
- if (modfind("nfscl") >= 0 && modfind("nfs") < 0) {
- fstype = "newnfs";
- } else if (strcmp(fstype, "newnfs") == 0) {
+ if (strcmp(fstype, "nfs") == 0) {
if (modfind("nfscl") < 0) {
/* Not present in kernel, try loading it */
if (kldload("nfscl") < 0 ||
diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC
index f9396e815625..4ece39eaf30a 100644
--- a/sys/amd64/conf/GENERIC
+++ b/sys/amd64/conf/GENERIC
@@ -34,8 +34,8 @@ options UFS_ACL # Support for access control lists
options UFS_DIRHASH # Improve performance on big directories
options UFS_GJOURNAL # Enable gjournal-based UFS journaling
options MD_ROOT # MD is a potential root device
-options NFSCLIENT # Network Filesystem Client
-options NFSSERVER # Network Filesystem Server
+options NFSCL # New Network Filesystem Client
+options NFSD # New Network Filesystem Server
options NFSLOCKD # Network Lock Manager
options NFS_ROOT # NFS usable as /, requires NFSCLIENT
options MSDOSFS # MSDOS Filesystem
diff --git a/sys/fs/nfsclient/nfs_clvfsops.c b/sys/fs/nfsclient/nfs_clvfsops.c
index 3d044e4004ed..476753dcf8fd 100644
--- a/sys/fs/nfsclient/nfs_clvfsops.c
+++ b/sys/fs/nfsclient/nfs_clvfsops.c
@@ -131,7 +131,7 @@ static struct vfsops nfs_vfsops = {
.vfs_unmount = nfs_unmount,
.vfs_sysctl = nfs_sysctl,
};
-VFS_SET(nfs_vfsops, newnfs, VFCF_NETWORK);
+VFS_SET(nfs_vfsops, nfs, VFCF_NETWORK);
/* So that loader and kldload(2) can find us, wherever we are.. */
MODULE_VERSION(newnfs, 1);
diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC
index 1652211c47a7..c0aa76164b50 100644
--- a/sys/i386/conf/GENERIC
+++ b/sys/i386/conf/GENERIC
@@ -36,8 +36,8 @@ options UFS_ACL # Support for access control lists
options UFS_DIRHASH # Improve performance on big directories
options UFS_GJOURNAL # Enable gjournal-based UFS journaling
options MD_ROOT # MD is a potential root device
-options NFSCLIENT # Network Filesystem Client
-options NFSSERVER # Network Filesystem Server
+options NFSCL # New Network Filesystem Client
+options NFSD # New Network Filesystem Server
options NFSLOCKD # Network Lock Manager
options NFS_ROOT # NFS usable as /, requires NFSCLIENT
options MSDOSFS # MSDOS Filesystem
diff --git a/sys/ia64/conf/GENERIC b/sys/ia64/conf/GENERIC
index 9efa94d5d15d..2d8d31626d59 100644
--- a/sys/ia64/conf/GENERIC
+++ b/sys/ia64/conf/GENERIC
@@ -43,9 +43,9 @@ options KTRACE # ktrace(1) syscall trace support
options MAC # TrustedBSD MAC Framework
options MD_ROOT # MD usable as root device
options MSDOSFS # MSDOS Filesystem
-options NFSCLIENT # Network Filesystem Client
+options NFSCL # New Network Filesystem Client
options NFSLOCKD # Network Lock Manager
-options NFSSERVER # Network Filesystem Server
+options NFSD # New Network Filesystem Server
options NFS_ROOT # NFS usable as root device
options P1003_1B_SEMAPHORES # POSIX-style semaphores
options PREEMPTION # Enable kernel thread preemption
diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c
index 5b346a685d3e..cd33b04e2f5f 100644
--- a/sys/nfsclient/nfs_vfsops.c
+++ b/sys/nfsclient/nfs_vfsops.c
@@ -144,7 +144,7 @@ static struct vfsops nfs_vfsops = {
.vfs_unmount = nfs_unmount,
.vfs_sysctl = nfs_sysctl,
};
-VFS_SET(nfs_vfsops, nfs, VFCF_NETWORK);
+VFS_SET(nfs_vfsops, oldnfs, VFCF_NETWORK);
/* So that loader and kldload(2) can find us, wherever we are.. */
MODULE_VERSION(nfs, 1);
diff --git a/sys/pc98/conf/GENERIC b/sys/pc98/conf/GENERIC
index 0eacbccb1bdc..0fac1a957997 100644
--- a/sys/pc98/conf/GENERIC
+++ b/sys/pc98/conf/GENERIC
@@ -36,8 +36,8 @@ options UFS_ACL # Support for access control lists
options UFS_DIRHASH # Improve performance on big directories
options UFS_GJOURNAL # Enable gjournal-based UFS journaling
options MD_ROOT # MD is a potential root device
-options NFSCLIENT # Network Filesystem Client
-options NFSSERVER # Network Filesystem Server
+options NFSCL # New Network Filesystem Client
+options NFSD # New Network Filesystem Server
options NFSLOCKD # Network Lock Manager
options NFS_ROOT # NFS usable as /, requires NFSCLIENT
options MSDOSFS # MSDOS Filesystem
diff --git a/sys/powerpc/conf/GENERIC b/sys/powerpc/conf/GENERIC
index 4a3695c005c1..2459988baeac 100644
--- a/sys/powerpc/conf/GENERIC
+++ b/sys/powerpc/conf/GENERIC
@@ -40,8 +40,8 @@ options UFS_ACL #Support for access control lists
options UFS_DIRHASH #Improve performance on big directories
options UFS_GJOURNAL #Enable gjournal-based UFS journaling
options MD_ROOT #MD is a potential root device
-options NFSCLIENT #Network Filesystem Client
-options NFSSERVER #Network Filesystem Server
+options NFSCL #New Network Filesystem Client
+options NFSD #New Network Filesystem Server
options NFSLOCKD #Network Lock Manager
options NFS_ROOT #NFS usable as root device
options MSDOSFS #MSDOS Filesystem
diff --git a/sys/powerpc/conf/GENERIC64 b/sys/powerpc/conf/GENERIC64
index 0de575824e9b..d7526b3d8000 100644
--- a/sys/powerpc/conf/GENERIC64
+++ b/sys/powerpc/conf/GENERIC64
@@ -40,8 +40,8 @@ options UFS_ACL #Support for access control lists
options UFS_DIRHASH #Improve performance on big directories
options UFS_GJOURNAL #Enable gjournal-based UFS journaling
options MD_ROOT #MD is a potential root device
-options NFSCLIENT #Network Filesystem Client
-options NFSSERVER #Network Filesystem Server
+options NFSCL #New Network Filesystem Client
+options NFSD #New Network Filesystem Server
options NFSLOCKD #Network Lock Manager
options NFS_ROOT #NFS usable as root device
options MSDOSFS #MSDOS Filesystem
diff --git a/sys/sparc64/conf/GENERIC b/sys/sparc64/conf/GENERIC
index d6bd4b6469c8..406dcf698ec8 100644
--- a/sys/sparc64/conf/GENERIC
+++ b/sys/sparc64/conf/GENERIC
@@ -37,8 +37,8 @@ options UFS_ACL # Support for access control lists
options UFS_DIRHASH # Improve performance on big directories
options UFS_GJOURNAL # Enable gjournal-based UFS journaling
options MD_ROOT # MD is a potential root device
-options NFSCLIENT # Network Filesystem Client
-options NFSSERVER # Network Filesystem Server
+options NFSCL # New Network Filesystem Client
+options NFSD # New Network Filesystem Server
options NFSLOCKD # Network Lock Manager
options NFS_ROOT # NFS usable as /, requires NFSCLIENT
#options MSDOSFS # MSDOS Filesystem
diff --git a/sys/sun4v/conf/GENERIC b/sys/sun4v/conf/GENERIC
index 7740473c0667..0efdc5c005c5 100644
--- a/sys/sun4v/conf/GENERIC
+++ b/sys/sun4v/conf/GENERIC
@@ -40,8 +40,8 @@ options UFS_ACL # Support for access control lists
options UFS_DIRHASH # Improve performance on big directories
options UFS_GJOURNAL # Enable gjournal-based UFS journaling
options MD_ROOT # MD is a potential root device
-options NFSCLIENT # Network Filesystem Client
-options NFSSERVER # Network Filesystem Server
+options NFSCL # New Network Filesystem Client
+options NFSD # New Network Filesystem Server
options NFSLOCKD # Network Lock Manager
options NFS_ROOT # NFS usable as /, requires NFSCLIENT
#options MSDOSFS # MSDOS Filesystem