>From ecaa8f13ccb7989f875cf97c6def3e25e374c3fb Mon Sep 17 00:00:00 2001
From: Jeff Becker <Jeffrey.C.Becker@nasa.gov>
Date: Thu, 30 Jun 2011 10:50:05 -0700
Subject: [PATCH 1/5] NFSRDMA cleanup: only checkout and build xprtrdma modules
 Signed-off-by: Jeff Becker <Jeffrey.C.Becker@nasa.gov>

---
 ofed_scripts/Makefile                  |    7 ------
 ofed_scripts/checkout_files            |   10 +++-----
 ofed_scripts/configure                 |   36 --------------------------------
 ofed_scripts/makefile                  |   28 +-----------------------
 ofed_scripts/nfs_header_checkout_files |   22 -------------------
 ofed_scripts/ofed_checkout.sh          |   10 --------
 6 files changed, 6 insertions(+), 107 deletions(-)
 delete mode 100644 ofed_scripts/nfs_header_checkout_files

diff --git a/ofed_scripts/Makefile b/ofed_scripts/Makefile
index 0baecd6..3bbe66a 100644
--- a/ofed_scripts/Makefile
+++ b/ofed_scripts/Makefile
@@ -14,11 +14,4 @@ obj-$(CONFIG_CHELSIO_T3)        += drivers/net/cxgb3/
 obj-$(CONFIG_MLX4_CORE)         += drivers/net/mlx4/
 obj-$(CONFIG_RDS)               += net/rds/
 obj-$(CONFIG_MEMTRACK)          += drivers/infiniband/debug/
-obj-$(CONFIG_SUNRPC_XPRT_RDMA)  += net/sunrpc/
-obj-$(CONFIG_SUNRPC_XPRT_RDMA)  += net/sunrpc/auth_gss/
 obj-$(CONFIG_SUNRPC_XPRT_RDMA)  += net/sunrpc/xprtrdma/
-obj-$(CONFIG_SUNRPC_XPRT_RDMA)  += fs/nfs/
-obj-$(CONFIG_SUNRPC_XPRT_RDMA)  += fs/lockd/
-obj-$(CONFIG_SUNRPC_XPRT_RDMA)  += fs/exportfs/
-obj-$(CONFIG_SUNRPC_XPRT_RDMA)  += fs/nfs_common/
-obj-$(CONFIG_SUNRPC_XPRT_RDMA)  += fs/nfsd/
diff --git a/ofed_scripts/checkout_files b/ofed_scripts/checkout_files
index 2896430..370e0a7 100644
--- a/ofed_scripts/checkout_files
+++ b/ofed_scripts/checkout_files
@@ -8,12 +8,10 @@ drivers/scsi/iscsi_tcp.c
 drivers/scsi/iscsi_tcp.h
 drivers/scsi/libiscsi.c
 drivers/scsi/scsi_transport_iscsi.c
-fs/exportfs/
-fs/lockd/
-fs/nfs/
-fs/nfs_common/
-fs/nfsd/
 include/linux/mlx4/
+include/linux/sunrpc/rpc_rdma.h
+include/linux/sunrpc/svc_rdma.h
+include/linux/sunrpc/xprtrdma.h
 include/rdma/
 include/scsi/iscsi_if.h
 include/scsi/iscsi_proto.h
@@ -27,5 +25,5 @@ lib/klist.c
 net/rds/
 include/linux/rds.h
 include/linux/socket.h
-net/sunrpc/
+net/sunrpc/xprtrdma
 ofed_scripts/
diff --git a/ofed_scripts/configure b/ofed_scripts/configure
index b2407ac..51cdbaa 100755
--- a/ofed_scripts/configure
+++ b/ofed_scripts/configure
@@ -522,47 +522,11 @@ main()
                             CONFIG_INFINIBAND_NES_DEBUG=
                         ;;
                         --with-nfsrdma-mod)
-                            CONFIG_SUNRPC="m"
-                            CONFIG_SUNRPC_GSS="m"
-                            CONFIG_RPCSEC_GSS_KRB5="m"
-                            CONFIG_RPCSEC_GSS_SPKM3="m"
                             CONFIG_SUNRPC_XPRT_RDMA="m"
