Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 May 2009 12:35:12 +0000 (UTC)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r192578 - in head: etc/rc.d sbin sbin/idmapd sbin/mount_nfs sys sys/conf sys/fs/nfs sys/modules/nfs4client sys/modules/nfsclient sys/nfs4client sys/nfsclient sys/nlm sys/rpc
Message-ID:  <200905221235.n4MCZCOM006082@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rwatson
Date: Fri May 22 12:35:12 2009
New Revision: 192578
URL: http://svn.freebsd.org/changeset/base/192578

Log:
  Remove the unmaintained University of Michigan NFSv4 client from 8.x
  prior to 8.0-RELEASE.  Rick Macklem's new and more feature-rich NFSv234
  client and server are replacing it.
  
  Discussed with:	rmacklem

Deleted:
  head/etc/rc.d/idmapd
  head/sbin/idmapd/
  head/sys/modules/nfs4client/
  head/sys/nfs4client/
  head/sys/rpc/rpcclnt.c
  head/sys/rpc/rpcclnt.h
Modified:
  head/sbin/Makefile
  head/sbin/mount_nfs/Makefile
  head/sbin/mount_nfs/mount_nfs.8
  head/sbin/mount_nfs/mount_nfs.c
  head/sys/Makefile
  head/sys/conf/files
  head/sys/conf/options
  head/sys/fs/nfs/nfs_commonkrpc.c
  head/sys/fs/nfs/nfsport.h
  head/sys/modules/nfsclient/Makefile
  head/sys/nfsclient/bootp_subr.c
  head/sys/nfsclient/krpc_subr.c
  head/sys/nfsclient/nfs.h
  head/sys/nfsclient/nfs_bio.c
  head/sys/nfsclient/nfs_diskless.c
  head/sys/nfsclient/nfs_krpc.c
  head/sys/nfsclient/nfs_lock.c
  head/sys/nfsclient/nfs_nfsiod.c
  head/sys/nfsclient/nfs_node.c
  head/sys/nfsclient/nfs_socket.c
  head/sys/nfsclient/nfs_subs.c
  head/sys/nfsclient/nfs_vfsops.c
  head/sys/nfsclient/nfs_vnops.c
  head/sys/nfsclient/nfsm_subs.h
  head/sys/nfsclient/nfsmount.h
  head/sys/nfsclient/nfsnode.h
  head/sys/nlm/nlm_advlock.c

Modified: head/sbin/Makefile
==============================================================================
--- head/sbin/Makefile	Fri May 22 09:59:34 2009	(r192577)
+++ head/sbin/Makefile	Fri May 22 12:35:12 2009	(r192578)
@@ -36,7 +36,6 @@ SUBDIR=	adjkerntz \
 	ggate \
 	growfs \
 	gvinum \
-	idmapd \
 	ifconfig \
 	init \
 	${_ipf} \

Modified: head/sbin/mount_nfs/Makefile
==============================================================================
--- head/sbin/mount_nfs/Makefile	Fri May 22 09:59:34 2009	(r192577)
+++ head/sbin/mount_nfs/Makefile	Fri May 22 12:35:12 2009	(r192578)
@@ -5,15 +5,13 @@
 PROG=	mount_nfs
 SRCS=	mount_nfs.c getmntopts.c mounttab.c
 MAN=	mount_nfs.8
-MLINKS=	mount_nfs.8 mount_nfs4.8
+MLINKS=	mount_nfs.8
 
 MOUNT=	${.CURDIR}/../mount
 UMNTALL= ${.CURDIR}/../../usr.sbin/rpc.umntall
 CFLAGS+= -DNFS -I${MOUNT} -I${UMNTALL}
 WARNS?=	3
 
-LINKS=	${BINDIR}/mount_nfs ${BINDIR}/mount_nfs4
-
 .PATH: ${MOUNT} ${UMNTALL}
 
 .include <bsd.prog.mk>

Modified: head/sbin/mount_nfs/mount_nfs.8
==============================================================================
--- head/sbin/mount_nfs/mount_nfs.8	Fri May 22 09:59:34 2009	(r192577)
+++ head/sbin/mount_nfs/mount_nfs.8	Fri May 22 12:35:12 2009	(r192578)
@@ -36,7 +36,7 @@
 .Nd mount NFS file systems
 .Sh SYNOPSIS
 .Nm
-.Op Fl 234bcdiLlNPsTU
+.Op Fl 23bcdiLlNPsTU
 .Op Fl a Ar maxreadahead
 .Op Fl D Ar deadthresh
 .Op Fl g Ar maxgroups
@@ -157,8 +157,6 @@ then version 2).
 Note that NFS version 2 has a file size limit of 2 gigabytes.
 .It Cm nfsv3
 Use the NFS Version 3 protocol.
-.It Cm nfsv4
-Use the NFS Version 4 protocol.
 .It Cm noconn
 For UDP mount points, do not do a
 .Xr connect 2 .
@@ -303,9 +301,6 @@ Same as
 .It Fl 3
 Same as
 .Fl o Cm nfsv3
-.It Fl 4
-Same as
-.Fl o Cm nfsv4
 .It Fl D
 Same as
 .Fl o Cm deadthresh

