From owner-svn-src-head@FreeBSD.ORG Wed Apr 27 17:51:52 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52E871065670; Wed, 27 Apr 2011 17:51:52 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 41EDA8FC0A; Wed, 27 Apr 2011 17:51:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3RHpqlf081925; Wed, 27 Apr 2011 17:51:52 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3RHpp6H081910; Wed, 27 Apr 2011 17:51:51 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104271751.p3RHpp6H081910@svn.freebsd.org> From: Rick Macklem Date: Wed, 27 Apr 2011 17:51:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221124 - in head: . sbin/mount sbin/mount_nfs sys/amd64/conf sys/fs/nfsclient sys/i386/conf sys/ia64/conf sys/nfsclient sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Apr 2011 17:51:52 -0000 Author: rmacklem Date: Wed Apr 27 17:51:51 2011 New Revision: 221124 URL: http://svn.freebsd.org/changeset/base/221124 Log: 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@. Modified: head/UPDATING head/sbin/mount/mount.c head/sbin/mount_nfs/Makefile head/sbin/mount_nfs/mount_nfs.c head/sys/amd64/conf/GENERIC head/sys/fs/nfsclient/nfs_clvfsops.c head/sys/i386/conf/GENERIC head/sys/ia64/conf/GENERIC head/sys/nfsclient/nfs_vfsops.c head/sys/pc98/conf/GENERIC head/sys/powerpc/conf/GENERIC head/sys/powerpc/conf/GENERIC64 head/sys/sparc64/conf/GENERIC head/sys/sun4v/conf/GENERIC Modified: head/UPDATING ============================================================================== --- head/UPDATING Wed Apr 27 17:36:37 2011 (r221123) +++ head/UPDATING Wed Apr 27 17:51:51 2011 (r221124) @@ -22,6 +22,24 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. 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 Modified: head/sbin/mount/mount.c ============================================================================== --- head/sbin/mount/mount.c Wed Apr 27 17:36:37 2011 (r221123) +++ head/sbin/mount/mount.c Wed Apr 27 17:51:51 2011 (r221124) @@ -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 }; Modified: head/sbin/mount_nfs/Makefile ============================================================================== --- head/sbin/mount_nfs/Makefile Wed Apr 27 17:36:37 2011 (r221123) +++ head/sbin/mount_nfs/Makefile Wed Apr 27 17:51:51 2011 (r221124) @@ -12,7 +12,7 @@ UMNTALL= ${.CURDIR}/../../usr.sbin/rpc.u 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} Modified: head/sbin/mount_nfs/mount_nfs.c ============================================================================== --- head/sbin/mount_nfs/mount_nfs.c Wed Apr 27 17:36:37 2011 (r221123) +++ head/sbin/mount_nfs/mount_nfs.c Wed Apr 27 17:51:51 2011 (r221124) @@ -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 || Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Wed Apr 27 17:36:37 2011 (r221123) +++ head/sys/amd64/conf/GENERIC Wed Apr 27 17:51:51 2011 (r221124) @@ -34,8 +34,8 @@ options UFS_ACL # Support for access 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 Modified: head/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvfsops.c Wed Apr 27 17:36:37 2011 (r221123) +++ head/sys/fs/nfsclient/nfs_clvfsops.c Wed Apr 27 17:51:51 2011 (r221124) @@ -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); Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Wed Apr 27 17:36:37 2011 (r221123) +++ head/sys/i386/conf/GENERIC Wed Apr 27 17:51:51 2011 (r221124) @@ -36,8 +36,8 @@ options UFS_ACL # Support for access 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 Modified: head/sys/ia64/conf/GENERIC ============================================================================== --- head/sys/ia64/conf/GENERIC Wed Apr 27 17:36:37 2011 (r221123) +++ head/sys/ia64/conf/GENERIC Wed Apr 27 17:51:51 2011 (r221124) @@ -43,9 +43,9 @@ options KTRACE # ktrace(1) syscall tra 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 Modified: head/sys/nfsclient/nfs_vfsops.c ============================================================================== --- head/sys/nfsclient/nfs_vfsops.c Wed Apr 27 17:36:37 2011 (r221123) +++ head/sys/nfsclient/nfs_vfsops.c Wed Apr 27 17:51:51 2011 (r221124) @@ -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); Modified: head/sys/pc98/conf/GENERIC ============================================================================== --- head/sys/pc98/conf/GENERIC Wed Apr 27 17:36:37 2011 (r221123) +++ head/sys/pc98/conf/GENERIC Wed Apr 27 17:51:51 2011 (r221124) @@ -36,8 +36,8 @@ options UFS_ACL # Support for access 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 Modified: head/sys/powerpc/conf/GENERIC ============================================================================== --- head/sys/powerpc/conf/GENERIC Wed Apr 27 17:36:37 2011 (r221123) +++ head/sys/powerpc/conf/GENERIC Wed Apr 27 17:51:51 2011 (r221124) @@ -40,8 +40,8 @@ options UFS_ACL #Support for access c 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 Modified: head/sys/powerpc/conf/GENERIC64 ============================================================================== --- head/sys/powerpc/conf/GENERIC64 Wed Apr 27 17:36:37 2011 (r221123) +++ head/sys/powerpc/conf/GENERIC64 Wed Apr 27 17:51:51 2011 (r221124) @@ -40,8 +40,8 @@ options UFS_ACL #Support for access c 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 Modified: head/sys/sparc64/conf/GENERIC ============================================================================== --- head/sys/sparc64/conf/GENERIC Wed Apr 27 17:36:37 2011 (r221123) +++ head/sys/sparc64/conf/GENERIC Wed Apr 27 17:51:51 2011 (r221124) @@ -37,8 +37,8 @@ options UFS_ACL # Support for access 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 Modified: head/sys/sun4v/conf/GENERIC ============================================================================== --- head/sys/sun4v/conf/GENERIC Wed Apr 27 17:36:37 2011 (r221123) +++ head/sys/sun4v/conf/GENERIC Wed Apr 27 17:51:51 2011 (r221124) @@ -40,8 +40,8 @@ options UFS_ACL # Support for access 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