-                            CONFIG_NFS_FS="m"
-                            CONFIG_NFS_V3="y"
-                            CONFIG_NFS_V3_ACL="y"
-			    CONFIG_NFS_V4="y"
-                            CONFIG_NFS_ACL_SUPPORT="m"
-                            CONFIG_NFS_DIRECTIO="y"
-			    CONFIG_EXPORTFS="m"
-                            CONFIG_LOCKD="m"
-                            CONFIG_LOCKD_V4="y"
-                            CONFIG_NFSD="m"
-                            CONFIG_NFSD_V2_ACL="y"
-                            CONFIG_NFSD_V3="y"
-                            CONFIG_NFSD_V3_ACL="y"
-                            CONFIG_NFSD_V4="y"
                             CONFIG_NFSD_RDMA="y"
                         ;;
                         --without-nfsrdma-mod)
-                            CONFIG_SUNRPC=
-                            CONFIG_SUNRPC_GSS=
-                            CONFIG_RPCSEC_GSS_KRB5=
-                            CONFIG_RPCSEC_GSS_SPKM3=
                             CONFIG_SUNRPC_XPRT_RDMA=
-                            CONFIG_NFS_FS=
-                            CONFIG_NFS_V3=
-			    CONFIG_NFS_V4=
-                            CONFIG_NFS_V3_ACL=
-                            CONFIG_NFS_ACL_SUPPORT=
-                            CONFIG_NFS_DIRECTIO=
-			    CONFIG_EXPORTFS=
-                            CONFIG_LOCKD=
-                            CONFIG_LOCKD_V4=
-                            CONFIG_NFSD=
-                            CONFIG_NFSD_V2_ACL=
-                            CONFIG_NFSD_V3=
-                            CONFIG_NFSD_V3_ACL=
-                            CONFIG_NFSD_V4=
                             CONFIG_NFSD_RDMA=
                         ;;
                         --with-modprobe|--without-modprobe)
diff --git a/ofed_scripts/makefile b/ofed_scripts/makefile
index d505d75..a9eb4de 100644
--- a/ofed_scripts/makefile
+++ b/ofed_scripts/makefile
@@ -23,12 +23,6 @@ else
         export KERNEL_MEMTRACK_CFLAGS =
 endif
 
-ifeq ($(CONFIG_NFS_FS),m)
-	export KERNEL_NFS_FS_CFLAGS = -I$(CWD)/include-nfs
-else
-	export KERNEL_NFS_FS_CFLAGS = 
-endif
-
 export OPEN_ISCSI_MODULES = iscsi_tcp.ko libiscsi.ko scsi_transport_iscsi.ko
 
 configure.mk.kernel:
@@ -125,24 +119,6 @@ kernel:
 		CONFIG_MLX4_DEBUG=$(CONFIG_MLX4_DEBUG) \
 		CONFIG_INFINIBAND_AMSO1100=$(CONFIG_INFINIBAND_AMSO1100) \
 		CONFIG_SUNRPC_XPRT_RDMA=$(CONFIG_SUNRPC_XPRT_RDMA) \
-		CONFIG_SUNRPC=$(CONFIG_SUNRPC) \
-		CONFIG_SUNRPC_GSS=$(CONFIG_SUNRPC_GSS) \
-		CONFIG_RPCSEC_GSS_KRB5=$(CONFIG_RPCSEC_GSS_KRB5) \
-		CONFIG_RPCSEC_GSS_SPKM3=$(CONFIG_RPCSEC_GSS_SPKM3) \
-		CONFIG_NFS_FS=$(CONFIG_NFS_FS) \
-		CONFIG_NFS_V3=$(CONFIG_NFS_V3) \
-		CONFIG_NFS_V3_ACL=$(CONFIG_NFS_V3_ACL) \
-		CONFIG_NFS_V4=$(CONFIG_NFS_V4) \
-		CONFIG_NFS_ACL_SUPPORT=$(CONFIG_NFS_ACL_SUPPORT) \
-		CONFIG_NFS_DIRECTIO=$(CONFIG_NFS_DIRECTIO) \
-		CONFIG_EXPORTFS=$(CONFIG_EXPORTFS)\
-		CONFIG_LOCKD=$(CONFIG_LOCKD) \
-		CONFIG_LOCKD_V4=$(CONFIG_LOCKD_V4) \
-		CONFIG_NFSD=$(CONFIG_NFSD) \
-		CONFIG_NFSD_V2_ACL=$(CONFIG_NFSD_V2_ACL) \
-		CONFIG_NFSD_V3=$(CONFIG_NFSD_V3) \
-		CONFIG_NFSD_V3_ACL=$(CONFIG_NFSD_V3_ACL) \
-		CONFIG_NFSD_V4=$(CONFIG_NFSD_V4) \
 		CONFIG_NFSD_RDMA=$(CONFIG_NFSD_RDMA) \
 		LINUXINCLUDE=' \
 		-D__OFED_BUILD__ \
@@ -233,8 +209,8 @@ install_kernel_iscsi: install_modules
 install_kernel_nfsrdma: install_modules
 	# backup all the modules
 	# Copy new nfs rdma kernel modules to $(DESTDIR)/$(MODULES_DIR)/kernel