Modified: head/sbin/mount_nfs/mount_nfs.c
==============================================================================
--- head/sbin/mount_nfs/mount_nfs.c	Fri May 22 09:59:34 2009	(r192577)
+++ head/sbin/mount_nfs/mount_nfs.c	Fri May 22 12:35:12 2009	(r192578)
@@ -1,28 +1,4 @@
 /*
- * copyright (c) 2003
- * the regents of the university of michigan
- * all rights reserved
- * 
- * permission is granted to use, copy, create derivative works and redistribute
- * this software and such derivative works for any purpose, so long as the name
- * of the university of michigan is not used in any advertising or publicity
- * pertaining to the use or distribution of this software without specific,
- * written prior authorization.  if the above copyright notice or any other
- * identification of the university of michigan is included in any copy of any
- * portion of this software, then the disclaimer below must also be included.
- * 
- * this software is provided as is, without representation from the university
- * of michigan as to its fitness for any purpose, and without warranty by the
- * university of michigan of any kind, either express or implied, including
- * without limitation the implied warranties of merchantability and fitness for
- * a particular purpose. the regents of the university of michigan shall not be
- * liable for any damages, including special, indirect, incidental, or
- * consequential damages, with respect to any claim arising out of or in
- * connection with the use of the software, even if it has been or is hereafter
- * advised of the possibility of such damages.
- */
-
-/*
  * Copyright (c) 1992, 1993, 1994
  *	The Regents of the University of California.  All rights reserved.
  *
@@ -140,7 +116,6 @@ enum mountmode {
 	ANY,
 	V2,
 	V3,
-	V4
 } mountmode = ANY;
 
 /* Return codes for nfs_tryproto. */
