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@.
This commit is contained in:
Rick Macklem 2011-04-27 17:51:51 +00:00
parent a011c62e8b
commit 4309e17add
14 changed files with 43 additions and 29 deletions

View File

@ -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

View File

@ -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
};

View File

@ -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}

View File

@ -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 ||

View File

@ -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

View File

@ -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);

View File

@ -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

View File

@ -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

View File

@ -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);

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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