-	NFSRDMA_PATHS="fs/nfs fs/nfsd fs/lockd fs/exportfs fs/nfs_common net/sunrpc net/sunrpc/xprtrdma net/sunrpc/auth_gss"; \
-	NFSRDMA_MODS="net/sunrpc/auth_gss/auth_rpcgss.ko net/sunrpc/auth_gss/rpcsec_gss_krb5.ko net/sunrpc/auth_gss/rpcsec_gss_spkm3.ko fs/exportfs/exportfs.ko fs/lockd/lockd.ko fs/nfs_common/nfs_acl.ko fs/nfsd/nfsd.ko fs/nfs/nfs.ko net/sunrpc/sunrpc.ko net/sunrpc/xprtrdma/svcrdma.ko net/sunrpc/xprtrdma/xprtrdma.ko"; \
+	NFSRDMA_PATHS="net/sunrpc/xprtrdma"; \
+	NFSRDMA_MODS="net/sunrpc/xprtrdma/svcrdma.ko net/sunrpc/xprtrdma/xprtrdma.ko"; \
 	if [ -d $(CWD)/lib/modules/$(KVERSION)/net/sunrpc/xprtrdma ]; then \
 		for each_path in $$NFSRDMA_PATHS; do \
 			mkdir -p $(DESTDIR)/$(MODULES_DIR)/kernel/$$each_path; \
diff --git a/ofed_scripts/nfs_header_checkout_files b/ofed_scripts/nfs_header_checkout_files
deleted file mode 100644
index 29dd7ff..0000000
--- a/ofed_scripts/nfs_header_checkout_files
+++ /dev/null
@@ -1,22 +0,0 @@
-include/linux/exportfs.h
-include/linux/lockd/
-include/linux/nfs.h
-include/linux/nfs2.h
-include/linux/nfs3.h
-include/linux/nfs4.h
-include/linux/nfs4_acl.h
-include/linux/nfs4_mount.h
-include/linux/nfs_fs.h
-include/linux/nfs_fs_i.h
-include/linux/nfs_fs_sb.h
-include/linux/nfs_idmap.h
-include/linux/nfs_iostat.h
-include/linux/nfs_mount.h
-include/linux/nfs_page.h
-include/linux/nfs_xdr.h
-include/linux/nfsacl.h
-include/linux/nfsd/
-include/linux/nfsd_idmap.h
-include/linux/pipe_fs_i.h
-include/linux/splice.h
-include/linux/sunrpc/
diff --git a/ofed_scripts/ofed_checkout.sh b/ofed_scripts/ofed_checkout.sh
index 7766f98..fa91d08 100755
--- a/ofed_scripts/ofed_checkout.sh
+++ b/ofed_scripts/ofed_checkout.sh
@@ -29,16 +29,6 @@ xex()
 # branch defaults to ofed_kernel
 branch=${1:-ofed_kernel}
 
-#checkout nfs headerfiles and put them in their new location
-if [ ! -e ofed_scripts/nfs_header_checkout_files ]; then
-	ex git checkout ${branch} ofed_scripts/nfs_header_checkout_files
-fi
-
-xex xargs -rt git ls-tree -r --name-only ${branch} <ofed_scripts/nfs_header_checkout_files |
-	xex xargs -rt git checkout ${branch}
-
-ex mv include include-nfs
-
 # make sure we have the list of all the other files and dirs
 if [ ! -e ofed_scripts/checkout_files ]; then
 	ex git checkout ${branch} ofed_scripts/checkout_files
-- 
1.7.3.4