@@ -155,7 +130,6 @@ int	fallback_mount(struct iovec *iov, in
 int	sec_name_to_num(char *sec);
 char	*sec_num_to_name(int num);
 int	getnfsargs(char *, struct iovec **iov, int *iovlen);
-int	getnfs4args(char *, struct iovec **iov, int *iovlen);
 /* void	set_rpc_maxgrouplist(int); */
 struct netconfig *getnetconf_cached(const char *netid);
 const char	*netidbytype(int af, int sotype);
@@ -164,8 +138,6 @@ int	xdr_dir(XDR *, char *);
 int	xdr_fh(XDR *, struct nfhret *);
 enum tryret nfs_tryproto(struct addrinfo *ai, char *hostp, char *spec,
     char **errstr, struct iovec **iov, int *iovlen);
-enum tryret nfs4_tryproto(struct addrinfo *ai, char *hostp, char *spec,
-    char **errstr);
 enum tryret returncode(enum clnt_stat stat, struct rpc_err *rpcerr);
 extern int getosreldate(void);
 
@@ -190,15 +162,8 @@ main(int argc, char *argv[])
 
 	++fstype;
 
-	if (strcmp(fstype, "nfs4") == 0) {
-		nfsproto = IPPROTO_TCP;
-		portspec = "2049";
-		build_iovec(&iov, &iovlen, "tcp", NULL, 0);
-		mountmode = V4;
-	}
-
 	while ((c = getopt(argc, argv,
-	    "234a:bcdD:g:I:iLlNo:PR:r:sTt:w:x:U")) != -1)
+	    "23a:bcdD:g:I:iLlNo:PR:r:sTt:w:x:U")) != -1)
 		switch (c) {
 		case '2':
 			mountmode = V2;
@@ -206,10 +171,6 @@ main(int argc, char *argv[])
 		case '3':
 			mountmode = V3;
 			break;
-		case '4':
-			mountmode = V4;
-			fstype = "nfs4";
-			break;
 		case 'a':
 			printf("-a deprecated, use -o readhead=<value>\n");
 			build_iovec(&iov, &iovlen, "readahead", optarg, (size_t)-1);
@@ -301,10 +262,6 @@ main(int argc, char *argv[])
 					mountmode = V2;
 				} else if (strcmp(opt, "nfsv3") == 0) {
 					mountmode = V3;
-				} else if (strcmp(opt, "nfsv4") == 0) {
-					pass_flag_to_nmount=0;
-					mountmode = V4;
-					fstype = "nfs4";
 				} else if (strcmp(opt, "port") == 0) {
 					pass_flag_to_nmount=0;
 					asprintf(&portspec, "%d",
@@ -406,13 +363,8 @@ main(int argc, char *argv[])
 		/* The default is to keep retrying forever. */
 		retrycnt = 0;
 
-	if (mountmode == V4) {
-		if (!getnfs4args(spec, &iov, &iovlen))
-			exit(1);
-	} else { 
-		if (!getnfsargs(spec, &iov, &iovlen))
-			exit(1);
-	}
+	if (!getnfsargs(spec, &iov, &iovlen))
+		exit(1);
 
 	/* resolve the mountpoint with realpath(3) */
 	(void)checkpath(name, mntpath);
@@ -814,129 +766,6 @@ getnfsargs(char *spec, struct iovec **io
 	return (1);
 }
 
-
-int
-getnfs4args(char *spec, struct iovec **iov, int *iovlen)
-{
-	struct addrinfo hints, *ai_nfs, *ai;
-	enum tryret ret;
-	int ecode, speclen, remoteerr, sotype;
-	char *hostp, *delimp, *errstr;
-	size_t len;
-	static char nam[MNAMELEN + 1];
-
-	if (nfsproto == IPPROTO_TCP)
-		sotype = SOCK_STREAM;
-	else if (nfsproto == IPPROTO_UDP)
-		sotype = SOCK_DGRAM;
-
-
-	if ((delimp = strrchr(spec, ':')) != NULL) {
-		hostp = spec;
-		spec = delimp + 1;
-	} else if ((delimp = strrchr(spec, '@')) != NULL) {
-		warnx("path@server syntax is deprecated, use server:path");
-		hostp = delimp + 1;
-	} else {
-		warnx("no <host>:<dirpath> nfs-name");
-		return (0);
-	}
-	*delimp = '\0';
-
-	/*
-	 * If there has been a trailing slash at mounttime it seems
-	 * that some mountd implementations fail to remove the mount
-	 * entries from their mountlist while unmounting.
-	 */
-	for (speclen = strlen(spec); 
-		speclen > 1 && spec[speclen - 1] == '/';
-		speclen--)
-		spec[speclen - 1] = '\0';
-	if (strlen(hostp) + strlen(spec) + 1 > MNAMELEN) {
-		warnx("%s:%s: %s", hostp, spec, strerror(ENAMETOOLONG));
-		return (0);
-	}
-	/* Make both '@' and ':' notations equal */
-	if (*hostp != '\0') {
-		len = strlen(hostp);
-		memmove(nam, hostp, len);
-		nam[len] = ':';
-		memmove(nam + len + 1, spec, speclen);
-		nam[len + speclen + 1] = '\0';
-	}
-
-	/*
-	 * Handle an internet host address.
-	 */
-	memset(&hints, 0, sizeof hints);
-	hints.ai_flags = AI_NUMERICHOST;
-	hints.ai_socktype = sotype;
-	if (getaddrinfo(hostp, portspec, &hints, &ai_nfs) != 0) {
-		hints.ai_flags = 0;
-		if ((ecode = getaddrinfo(hostp, portspec, &hints, &ai_nfs))
-		    != 0) {
-			if (portspec == NULL)
-				errx(1, "%s: %s", hostp, gai_strerror(ecode));
-			else
-				errx(1, "%s:%s: %s", hostp, portspec,
-				    gai_strerror(ecode));
-			return (0);
-		}
-	}
-
-	ret = TRYRET_LOCALERR;
-	for (;;) {
-		/*
-		 * Try each entry returned by getaddrinfo(). Note the
-		 * occurence of remote errors by setting `remoteerr'.
-		 */
-		remoteerr = 0;
-		for (ai = ai_nfs; ai != NULL; ai = ai->ai_next) {
-			if ((ai->ai_family == AF_INET6) &&
-			    (opflags & OF_NOINET6))
-				continue;
-			if ((ai->ai_family == AF_INET) && 
-			    (opflags & OF_NOINET4))
-				continue;
-			ret = nfs4_tryproto(ai, hostp, spec, &errstr);
-			if (ret == TRYRET_SUCCESS)
-				break;
-			if (ret != TRYRET_LOCALERR)
-				remoteerr = 1;
-			if ((opflags & ISBGRND) == 0)
-				fprintf(stderr, "%s\n", errstr);
-		}
-		if (ret == TRYRET_SUCCESS)
-			break;
-
-		/* Exit if all errors were local. */
-		if (!remoteerr)
-			exit(1);
-
-		/*
-		 * If retrycnt == 0, we are to keep retrying forever.
-		 * Otherwise decrement it, and exit if it hits zero.
-		 */
-		if (retrycnt != 0 && --retrycnt == 0)
-			exit(1);
-
-		if ((opflags & (BGRND | ISBGRND)) == BGRND) {
-			warnx("Cannot immediately mount %s:%s, backgrounding",
-			    hostp, spec);
-			opflags |= ISBGRND;
-			if (daemon(0, 0) != 0)
-				err(1, "daemon");
-		}
-		sleep(60);
-	}
-	freeaddrinfo(ai_nfs);
-	build_iovec(iov, iovlen, "hostname", nam, (size_t)-1); 
-	/* Add mounted file system to PATH_MOUNTTAB */
-	if (!add_mtab(hostp, spec))
-		warnx("can't update %s for %s:%s", PATH_MOUNTTAB, hostp, spec);
-	return (1);
-}
-
 /*
  * Try to set up the NFS arguments according to the address
  * family, protocol (and possibly port) specified in `ai'.
@@ -1142,82 +971,6 @@ tryagain:
 	return (TRYRET_SUCCESS);
 }
 
-
-/*
- * Try to set up the NFS arguments according to the address
- * family, protocol (and possibly port) specified in `ai'.
- *
- * Returns TRYRET_SUCCESS if successful, or:
- *   TRYRET_TIMEOUT		The server did not respond.
- *   TRYRET_REMOTEERR		The server reported an error.
- *   TRYRET_LOCALERR		Local failure.
- *
- * In all error cases, *errstr will be set to a statically-allocated string
- * describing the error.
- */
-enum tryret
-nfs4_tryproto(struct addrinfo *ai, char *hostp, char *spec, char **errstr)
-{
-	static char errbuf[256];
-	struct sockaddr_storage nfs_ss;
-	struct netbuf nfs_nb;
-	struct netconfig *nconf;
-	const char *netid;
-	int nfsvers, sotype;
-
-	errbuf[0] = '\0';
-	*errstr = errbuf;
-
-	if (nfsproto == IPPROTO_TCP)
-		sotype = SOCK_STREAM;
-	else if (nfsproto == IPPROTO_UDP)
-		sotype = SOCK_DGRAM;
-
-	if ((netid = netidbytype(ai->ai_family, sotype)) == NULL) {
-		snprintf(errbuf, sizeof errbuf,
-		    "af %d sotype %d not supported", ai->ai_family, sotype);
-		return (TRYRET_LOCALERR);
-	}
-	if ((nconf = getnetconf_cached(netid)) == NULL) {
-		snprintf(errbuf, sizeof errbuf, "%s: %s", netid, nc_sperror());
-		return (TRYRET_LOCALERR);
-	}
-
-	nfsvers = 4;
-
-	if (portspec != NULL && atoi(portspec) != 0) {
-		/* `ai' contains the complete nfsd sockaddr. */
-		nfs_nb.buf = ai->ai_addr;
-		nfs_nb.len = nfs_nb.maxlen = ai->ai_addrlen;
-	} else {
-		/* Ask the remote rpcbind. */
-		nfs_nb.buf = &nfs_ss;
-		nfs_nb.len = nfs_nb.maxlen = sizeof nfs_ss;
-
-		if (!rpcb_getaddr(RPCPROG_NFS, nfsvers, nconf, &nfs_nb,
-		    hostp)) {
-			snprintf(errbuf, sizeof errbuf, "[%s] %s:%s: %s",
-			    netid, hostp, spec,
-			    clnt_spcreateerror("RPCPROG_NFS"));
-			return (returncode(rpc_createerr.cf_stat,
-			    &rpc_createerr.cf_error));
-		}
-	}
-
-	/*
-	 * Store the filehandle and server address in nfsargsp, making
-	 * sure to copy any locally allocated structures.
-	 */
-	addrlen = nfs_nb.len;
-	addr = malloc(addrlen);
-
-	if (addr == NULL)
-		err(1, "malloc");
-	bcopy(nfs_nb.buf, addr, addrlen);
-
-	return (TRYRET_SUCCESS);
-}
-
 /*
  * Catagorise a RPC return status and error into an `enum tryret'
  * return code.
@@ -1361,7 +1114,7 @@ void
 usage()
 {
 	(void)fprintf(stderr, "%s\n%s\n%s\n%s\n",
-"usage: mount_nfs [-234bcdiLlNPsTU] [-a maxreadahead] [-D deadthresh]",
+"usage: mount_nfs [-23bcdiLlNPsTU] [-a maxreadahead] [-D deadthresh]",
 "                 [-g maxgroups] [-I readdirsize] [-o options] [-R retrycnt]",
 "                 [-r readsize] [-t timeout] [-w writesize] [-x retrans]",
 "                 rhost:path node");

Modified: head/sys/Makefile
==============================================================================
--- head/sys/Makefile	Fri May 22 09:59:34 2009	(r192577)
+++ head/sys/Makefile	Fri May 22 12:35:12 2009	(r192578)
@@ -11,7 +11,7 @@ SUBDIR=	boot
 CSCOPEDIRS=	boot bsm cam cddl compat conf contrib crypto ddb dev fs gdb \
 		geom gnu isa kern libkern modules net net80211 netatalk \
 		netgraph netinet netinet6 netipsec netipx netnatm netncp \
-		netsmb nfs nfs4client nfsclient nfsserver nlm opencrypto \
+		netsmb nfs nfsclient nfsserver nlm opencrypto \
 		pci rpc security sys ufs vm xdr ${CSCOPE_ARCHDIR}
 .if defined(ALL_ARCH)
 CSCOPE_ARCHDIR ?= amd64 arm i386 ia64 mips pc98 powerpc sparc64 sun4v

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files	Fri May 22 09:59:34 2009	(r192577)
+++ head/sys/conf/files	Fri May 22 12:35:12 2009	(r192578)
@@ -2450,14 +2450,6 @@ netsmb/smb_subr.c		optional netsmb
 netsmb/smb_trantcp.c		optional netsmb
 netsmb/smb_usr.c		optional netsmb
 nfs/nfs_common.c		optional nfsclient | nfsserver
-nfs4client/nfs4_dev.c		optional nfsclient
-nfs4client/nfs4_idmap.c		optional nfsclient
-nfs4client/nfs4_socket.c	optional nfsclient
-nfs4client/nfs4_subs.c		optional nfsclient
-nfs4client/nfs4_vfs_subs.c	optional nfsclient
-nfs4client/nfs4_vfsops.c	optional nfsclient
-nfs4client/nfs4_vn_subs.c	optional nfsclient
-nfs4client/nfs4_vnops.c		optional nfsclient
 nfsclient/bootp_subr.c		optional bootp nfsclient
 nfsclient/krpc_subr.c		optional bootp nfsclient
 nfsclient/nfs_bio.c		optional nfsclient
@@ -2519,7 +2511,6 @@ rpc/rpc_generic.c		optional krpc | nfslo
 rpc/rpc_prot.c			optional krpc | nfslockd | nfsclient | nfsserver
 rpc/rpcb_clnt.c			optional krpc | nfslockd | nfsclient | nfsserver
 rpc/rpcb_prot.c			optional krpc | nfslockd | nfsclient | nfsserver
-rpc/rpcclnt.c			optional nfsclient
 rpc/svc.c			optional krpc | nfslockd | nfsserver
 rpc/svc_auth.c			optional krpc | nfslockd | nfsserver
 rpc/svc_auth_unix.c		optional krpc | nfslockd | nfsserver

Modified: head/sys/conf/options
==============================================================================
--- head/sys/conf/options	Fri May 22 09:59:34 2009	(r192577)
+++ head/sys/conf/options	Fri May 22 12:35:12 2009	(r192578)
@@ -226,7 +226,6 @@ KGSSAPI_DEBUG	opt_kgssapi.h
 # filesystems will be enabled - but look below.
 NFSCLIENT	opt_nfs.h
 NFSSERVER	opt_nfs.h
-NFS4CLIENT	opt_nfs.h
 
 # Use this option to compile both NFS client and server using the
 # legacy RPC implementation instead of the newer KRPC system (which

Modified: head/sys/fs/nfs/nfs_commonkrpc.c
==============================================================================
--- head/sys/fs/nfs/nfs_commonkrpc.c	Fri May 22 09:59:34 2009	(r192577)
+++ head/sys/fs/nfs/nfs_commonkrpc.c	Fri May 22 12:35:12 2009	(r192578)
@@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/vnode.h>
 
 #include <rpc/rpc.h>
-#include <rpc/rpcclnt.h>
 
 #include <kgssapi/krb5/kcrypto.h>
 

Modified: head/sys/fs/nfs/nfsport.h
==============================================================================
--- head/sys/fs/nfs/nfsport.h	Fri May 22 09:59:34 2009	(r192577)
+++ head/sys/fs/nfs/nfsport.h	Fri May 22 12:35:12 2009	(r192578)
@@ -98,7 +98,6 @@
 #include <crypto/des/des.h>
 #include <sys/md5.h>
 #include <rpc/rpc.h>
-#include <rpc/rpcclnt.h>
 #include <rpc/rpcsec_gss.h>
 
 /*

Modified: head/sys/modules/nfsclient/Makefile
==============================================================================
--- head/sys/modules/nfsclient/Makefile	Fri May 22 09:59:34 2009	(r192577)
+++ head/sys/modules/nfsclient/Makefile	Fri May 22 12:35:12 2009	(r192578)
@@ -1,24 +1,14 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../../nfsclient ${.CURDIR}/../../nfs4client \
-	${.CURDIR}/../../nfs ${.CURDIR}/../../rpc
+.PATH: ${.CURDIR}/../../nfsclient ${.CURDIR}/../../nfs ${.CURDIR}/../../rpc
 
 KMOD=	nfsclient
 SRCS=	vnode_if.h \
 	nfs_bio.c nfs_lock.c nfs_node.c nfs_socket.c nfs_subs.c nfs_nfsiod.c \
 	nfs_vfsops.c nfs_vnops.c nfs_common.c nfs_krpc.c \
 	opt_inet.h opt_nfs.h opt_bootp.h opt_nfsroot.h
-SRCS+=	nfs4_dev.c nfs4_idmap.c nfs4_socket.c nfs4_subs.c \
-	nfs4_vfs_subs.c  nfs4_vfsops.c nfs4_vn_subs.c nfs4_vnops.c
 SRCS+=	opt_inet6.h opt_kdtrace.h opt_kgssapi.h opt_route.h
 
-# USE THE RPCCLNT:
-CFLAGS+= -DRPCCLNT_DEBUG
-SRCS+= rpcclnt.c
-
-# USE THE NEW IDMAPPER
-CFLAGS+= -DUSE_NEW_IDMAPPER
-
 .if !defined(KERNBUILDDIR)
 NFS_INET?=	1	# 0/1 - requires INET to be configured in kernel
 NFS_INET6?=	1	# 0/1 - requires INET6 to be configured in kernel

Modified: head/sys/nfsclient/bootp_subr.c
==============================================================================
--- head/sys/nfsclient/bootp_subr.c	Fri May 22 09:59:34 2009	(r192577)
+++ head/sys/nfsclient/bootp_subr.c	Fri May 22 12:35:12 2009	(r192578)
@@ -68,8 +68,6 @@ __FBSDID("$FreeBSD$");
 #include <net/if_dl.h>
 #include <net/vnet.h>
 
-#include <rpc/rpcclnt.h>
-
 #include <nfs/rpcv2.h>
 #include <nfs/nfsproto.h>
 #include <nfsclient/nfs.h>

Modified: head/sys/nfsclient/krpc_subr.c
==============================================================================
--- head/sys/nfsclient/krpc_subr.c	Fri May 22 09:59:34 2009	(r192577)
+++ head/sys/nfsclient/krpc_subr.c	Fri May 22 12:35:12 2009	(r192578)
@@ -57,8 +57,6 @@ __FBSDID("$FreeBSD$");
 #include <net/if.h>
 #include <netinet/in.h>
 
-#include <rpc/rpcclnt.h>
-
 #include <nfs/rpcv2.h>
 #include <nfsclient/krpc.h>
 #include <nfs/xdr_subs.h>

Modified: head/sys/nfsclient/nfs.h
==============================================================================
--- head/sys/nfsclient/nfs.h	Fri May 22 09:59:34 2009	(r192577)
+++ head/sys/nfsclient/nfs.h	Fri May 22 12:35:12 2009	(r192578)
@@ -111,18 +111,6 @@
  */
 #define NFS_NFSSTATS	1		/* struct: struct nfsstats */
 
-/*
- * File context information for nfsv4.	Currently, there is only one
- * lockowner for the whole machine "0."
- */
-struct nfs4_fctx {
-	TAILQ_ENTRY(nfs4_fstate) next;
-	uint32_t	refcnt;
-	struct nfs4_lowner *lop;
-	struct nfsnode *np;
-	char		stateid[NFSX_V4STATEID];
-};
-
 #ifdef _KERNEL
 
 #ifdef MALLOC_DECLARE

Modified: head/sys/nfsclient/nfs_bio.c
==============================================================================
--- head/sys/nfsclient/nfs_bio.c	Fri May 22 09:59:34 2009	(r192577)
+++ head/sys/nfsclient/nfs_bio.c	Fri May 22 12:35:12 2009	(r192578)
@@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/bio.h>
 #include <sys/buf.h>
 #include <sys/kernel.h>
+#include <sys/mbuf.h>
 #include <sys/mount.h>
 #include <sys/proc.h>
 #include <sys/resourcevar.h>
@@ -56,8 +57,6 @@ __FBSDID("$FreeBSD$");
 #include <vm/vm_pager.h>
 #include <vm/vnode_pager.h>
 
-#include <rpc/rpcclnt.h>
-
 #include <nfs/rpcv2.h>
 #include <nfs/nfsproto.h>
 #include <nfsclient/nfs.h>
@@ -65,8 +64,6 @@ __FBSDID("$FreeBSD$");
 #include <nfsclient/nfsnode.h>
 #include <nfsclient/nfs_kdtrace.h>
 
-#include <nfs4client/nfs4.h>
-
 static struct buf *nfs_getcacheblk(struct vnode *vp, daddr_t bn, int size,
 		    struct thread *td);
 static int nfs_directio_write(struct vnode *vp, struct uio *uiop, 
@@ -1612,17 +1609,13 @@ nfs_doio(struct vnode *vp, struct buf *b
 	    case VDIR:
 		nfsstats.readdir_bios++;
 		uiop->uio_offset = ((u_quad_t)bp->b_lblkno) * NFS_DIRBLKSIZ;
-		if ((nmp->nm_flag & NFSMNT_NFSV4) != 0)
-			error = nfs4_readdirrpc(vp, uiop, cr);
-		else {
-			if ((nmp->nm_flag & NFSMNT_RDIRPLUS) != 0) {
-				error = nfs_readdirplusrpc(vp, uiop, cr);
-				if (error == NFSERR_NOTSUPP)
-					nmp->nm_flag &= ~NFSMNT_RDIRPLUS;
-			}
-			if ((nmp->nm_flag & NFSMNT_RDIRPLUS) == 0)
-				error = nfs_readdirrpc(vp, uiop, cr);
+		if ((nmp->nm_flag & NFSMNT_RDIRPLUS) != 0) {
+			error = nfs_readdirplusrpc(vp, uiop, cr);
+			if (error == NFSERR_NOTSUPP)
+				nmp->nm_flag &= ~NFSMNT_RDIRPLUS;
 		}
+		if ((nmp->nm_flag & NFSMNT_RDIRPLUS) == 0)
+			error = nfs_readdirrpc(vp, uiop, cr);
 		/*
 		 * end-of-directory sets B_INVAL but does not generate an
 		 * error.

Modified: head/sys/nfsclient/nfs_diskless.c
==============================================================================
--- head/sys/nfsclient/nfs_diskless.c	Fri May 22 09:59:34 2009	(r192577)
+++ head/sys/nfsclient/nfs_diskless.c	Fri May 22 12:35:12 2009	(r192578)
@@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$");
 #include <net/vnet.h>
 
 #include <netinet/in.h>
-#include <rpc/rpcclnt.h>
 #include <nfs/rpcv2.h>
 #include <nfs/nfsproto.h>
 #include <nfsclient/nfs.h>

Modified: head/sys/nfsclient/nfs_krpc.c
==============================================================================
--- head/sys/nfsclient/nfs_krpc.c	Fri May 22 09:59:34 2009	(r192577)
+++ head/sys/nfsclient/nfs_krpc.c	Fri May 22 12:35:12 2009	(r192578)
@@ -60,7 +60,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/vnode.h>
 
 #include <rpc/rpc.h>
-#include <rpc/rpcclnt.h>
 
 #include <nfs/rpcv2.h>
 #include <nfs/nfsproto.h>
@@ -70,8 +69,6 @@ __FBSDID("$FreeBSD$");
 #include <nfsclient/nfsmount.h>
 #include <nfsclient/nfsnode.h>
 
-#include <nfs4client/nfs4.h>
-
 #ifndef NFS_LEGACYRPC
 
 #ifdef KDTRACE_HOOKS
@@ -445,8 +442,6 @@ nfs_request(struct vnode *vp, struct mbu
 		return (ESTALE);
 	}
 	nmp = VFSTONFS(vp->v_mount);
-	if ((nmp->nm_flag & NFSMNT_NFSV4) != 0)
-		return nfs4_request(vp, mreq, procnum, td, cred, mrp, mdp, dposp);
 	bzero(&nf, sizeof(struct nfs_feedback_arg));
 	nf.nf_mount = nmp;
 	nf.nf_td = td;
@@ -740,8 +735,6 @@ nfs_sigintr(struct nfsmount *nmp, struct
 	struct proc *p;
 	sigset_t tmpset;
 	
-	if ((nmp->nm_flag & NFSMNT_NFSV4) != 0)
-		return nfs4_sigintr(nmp, rep, td);
 	/* Terminate all requests while attempting a forced unmount. */
 	if (nmp->nm_mountp->mnt_kern_flag & MNTK_UNMOUNTF)
 		return (EIO);

Modified: head/sys/nfsclient/nfs_lock.c
==============================================================================
--- head/sys/nfsclient/nfs_lock.c	Fri May 22 09:59:34 2009	(r192577)
+++ head/sys/nfsclient/nfs_lock.c	Fri May 22 12:35:12 2009	(r192578)
@@ -53,8 +53,6 @@ __FBSDID("$FreeBSD$");
 
 #include <net/if.h>
 
-#include <rpc/rpcclnt.h>
-
 #include <nfs/rpcv2.h>
 #include <nfs/nfsproto.h>
 #include <nfsclient/nfs.h>

Modified: head/sys/nfsclient/nfs_nfsiod.c
==============================================================================
--- head/sys/nfsclient/nfs_nfsiod.c	Fri May 22 09:59:34 2009	(r192577)
+++ head/sys/nfsclient/nfs_nfsiod.c	Fri May 22 12:35:12 2009	(r192578)
@@ -63,8 +63,6 @@ __FBSDID("$FreeBSD$");
 #include <netinet/in.h>
 #include <netinet/tcp.h>
 
-#include <rpc/rpcclnt.h>
-
 #include <nfs/xdr_subs.h>
 #include <nfs/rpcv2.h>
 #include <nfs/nfsproto.h>

Modified: head/sys/nfsclient/nfs_node.c
==============================================================================
--- head/sys/nfsclient/nfs_node.c	Fri May 22 09:59:34 2009	(r192577)
+++ head/sys/nfsclient/nfs_node.c	Fri May 22 12:35:12 2009	(r192578)
@@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/fnv_hash.h>
 #include <sys/lock.h>
 #include <sys/malloc.h>
+#include <sys/mbuf.h>
 #include <sys/mount.h>
 #include <sys/namei.h>
 #include <sys/proc.h>
@@ -49,8 +50,6 @@ __FBSDID("$FreeBSD$");
 
 #include <vm/uma.h>
 
-#include <rpc/rpcclnt.h>
-
 #include <nfs/rpcv2.h>
 #include <nfs/nfsproto.h>
 #include <nfsclient/nfs.h>
@@ -133,19 +132,13 @@ nfs_nget(struct mount *mntp, nfsfh_t *fh
 	 */
 	np = uma_zalloc(nfsnode_zone, M_WAITOK | M_ZERO);
 
-	if (nmp->nm_flag & NFSMNT_NFSV4)
-		error = getnewvnode("nfs4", mntp, &nfs4_vnodeops, &nvp);
-	else
-		error = getnewvnode("nfs", mntp, &nfs_vnodeops, &nvp);
+	error = getnewvnode("nfs", mntp, &nfs_vnodeops, &nvp);
 	if (error) {
 		uma_zfree(nfsnode_zone, np);
 		return (error);
 	}
 	vp = nvp;
-	if (nmp->nm_flag & NFSMNT_NFSV4)
-		vp->v_bufobj.bo_ops = &buf_ops_nfs4;
-	else
-		vp->v_bufobj.bo_ops = &buf_ops_nfs;
+	vp->v_bufobj.bo_ops = &buf_ops_nfs;
 	vp->v_data = np;
 	np->n_vnode = vp;
 	/* 

Modified: head/sys/nfsclient/nfs_socket.c
==============================================================================
--- head/sys/nfsclient/nfs_socket.c	Fri May 22 09:59:34 2009	(r192577)
+++ head/sys/nfsclient/nfs_socket.c	Fri May 22 12:35:12 2009	(r192578)
@@ -62,8 +62,6 @@ __FBSDID("$FreeBSD$");
 #include <netinet/in.h>
 #include <netinet/tcp.h>
 
-#include <rpc/rpcclnt.h>
-
 #include <nfs/rpcv2.h>
 #include <nfs/nfsproto.h>
 #include <nfsclient/nfs.h>
@@ -72,8 +70,6 @@ __FBSDID("$FreeBSD$");
 #include <nfsclient/nfsmount.h>
 #include <nfsclient/nfsnode.h>
 
-#include <nfs4client/nfs4.h>
-
 #ifdef NFS_LEGACYRPC
 
 #define	TRUE	1
@@ -1145,8 +1141,6 @@ nfs_request(struct vnode *vp, struct mbu
 		return (ESTALE);
 	}
 	nmp = VFSTONFS(vp->v_mount);
-	if ((nmp->nm_flag & NFSMNT_NFSV4) != 0)
-		return nfs4_request(vp, mrest, procnum, td, cred, mrp, mdp, dposp);
 	rep = malloc(sizeof(struct nfsreq), M_NFSREQ, M_WAITOK);
 	bzero(rep, sizeof(struct nfsreq));
 	rep->r_nmp = nmp;
@@ -1747,8 +1741,6 @@ nfs_sigintr(struct nfsmount *nmp, struct
 	struct proc *p;
 	sigset_t tmpset;
 	
-	if ((nmp->nm_flag & NFSMNT_NFSV4) != 0)
-		return nfs4_sigintr(nmp, rep, td);
 	if (rep) {
 		mtx_lock(&rep->r_mtx);
 		if (rep->r_flags & R_SOFTTERM) {

Modified: head/sys/nfsclient/nfs_subs.c
==============================================================================
--- head/sys/nfsclient/nfs_subs.c	Fri May 22 09:59:34 2009	(r192577)
+++ head/sys/nfsclient/nfs_subs.c	Fri May 22 12:35:12 2009	(r192578)
@@ -65,8 +65,6 @@ __FBSDID("$FreeBSD$");
 #include <vm/vm_extern.h>
 #include <vm/uma.h>
 
-#include <rpc/rpcclnt.h>
-
 #include <nfs/rpcv2.h>
 #include <nfs/nfsproto.h>
 #include <nfsclient/nfs.h>

Modified: head/sys/nfsclient/nfs_vfsops.c
==============================================================================
--- head/sys/nfsclient/nfs_vfsops.c	Fri May 22 09:59:34 2009	(r192577)
+++ head/sys/nfsclient/nfs_vfsops.c	Fri May 22 12:35:12 2009	(r192578)
@@ -66,7 +66,6 @@ __FBSDID("$FreeBSD$");
 #include <net/route.h>
 #include <netinet/in.h>
 
-#include <rpc/rpcclnt.h>
 #include <rpc/rpc.h>
 
 #include <nfs/rpcv2.h>

Modified: head/sys/nfsclient/nfs_vnops.c
==============================================================================
--- head/sys/nfsclient/nfs_vnops.c	Fri May 22 09:59:34 2009	(r192577)
+++ head/sys/nfsclient/nfs_vnops.c	Fri May 22 12:35:12 2009	(r192578)
@@ -70,8 +70,6 @@ __FBSDID("$FreeBSD$");
 
 #include <fs/fifofs/fifo.h>
 
-#include <rpc/rpcclnt.h>
-
 #include <nfs/rpcv2.h>
 #include <nfs/nfsproto.h>
 #include <nfsclient/nfs.h>

Modified: head/sys/nfsclient/nfsm_subs.h
==============================================================================
--- head/sys/nfsclient/nfsm_subs.h	Fri May 22 09:59:34 2009	(r192577)
+++ head/sys/nfsclient/nfsm_subs.h	Fri May 22 12:35:12 2009	(r192578)
@@ -147,17 +147,6 @@ do { \
 	} \
 } while (0)
 
-#define	nfsm_request_mnt(n, t, p, c) \
-do { \
-	error = nfs4_request_mnt((n), mreq, (t), (p), (c), &mrep, &md, &dpos); \
-	if (error != 0) { \
-		if (error & NFSERR_RETERR) \
-			error &= ~NFSERR_RETERR; \
-		else \
-			goto nfsmout; \
-	} \
-} while (0)
-
 /* *********************************** */
 /* Reply interpretation phase macros */
 

Modified: head/sys/nfsclient/nfsmount.h
==============================================================================
--- head/sys/nfsclient/nfsmount.h	Fri May 22 09:59:34 2009	(r192577)
+++ head/sys/nfsclient/nfsmount.h	Fri May 22 12:35:12 2009	(r192578)
@@ -79,7 +79,6 @@ struct	nfsmount {
 	int	nm_numgrps;		/* Max. size of groupslist */
 	u_char	nm_fh[NFSX_V4FH];	/* File handle of root dir */
 	int	nm_fhsize;		/* Size of root file handle */
-	struct	rpcclnt nm_rpcclnt;	/* rpc state */
 #ifdef NFS_LEGACYRPC
 	struct	socket *nm_so;		/* Rpc socket */
 #endif

Modified: head/sys/nfsclient/nfsnode.h
==============================================================================
--- head/sys/nfsclient/nfsnode.h	Fri May 22 09:59:34 2009	(r192577)
+++ head/sys/nfsclient/nfsnode.h	Fri May 22 12:35:12 2009	(r192578)
@@ -135,8 +135,6 @@ struct nfsnode {
 	short			n_fhsize;	/* size in bytes, of fh */
 	short			n_flag;		/* Flag for locking.. */
 	nfsfh_t			n_fh;		/* Small File Handle */
-	struct nfs4_fctx	n_rfc;
-	struct nfs4_fctx	n_wfc;
 	u_char			*n_name;	/* leaf name, for v4 OPEN op */
 	uint32_t		n_namelen;
 	int			n_directio_opens;
@@ -188,9 +186,7 @@ extern struct nfsmount *nfs_iodmount[NFS
 
 extern	struct vop_vector	nfs_fifoops;
 extern	struct vop_vector	nfs_vnodeops;
-extern	struct vop_vector	nfs4_vnodeops;
 extern struct buf_ops buf_ops_nfs;
-extern struct buf_ops buf_ops_nfs4;
 
 extern vop_advlock_t *nfs_advlock_p;
 extern vop_reclaim_t *nfs_reclaim_p;
@@ -206,12 +202,9 @@ int	nfs_reclaim(struct vop_reclaim_args 
 
 /* other stuff */
 int	nfs_removeit(struct sillyrename *);
-int	nfs4_removeit(struct sillyrename *);
 int	nfs_nget(struct mount *, nfsfh_t *, int, struct nfsnode **, int flags);
 nfsuint64 *nfs_getcookie(struct nfsnode *, off_t, int);
-uint64_t *nfs4_getcookie(struct nfsnode *, off_t, int);
 void	nfs_invaldir(struct vnode *);
-void	nfs4_invaldir(struct vnode *);
 int	nfs_upgrade_vnlock(struct vnode *vp);
 void	nfs_downgrade_vnlock(struct vnode *vp, int old_lock);
 void	nfs_printf(const char *fmt, ...);

Modified: head/sys/nlm/nlm_advlock.c
==============================================================================
--- head/sys/nlm/nlm_advlock.c	Fri May 22 09:59:34 2009	(r192577)
+++ head/sys/nlm/nlm_advlock.c	Fri May 22 12:35:12 2009	(r192578)
@@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/lock.h>
 #include <sys/lockf.h>
 #include <sys/malloc.h>
+#include <sys/mbuf.h>
 #include <sys/mount.h>
 #include <sys/mutex.h>
 #include <sys/proc.h>
@@ -44,7 +45,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/vimage.h>
 #include <sys/vnode.h>
 
-#include <rpc/rpcclnt.h>
 #include <nfs/nfsproto.h>
 #include <nfsclient/nfs.h>
 #include <nfsclient/nfsnode.h>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905221235.n4MCZCOM006082>