[ewg] [RFC] NFS headerfile removal if not selected

Jon Mason jon at opengridcomputing.com
Tue Sep 8 14:29:41 PDT 2009


Lustre has a requirement to use either the Native OS version of NFS or
the OFED version of NFS.  When disabling the OFED NFS to use the Native
NFS, there are headerfile conflicts between what Lustre expects to be
there and what actually is there.  This patch works around this issue by
relocating the NFS specific headerfiles to a unique location and only
references them there if OFED NFS is selected.

This patch resolves bug 1671.

Signed-Off-By: Jon Mason <jon at opengridcomputing.com>
---
 .../backport/2.6.16_sles10_sp2/rnfs_fs.patch       |   72 ++++++++++----------
 kernel_patches/backport/2.6.18-EL5.2/rnfs_fs.patch |   60 ++++++++--------
 kernel_patches/backport/2.6.18-EL5.3/rnfs_fs.patch |   42 ++++++------
 kernel_patches/backport/2.6.18-EL5.4/rnfs_fs.patch |   42 ++++++------
 kernel_patches/backport/2.6.22/rnfs_fs.patch       |   30 ++++----
 kernel_patches/backport/2.6.25/rnfs_fs.patch       |   18 +++---
 .../backport/2.6.27_sles11/rnfs_fs.patch           |   24 +++---
 ofed_scripts/Makefile                              |    1 +
 ofed_scripts/checkout_files                        |   22 ------
 ofed_scripts/makefile                              |    9 ++-
 ofed_scripts/nfs_header_checkout_files             |   22 ++++++
 ofed_scripts/ofed_checkout.sh                      |   10 +++
 12 files changed, 185 insertions(+), 167 deletions(-)
 create mode 100644 ofed_scripts/nfs_header_checkout_files

diff --git a/kernel_patches/backport/2.6.16_sles10_sp2/rnfs_fs.patch b/kernel_patches/backport/2.6.16_sles10_sp2/rnfs_fs.patch
index ca96a3b..d0b5829 100644
--- a/kernel_patches/backport/2.6.16_sles10_sp2/rnfs_fs.patch
+++ b/kernel_patches/backport/2.6.16_sles10_sp2/rnfs_fs.patch
@@ -3165,10 +3165,10 @@ index b660435..05eba22 100644
  			if (error == -ENODATA)
  				error = 0;
  		}
-diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h
+diff --git a/include-nfs/linux/exportfs.h b/include-nfs/linux/exportfs.h
 index 27e772c..ad9a829 100644
---- a/include/linux/exportfs.h
-+++ b/include/linux/exportfs.h
+--- a/include-nfs/linux/exportfs.h
++++ b/include-nfs/linux/exportfs.h
 @@ -89,85 +89,10 @@ struct fid {
  	};
  };
@@ -3255,10 +3255,10 @@ index 27e772c..ad9a829 100644
 -	struct inode *(*get_inode) (struct super_block *sb, u64 ino, u32 gen));
 -
  #endif /* LINUX_EXPORTFS_H */
-diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h
+diff --git a/include-nfs/linux/lockd/lockd.h b/include-nfs/linux/lockd/lockd.h
 index 51855df..2142bf0 100644
---- a/include/linux/lockd/lockd.h
-+++ b/include/linux/lockd/lockd.h
+--- a/include-nfs/linux/lockd/lockd.h
++++ b/include-nfs/linux/lockd/lockd.h
 @@ -285,7 +285,7 @@ int           nlmsvc_unlock_all_by_ip(struct sockaddr *server_addr);
  
  static inline struct inode *nlmsvc_file_inode(struct nlm_file *file)
@@ -3268,10 +3268,10 @@ index 51855df..2142bf0 100644
  }
  
  static inline int __nlm_privileged_request4(const struct sockaddr *sap)
-diff --git a/include/linux/lockd/xdr.h b/include/linux/lockd/xdr.h
+diff --git a/include-nfs/linux/lockd/xdr.h b/include-nfs/linux/lockd/xdr.h
 index d39ed1c..7dc5b6c 100644
---- a/include/linux/lockd/xdr.h
-+++ b/include/linux/lockd/xdr.h
+--- a/include-nfs/linux/lockd/xdr.h
++++ b/include-nfs/linux/lockd/xdr.h
 @@ -25,13 +25,13 @@ struct svc_rqst;
  #define NLM_MAXCOOKIELEN    	32
  #define NLM_MAXSTRLEN		1024
@@ -3292,10 +3292,10 @@ index d39ed1c..7dc5b6c 100644
  
  /* Lock info passed via NLM */
  struct nlm_lock {
-diff --git a/include/linux/lockd/xdr4.h b/include/linux/lockd/xdr4.h
+diff --git a/include-nfs/linux/lockd/xdr4.h b/include-nfs/linux/lockd/xdr4.h
 index 7353821..12bfe09 100644
---- a/include/linux/lockd/xdr4.h
-+++ b/include/linux/lockd/xdr4.h
+--- a/include-nfs/linux/lockd/xdr4.h
++++ b/include-nfs/linux/lockd/xdr4.h
 @@ -15,11 +15,11 @@
  #include <linux/lockd/xdr.h>
  
@@ -3313,10 +3313,10 @@ index 7353821..12bfe09 100644
  
  
  
-diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
+diff --git a/include-nfs/linux/nfs_fs.h b/include-nfs/linux/nfs_fs.h
 index fdffb41..7f78126 100644
---- a/include/linux/nfs_fs.h
-+++ b/include/linux/nfs_fs.h
+--- a/include-nfs/linux/nfs_fs.h
++++ b/include-nfs/linux/nfs_fs.h
 @@ -10,6 +10,7 @@
  #define _LINUX_NFS_FS_H
  
@@ -3388,10 +3388,10 @@ index fdffb41..7f78126 100644
  extern int nfs_mountpoint_expiry_timeout;
  extern void nfs_release_automount_timer(void);
  
-diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
+diff --git a/include-nfs/linux/nfs_xdr.h b/include-nfs/linux/nfs_xdr.h
 index b89c34e..4303536 100644
---- a/include/linux/nfs_xdr.h
-+++ b/include/linux/nfs_xdr.h
+--- a/include-nfs/linux/nfs_xdr.h
++++ b/include-nfs/linux/nfs_xdr.h
 @@ -817,9 +817,9 @@ struct nfs_access_entry;
   */
  struct nfs_rpc_ops {
@@ -3405,10 +3405,10 @@ index b89c34e..4303536 100644
  
  	int	(*getroot) (struct nfs_server *, struct nfs_fh *,
  			    struct nfs_fsinfo *);
-diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h
+diff --git a/include-nfs/linux/nfsd/export.h b/include-nfs/linux/nfsd/export.h
 index bcd0201..fc59b1d 100644
---- a/include/linux/nfsd/export.h
-+++ b/include/linux/nfsd/export.h
+--- a/include-nfs/linux/nfsd/export.h
++++ b/include-nfs/linux/nfsd/export.h
 @@ -11,6 +11,7 @@
  #define NFSD_EXPORT_H
  
@@ -3417,10 +3417,10 @@ index bcd0201..fc59b1d 100644
  #ifdef __KERNEL__
  # include <linux/in.h>
  #endif
-diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h
+diff --git a/include-nfs/linux/nfsd/nfsd.h b/include-nfs/linux/nfsd/nfsd.h
 index 2b49d67..784579c 100644
---- a/include/linux/nfsd/nfsd.h
-+++ b/include/linux/nfsd/nfsd.h
+--- a/include-nfs/linux/nfsd/nfsd.h
++++ b/include-nfs/linux/nfsd/nfsd.h
 @@ -86,7 +86,9 @@ __be32		nfsd_setattr(struct svc_rqst *, struct svc_fh *,
  #ifdef CONFIG_NFSD_V4
  __be32          nfsd4_set_nfs4_acl(struct svc_rqst *, struct svc_fh *,
@@ -3657,10 +3657,10 @@ index 2b49d67..784579c 100644
  
  /* Check for dir entries '.' and '..' */
  #define isdotent(n, l)	(l < 3 && n[0] == '.' && (l == 1 || n[1] == '.'))
-diff --git a/include/linux/nfsd/xdr.h b/include/linux/nfsd/xdr.h
+diff --git a/include-nfs/linux/nfsd/xdr.h b/include-nfs/linux/nfsd/xdr.h
 index a0132ef..9c27592 100644
---- a/include/linux/nfsd/xdr.h
-+++ b/include/linux/nfsd/xdr.h
+--- a/include-nfs/linux/nfsd/xdr.h
++++ b/include-nfs/linux/nfsd/xdr.h
 @@ -166,7 +166,7 @@ int nfssvc_encode_statfsres(struct svc_rqst *, __be32 *, struct nfsd_statfsres *
  int nfssvc_encode_readdirres(struct svc_rqst *, __be32 *, struct nfsd_readdirres *);
  
@@ -3670,10 +3670,10 @@ index a0132ef..9c27592 100644
  
  int nfssvc_release_fhandle(struct svc_rqst *, __be32 *, struct nfsd_fhandle *);
  
-diff --git a/include/linux/nfsd/xdr3.h b/include/linux/nfsd/xdr3.h
+diff --git a/include-nfs/linux/nfsd/xdr3.h b/include-nfs/linux/nfsd/xdr3.h
 index 421eddd..0cf2e9c 100644
---- a/include/linux/nfsd/xdr3.h
-+++ b/include/linux/nfsd/xdr3.h
+--- a/include-nfs/linux/nfsd/xdr3.h
++++ b/include-nfs/linux/nfsd/xdr3.h
 @@ -332,10 +332,10 @@ int nfs3svc_release_fhandle(struct svc_rqst *, __be32 *,
  int nfs3svc_release_fhandle2(struct svc_rqst *, __be32 *,
  				struct nfsd3_fhandle_pair *);
@@ -3687,10 +3687,10 @@ index 421eddd..0cf2e9c 100644
  				unsigned int);
  /* Helper functions for NFSv3 ACL code */
  __be32 *nfs3svc_encode_post_op_attr(struct svc_rqst *rqstp, __be32 *p,
-diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
+diff --git a/include-nfs/linux/sunrpc/svc.h b/include-nfs/linux/sunrpc/svc.h
 index 2a30775..972e62c 100644
---- a/include/linux/sunrpc/svc.h
-+++ b/include/linux/sunrpc/svc.h
+--- a/include-nfs/linux/sunrpc/svc.h
++++ b/include-nfs/linux/sunrpc/svc.h
 @@ -272,7 +272,7 @@ struct svc_rqst {
  						 * determine what device number
  						 * to report (real or virtual)
@@ -3700,10 +3700,10 @@ index 2a30775..972e62c 100644
  						 * to prevent encrypting page
  						 * cache pages */
  	wait_queue_head_t	rq_wait;	/* synchronization */
-diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h
+diff --git a/include-nfs/linux/sunrpc/svc_xprt.h b/include-nfs/linux/sunrpc/svc_xprt.h
 index 0d9cb6e..66ac213 100644
---- a/include/linux/sunrpc/svc_xprt.h
-+++ b/include/linux/sunrpc/svc_xprt.h
+--- a/include-nfs/linux/sunrpc/svc_xprt.h
++++ b/include-nfs/linux/sunrpc/svc_xprt.h
 @@ -147,13 +147,13 @@ static inline char *__svc_print_addr(const struct sockaddr *addr,
  
  	switch (addr->sa_family) {
diff --git a/kernel_patches/backport/2.6.18-EL5.2/rnfs_fs.patch b/kernel_patches/backport/2.6.18-EL5.2/rnfs_fs.patch
index 0bc0707..d2a8bce 100644
--- a/kernel_patches/backport/2.6.18-EL5.2/rnfs_fs.patch
+++ b/kernel_patches/backport/2.6.18-EL5.2/rnfs_fs.patch
@@ -2176,10 +2176,10 @@ index b660435..899c985 100644
  		unsigned int reclen;
  
  		cdp->err = nfserr_eof; /* will be cleared on successful read */
-diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h
+diff --git a/include-nfs/linux/exportfs.h b/include-nfs/linux/exportfs.h
 index 27e772c..ad9a829 100644
---- a/include/linux/exportfs.h
-+++ b/include/linux/exportfs.h
+--- a/include-nfs/linux/exportfs.h
++++ b/include-nfs/linux/exportfs.h
 @@ -89,85 +89,10 @@ struct fid {
  	};
  };
@@ -2266,10 +2266,10 @@ index 27e772c..ad9a829 100644
 -	struct inode *(*get_inode) (struct super_block *sb, u64 ino, u32 gen));
 -
  #endif /* LINUX_EXPORTFS_H */
-diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h
+diff --git a/include-nfs/linux/lockd/lockd.h b/include-nfs/linux/lockd/lockd.h
 index 51855df..2142bf0 100644
---- a/include/linux/lockd/lockd.h
-+++ b/include/linux/lockd/lockd.h
+--- a/include-nfs/linux/lockd/lockd.h
++++ b/include-nfs/linux/lockd/lockd.h
 @@ -285,7 +285,7 @@ int           nlmsvc_unlock_all_by_ip(struct sockaddr *server_addr);
  
  static inline struct inode *nlmsvc_file_inode(struct nlm_file *file)
@@ -2279,10 +2279,10 @@ index 51855df..2142bf0 100644
  }
  
  static inline int __nlm_privileged_request4(const struct sockaddr *sap)
-diff --git a/include/linux/lockd/xdr.h b/include/linux/lockd/xdr.h
+diff --git a/include-nfs/linux/lockd/xdr.h b/include-nfs/linux/lockd/xdr.h
 index d39ed1c..7dc5b6c 100644
---- a/include/linux/lockd/xdr.h
-+++ b/include/linux/lockd/xdr.h
+--- a/include-nfs/linux/lockd/xdr.h
++++ b/include-nfs/linux/lockd/xdr.h
 @@ -25,13 +25,13 @@ struct svc_rqst;
  #define NLM_MAXCOOKIELEN    	32
  #define NLM_MAXSTRLEN		1024
@@ -2303,10 +2303,10 @@ index d39ed1c..7dc5b6c 100644
  
  /* Lock info passed via NLM */
  struct nlm_lock {
-diff --git a/include/linux/lockd/xdr4.h b/include/linux/lockd/xdr4.h
+diff --git a/include-nfs/linux/lockd/xdr4.h b/include-nfs/linux/lockd/xdr4.h
 index 7353821..12bfe09 100644
---- a/include/linux/lockd/xdr4.h
-+++ b/include/linux/lockd/xdr4.h
+--- a/include-nfs/linux/lockd/xdr4.h
++++ b/include-nfs/linux/lockd/xdr4.h
 @@ -15,11 +15,11 @@
  #include <linux/lockd/xdr.h>
  
@@ -2324,10 +2324,10 @@ index 7353821..12bfe09 100644
  
  
  
-diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
+diff --git a/include-nfs/linux/nfs_fs.h b/include-nfs/linux/nfs_fs.h
 index fdffb41..a41d1a5 100644
---- a/include/linux/nfs_fs.h
-+++ b/include/linux/nfs_fs.h
+--- a/include-nfs/linux/nfs_fs.h
++++ b/include-nfs/linux/nfs_fs.h
 @@ -10,6 +10,7 @@
  #define _LINUX_NFS_FS_H
  
@@ -2393,10 +2393,10 @@ index fdffb41..a41d1a5 100644
  extern int nfs_mountpoint_expiry_timeout;
  extern void nfs_release_automount_timer(void);
  
-diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
+diff --git a/include-nfs/linux/nfs_xdr.h b/include-nfs/linux/nfs_xdr.h
 index b89c34e..4303536 100644
---- a/include/linux/nfs_xdr.h
-+++ b/include/linux/nfs_xdr.h
+--- a/include-nfs/linux/nfs_xdr.h
++++ b/include-nfs/linux/nfs_xdr.h
 @@ -817,9 +817,9 @@ struct nfs_access_entry;
   */
  struct nfs_rpc_ops {
@@ -2410,10 +2410,10 @@ index b89c34e..4303536 100644
  
  	int	(*getroot) (struct nfs_server *, struct nfs_fh *,
  			    struct nfs_fsinfo *);
-diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h
+diff --git a/include-nfs/linux/nfsd/export.h b/include-nfs/linux/nfsd/export.h
 index bcd0201..fc59b1d 100644
---- a/include/linux/nfsd/export.h
-+++ b/include/linux/nfsd/export.h
+--- a/include-nfs/linux/nfsd/export.h
++++ b/include-nfs/linux/nfsd/export.h
 @@ -11,6 +11,7 @@
  #define NFSD_EXPORT_H
  
@@ -2422,10 +2422,10 @@ index bcd0201..fc59b1d 100644
  #ifdef __KERNEL__
  # include <linux/in.h>
  #endif
-diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h
+diff --git a/include-nfs/linux/nfsd/nfsd.h b/include-nfs/linux/nfsd/nfsd.h
 index 2b49d67..490ea85 100644
---- a/include/linux/nfsd/nfsd.h
-+++ b/include/linux/nfsd/nfsd.h
+--- a/include-nfs/linux/nfsd/nfsd.h
++++ b/include-nfs/linux/nfsd/nfsd.h
 @@ -188,119 +188,119 @@ void		nfsd_lockd_shutdown(void);
  /*
   * These macros provide pre-xdr'ed values for faster operation.
@@ -2651,10 +2651,10 @@ index 2b49d67..490ea85 100644
  
  /* Check for dir entries '.' and '..' */
  #define isdotent(n, l)	(l < 3 && n[0] == '.' && (l == 1 || n[1] == '.'))
-diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
+diff --git a/include-nfs/linux/sunrpc/svc.h b/include-nfs/linux/sunrpc/svc.h
 index 2a30775..972e62c 100644
---- a/include/linux/sunrpc/svc.h
-+++ b/include/linux/sunrpc/svc.h
+--- a/include-nfs/linux/sunrpc/svc.h
++++ b/include-nfs/linux/sunrpc/svc.h
 @@ -272,7 +272,7 @@ struct svc_rqst {
  						 * determine what device number
  						 * to report (real or virtual)
@@ -2664,10 +2664,10 @@ index 2a30775..972e62c 100644
  						 * to prevent encrypting page
  						 * cache pages */
  	wait_queue_head_t	rq_wait;	/* synchronization */
-diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h
+diff --git a/include-nfs/linux/sunrpc/svc_xprt.h b/include-nfs/linux/sunrpc/svc_xprt.h
 index 0d9cb6e..66ac213 100644
---- a/include/linux/sunrpc/svc_xprt.h
-+++ b/include/linux/sunrpc/svc_xprt.h
+--- a/include-nfs/linux/sunrpc/svc_xprt.h
++++ b/include-nfs/linux/sunrpc/svc_xprt.h
 @@ -147,13 +147,13 @@ static inline char *__svc_print_addr(const struct sockaddr *addr,
  
  	switch (addr->sa_family) {
diff --git a/kernel_patches/backport/2.6.18-EL5.3/rnfs_fs.patch b/kernel_patches/backport/2.6.18-EL5.3/rnfs_fs.patch
index 360dd86..b9431dc 100644
--- a/kernel_patches/backport/2.6.18-EL5.3/rnfs_fs.patch
+++ b/kernel_patches/backport/2.6.18-EL5.3/rnfs_fs.patch
@@ -2169,10 +2169,10 @@ index b660435..899c985 100644
  		unsigned int reclen;
  
  		cdp->err = nfserr_eof; /* will be cleared on successful read */
-diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h
+diff --git a/include-nfs/linux/exportfs.h b/include-nfs/linux/exportfs.h
 index 27e772c..ad9a829 100644
---- a/include/linux/exportfs.h
-+++ b/include/linux/exportfs.h
+--- a/include-nfs/linux/exportfs.h
++++ b/include-nfs/linux/exportfs.h
 @@ -89,85 +89,10 @@ struct fid {
  	};
  };
@@ -2259,10 +2259,10 @@ index 27e772c..ad9a829 100644
 -	struct inode *(*get_inode) (struct super_block *sb, u64 ino, u32 gen));
 -
  #endif /* LINUX_EXPORTFS_H */
-diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h
+diff --git a/include-nfs/linux/lockd/lockd.h b/include-nfs/linux/lockd/lockd.h
 index 51855df..2142bf0 100644
---- a/include/linux/lockd/lockd.h
-+++ b/include/linux/lockd/lockd.h
+--- a/include-nfs/linux/lockd/lockd.h
++++ b/include-nfs/linux/lockd/lockd.h
 @@ -285,7 +285,7 @@ int           nlmsvc_unlock_all_by_ip(struct sockaddr *server_addr);
  
  static inline struct inode *nlmsvc_file_inode(struct nlm_file *file)
@@ -2272,10 +2272,10 @@ index 51855df..2142bf0 100644
  }
  
  static inline int __nlm_privileged_request4(const struct sockaddr *sap)
-diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
+diff --git a/include-nfs/linux/nfs_fs.h b/include-nfs/linux/nfs_fs.h
 index fdffb41..a41d1a5 100644
---- a/include/linux/nfs_fs.h
-+++ b/include/linux/nfs_fs.h
+--- a/include-nfs/linux/nfs_fs.h
++++ b/include-nfs/linux/nfs_fs.h
 @@ -10,6 +10,7 @@
  #define _LINUX_NFS_FS_H
  
@@ -2341,10 +2341,10 @@ index fdffb41..a41d1a5 100644
  extern int nfs_mountpoint_expiry_timeout;
  extern void nfs_release_automount_timer(void);
  
-diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
+diff --git a/include-nfs/linux/nfs_xdr.h b/include-nfs/linux/nfs_xdr.h
 index b89c34e..4303536 100644
---- a/include/linux/nfs_xdr.h
-+++ b/include/linux/nfs_xdr.h
+--- a/include-nfs/linux/nfs_xdr.h
++++ b/include-nfs/linux/nfs_xdr.h
 @@ -817,9 +817,9 @@ struct nfs_access_entry;
   */
  struct nfs_rpc_ops {
@@ -2358,10 +2358,10 @@ index b89c34e..4303536 100644
  
  	int	(*getroot) (struct nfs_server *, struct nfs_fh *,
  			    struct nfs_fsinfo *);
-diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h
+diff --git a/include-nfs/linux/nfsd/export.h b/include-nfs/linux/nfsd/export.h
 index bcd0201..fc59b1d 100644
---- a/include/linux/nfsd/export.h
-+++ b/include/linux/nfsd/export.h
+--- a/include-nfs/linux/nfsd/export.h
++++ b/include-nfs/linux/nfsd/export.h
 @@ -11,6 +11,7 @@
  #define NFSD_EXPORT_H
  
@@ -2370,10 +2370,10 @@ index bcd0201..fc59b1d 100644
  #ifdef __KERNEL__
  # include <linux/in.h>
  #endif
-diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
+diff --git a/include-nfs/linux/sunrpc/svc.h b/include-nfs/linux/sunrpc/svc.h
 index 2a30775..972e62c 100644
---- a/include/linux/sunrpc/svc.h
-+++ b/include/linux/sunrpc/svc.h
+--- a/include-nfs/linux/sunrpc/svc.h
++++ b/include-nfs/linux/sunrpc/svc.h
 @@ -272,7 +272,7 @@ struct svc_rqst {
  						 * determine what device number
  						 * to report (real or virtual)
@@ -2383,10 +2383,10 @@ index 2a30775..972e62c 100644
  						 * to prevent encrypting page
  						 * cache pages */
  	wait_queue_head_t	rq_wait;	/* synchronization */
-diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h
+diff --git a/include-nfs/linux/sunrpc/svc_xprt.h b/include-nfs/linux/sunrpc/svc_xprt.h
 index 0d9cb6e..66ac213 100644
---- a/include/linux/sunrpc/svc_xprt.h
-+++ b/include/linux/sunrpc/svc_xprt.h
+--- a/include-nfs/linux/sunrpc/svc_xprt.h
++++ b/include-nfs/linux/sunrpc/svc_xprt.h
 @@ -147,13 +147,13 @@ static inline char *__svc_print_addr(const struct sockaddr *addr,
  
  	switch (addr->sa_family) {
diff --git a/kernel_patches/backport/2.6.18-EL5.4/rnfs_fs.patch b/kernel_patches/backport/2.6.18-EL5.4/rnfs_fs.patch
index bb9797c..c3cb288 100644
--- a/kernel_patches/backport/2.6.18-EL5.4/rnfs_fs.patch
+++ b/kernel_patches/backport/2.6.18-EL5.4/rnfs_fs.patch
@@ -2176,10 +2176,10 @@ index b660435..899c985 100644
  		unsigned int reclen;
  
  		cdp->err = nfserr_eof; /* will be cleared on successful read */
-diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h
+diff --git a/include-nfs/linux/exportfs.h b/include-nfs/linux/exportfs.h
 index 27e772c..ad9a829 100644
---- a/include/linux/exportfs.h
-+++ b/include/linux/exportfs.h
+--- a/include-nfs/linux/exportfs.h
++++ b/include-nfs/linux/exportfs.h
 @@ -89,85 +89,10 @@ struct fid {
  	};
  };
@@ -2266,10 +2266,10 @@ index 27e772c..ad9a829 100644
 -	struct inode *(*get_inode) (struct super_block *sb, u64 ino, u32 gen));
 -
  #endif /* LINUX_EXPORTFS_H */
-diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h
+diff --git a/include-nfs/linux/lockd/lockd.h b/include-nfs/linux/lockd/lockd.h
 index 51855df..2142bf0 100644
---- a/include/linux/lockd/lockd.h
-+++ b/include/linux/lockd/lockd.h
+--- a/include-nfs/linux/lockd/lockd.h
++++ b/include-nfs/linux/lockd/lockd.h
 @@ -285,7 +285,7 @@ int           nlmsvc_unlock_all_by_ip(struct sockaddr *server_addr);
  
  static inline struct inode *nlmsvc_file_inode(struct nlm_file *file)
@@ -2279,10 +2279,10 @@ index 51855df..2142bf0 100644
  }
  
  static inline int __nlm_privileged_request4(const struct sockaddr *sap)
-diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
+diff --git a/include-nfs/linux/nfs_fs.h b/include-nfs/linux/nfs_fs.h
 index fdffb41..a41d1a5 100644
---- a/include/linux/nfs_fs.h
-+++ b/include/linux/nfs_fs.h
+--- a/include-nfs/linux/nfs_fs.h
++++ b/include-nfs/linux/nfs_fs.h
 @@ -10,6 +10,7 @@
  #define _LINUX_NFS_FS_H
  
@@ -2348,10 +2348,10 @@ index fdffb41..a41d1a5 100644
  extern int nfs_mountpoint_expiry_timeout;
  extern void nfs_release_automount_timer(void);
  
-diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
+diff --git a/include-nfs/linux/nfs_xdr.h b/include-nfs/linux/nfs_xdr.h
 index b89c34e..4303536 100644
---- a/include/linux/nfs_xdr.h
-+++ b/include/linux/nfs_xdr.h
+--- a/include-nfs/linux/nfs_xdr.h
++++ b/include-nfs/linux/nfs_xdr.h
 @@ -817,9 +817,9 @@ struct nfs_access_entry;
   */
  struct nfs_rpc_ops {
@@ -2365,10 +2365,10 @@ index b89c34e..4303536 100644
  
  	int	(*getroot) (struct nfs_server *, struct nfs_fh *,
  			    struct nfs_fsinfo *);
-diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h
+diff --git a/include-nfs/linux/nfsd/export.h b/include-nfs/linux/nfsd/export.h
 index bcd0201..fc59b1d 100644
---- a/include/linux/nfsd/export.h
-+++ b/include/linux/nfsd/export.h
+--- a/include-nfs/linux/nfsd/export.h
++++ b/include-nfs/linux/nfsd/export.h
 @@ -11,6 +11,7 @@
  #define NFSD_EXPORT_H
  
@@ -2377,10 +2377,10 @@ index bcd0201..fc59b1d 100644
  #ifdef __KERNEL__
  # include <linux/in.h>
  #endif
-diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
+diff --git a/include-nfs/linux/sunrpc/svc.h b/include-nfs/linux/sunrpc/svc.h
 index 2a30775..972e62c 100644
---- a/include/linux/sunrpc/svc.h
-+++ b/include/linux/sunrpc/svc.h
+--- a/include-nfs/linux/sunrpc/svc.h
++++ b/include-nfs/linux/sunrpc/svc.h
 @@ -272,7 +272,7 @@ struct svc_rqst {
  						 * determine what device number
  						 * to report (real or virtual)
@@ -2390,10 +2390,10 @@ index 2a30775..972e62c 100644
  						 * to prevent encrypting page
  						 * cache pages */
  	wait_queue_head_t	rq_wait;	/* synchronization */
-diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h
+diff --git a/include-nfs/linux/sunrpc/svc_xprt.h b/include-nfs/linux/sunrpc/svc_xprt.h
 index 0d9cb6e..66ac213 100644
---- a/include/linux/sunrpc/svc_xprt.h
-+++ b/include/linux/sunrpc/svc_xprt.h
+--- a/include-nfs/linux/sunrpc/svc_xprt.h
++++ b/include-nfs/linux/sunrpc/svc_xprt.h
 @@ -147,13 +147,13 @@ static inline char *__svc_print_addr(const struct sockaddr *addr,
  
  	switch (addr->sa_family) {
diff --git a/kernel_patches/backport/2.6.22/rnfs_fs.patch b/kernel_patches/backport/2.6.22/rnfs_fs.patch
index 8e5b5ae..d3941b3 100644
--- a/kernel_patches/backport/2.6.22/rnfs_fs.patch
+++ b/kernel_patches/backport/2.6.22/rnfs_fs.patch
@@ -1296,10 +1296,10 @@ index b660435..d5cbe47 100644
  	}
  
  	/* Write the data. */
-diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h
+diff --git a/include-nfs/linux/exportfs.h b/include-nfs/linux/exportfs.h
 index 27e772c..ad9a829 100644
---- a/include/linux/exportfs.h
-+++ b/include/linux/exportfs.h
+--- a/include-nfs/linux/exportfs.h
++++ b/include-nfs/linux/exportfs.h
 @@ -89,85 +89,10 @@ struct fid {
  	};
  };
@@ -1386,10 +1386,10 @@ index 27e772c..ad9a829 100644
 -	struct inode *(*get_inode) (struct super_block *sb, u64 ino, u32 gen));
 -
  #endif /* LINUX_EXPORTFS_H */
-diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
+diff --git a/include-nfs/linux/nfs_fs.h b/include-nfs/linux/nfs_fs.h
 index fdffb41..4f1382b 100644
---- a/include/linux/nfs_fs.h
-+++ b/include/linux/nfs_fs.h
+--- a/include-nfs/linux/nfs_fs.h
++++ b/include-nfs/linux/nfs_fs.h
 @@ -343,7 +343,7 @@ extern int nfs_refresh_inode(struct inode *, struct nfs_fattr *);
  extern int nfs_post_op_update_inode(struct inode *inode, struct nfs_fattr *fattr);
  extern int nfs_post_op_update_inode_force_wcc(struct inode *inode, struct nfs_fattr *fattr);
@@ -1408,10 +1408,10 @@ index fdffb41..4f1382b 100644
  
  extern void nfs_force_lookup_revalidate(struct inode *dir);
  extern int nfs_instantiate(struct dentry *dentry, struct nfs_fh *fh, struct nfs_fattr *fattr);
-diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
+diff --git a/include-nfs/linux/nfs_xdr.h b/include-nfs/linux/nfs_xdr.h
 index b89c34e..9708e78 100644
---- a/include/linux/nfs_xdr.h
-+++ b/include/linux/nfs_xdr.h
+--- a/include-nfs/linux/nfs_xdr.h
++++ b/include-nfs/linux/nfs_xdr.h
 @@ -817,7 +817,7 @@ struct nfs_access_entry;
   */
  struct nfs_rpc_ops {
@@ -1421,10 +1421,10 @@ index b89c34e..9708e78 100644
  	const struct inode_operations *dir_inode_ops;
  	const struct inode_operations *file_inode_ops;
  
-diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
+diff --git a/include-nfs/linux/sunrpc/svc.h b/include-nfs/linux/sunrpc/svc.h
 index 2a30775..972e62c 100644
---- a/include/linux/sunrpc/svc.h
-+++ b/include/linux/sunrpc/svc.h
+--- a/include-nfs/linux/sunrpc/svc.h
++++ b/include-nfs/linux/sunrpc/svc.h
 @@ -272,7 +272,7 @@ struct svc_rqst {
  						 * determine what device number
  						 * to report (real or virtual)
@@ -1434,10 +1434,10 @@ index 2a30775..972e62c 100644
  						 * to prevent encrypting page
  						 * cache pages */
  	wait_queue_head_t	rq_wait;	/* synchronization */
-diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h
+diff --git a/include-nfs/linux/sunrpc/svc_xprt.h b/include-nfs/linux/sunrpc/svc_xprt.h
 index 0d9cb6e..66ac213 100644
---- a/include/linux/sunrpc/svc_xprt.h
-+++ b/include/linux/sunrpc/svc_xprt.h
+--- a/include-nfs/linux/sunrpc/svc_xprt.h
++++ b/include-nfs/linux/sunrpc/svc_xprt.h
 @@ -147,13 +147,13 @@ static inline char *__svc_print_addr(const struct sockaddr *addr,
  
  	switch (addr->sa_family) {
diff --git a/kernel_patches/backport/2.6.25/rnfs_fs.patch b/kernel_patches/backport/2.6.25/rnfs_fs.patch
index 09c18cc..83fff6d 100644
--- a/kernel_patches/backport/2.6.25/rnfs_fs.patch
+++ b/kernel_patches/backport/2.6.25/rnfs_fs.patch
@@ -670,10 +670,10 @@ index b660435..915ed15 100644
  	}
  
  	/* Write the data. */
-diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
+diff --git a/include-nfs/linux/nfs_fs.h b/include-nfs/linux/nfs_fs.h
 index fdffb41..4f1382b 100644
---- a/include/linux/nfs_fs.h
-+++ b/include/linux/nfs_fs.h
+--- a/include-nfs/linux/nfs_fs.h
++++ b/include-nfs/linux/nfs_fs.h
 @@ -343,7 +343,7 @@ extern int nfs_refresh_inode(struct inode *, struct nfs_fattr *);
  extern int nfs_post_op_update_inode(struct inode *inode, struct nfs_fattr *fattr);
  extern int nfs_post_op_update_inode_force_wcc(struct inode *inode, struct nfs_fattr *fattr);
@@ -692,10 +692,10 @@ index fdffb41..4f1382b 100644
  
  extern void nfs_force_lookup_revalidate(struct inode *dir);
  extern int nfs_instantiate(struct dentry *dentry, struct nfs_fh *fh, struct nfs_fattr *fattr);
-diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
+diff --git a/include-nfs/linux/nfs_xdr.h b/include-nfs/linux/nfs_xdr.h
 index b89c34e..9708e78 100644
---- a/include/linux/nfs_xdr.h
-+++ b/include/linux/nfs_xdr.h
+--- a/include-nfs/linux/nfs_xdr.h
++++ b/include-nfs/linux/nfs_xdr.h
 @@ -817,7 +817,7 @@ struct nfs_access_entry;
   */
  struct nfs_rpc_ops {
@@ -705,10 +705,10 @@ index b89c34e..9708e78 100644
  	const struct inode_operations *dir_inode_ops;
  	const struct inode_operations *file_inode_ops;
  
-diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h
+diff --git a/include-nfs/linux/sunrpc/svc_xprt.h b/include-nfs/linux/sunrpc/svc_xprt.h
 index 0d9cb6e..66ac213 100644
---- a/include/linux/sunrpc/svc_xprt.h
-+++ b/include/linux/sunrpc/svc_xprt.h
+--- a/include-nfs/linux/sunrpc/svc_xprt.h
++++ b/include-nfs/linux/sunrpc/svc_xprt.h
 @@ -147,13 +147,13 @@ static inline char *__svc_print_addr(const struct sockaddr *addr,
  
  	switch (addr->sa_family) {
diff --git a/kernel_patches/backport/2.6.27_sles11/rnfs_fs.patch b/kernel_patches/backport/2.6.27_sles11/rnfs_fs.patch
index 344e46d..34e26a9 100644
--- a/kernel_patches/backport/2.6.27_sles11/rnfs_fs.patch
+++ b/kernel_patches/backport/2.6.27_sles11/rnfs_fs.patch
@@ -793,10 +793,10 @@ index 6c68ffd..4bc61db 100644
  			if (error == -ENODATA)
  				error = 0;
  		}
-diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
+diff --git a/include-nfs/linux/nfs_fs.h b/include-nfs/linux/nfs_fs.h
 index fdffb41..230665a 100644
---- a/include/linux/nfs_fs.h
-+++ b/include/linux/nfs_fs.h
+--- a/include-nfs/linux/nfs_fs.h
++++ b/include-nfs/linux/nfs_fs.h
 @@ -425,7 +425,7 @@ extern const struct inode_operations nfs_dir_inode_operations;
  extern const struct inode_operations nfs3_dir_inode_operations;
  #endif /* CONFIG_NFS_V3 */
@@ -806,10 +806,10 @@ index fdffb41..230665a 100644
  
  extern void nfs_force_lookup_revalidate(struct inode *dir);
  extern int nfs_instantiate(struct dentry *dentry, struct nfs_fh *fh, struct nfs_fattr *fattr);
-diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
+diff --git a/include-nfs/linux/nfs_xdr.h b/include-nfs/linux/nfs_xdr.h
 index b89c34e..9708e78 100644
---- a/include/linux/nfs_xdr.h
-+++ b/include/linux/nfs_xdr.h
+--- a/include-nfs/linux/nfs_xdr.h
++++ b/include-nfs/linux/nfs_xdr.h
 @@ -817,7 +817,7 @@ struct nfs_access_entry;
   */
  struct nfs_rpc_ops {
@@ -819,10 +819,10 @@ index b89c34e..9708e78 100644
  	const struct inode_operations *dir_inode_ops;
  	const struct inode_operations *file_inode_ops;
  
-diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h
+diff --git a/include-nfs/linux/nfsd/nfsd.h b/include-nfs/linux/nfsd/nfsd.h
 index 2b49d67..aab2d84 100644
---- a/include/linux/nfsd/nfsd.h
-+++ b/include/linux/nfsd/nfsd.h
+--- a/include-nfs/linux/nfsd/nfsd.h
++++ b/include-nfs/linux/nfsd/nfsd.h
 @@ -86,7 +86,7 @@ __be32		nfsd_setattr(struct svc_rqst *, struct svc_fh *,
  #ifdef CONFIG_NFSD_V4
  __be32          nfsd4_set_nfs4_acl(struct svc_rqst *, struct svc_fh *,
@@ -832,10 +832,10 @@ index 2b49d67..aab2d84 100644
  #endif /* CONFIG_NFSD_V4 */
  __be32		nfsd_create(struct svc_rqst *, struct svc_fh *,
  				char *name, int len, struct iattr *attrs,
-diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h
+diff --git a/include-nfs/linux/sunrpc/svc_xprt.h b/include-nfs/linux/sunrpc/svc_xprt.h
 index 0d9cb6e..66ac213 100644
---- a/include/linux/sunrpc/svc_xprt.h
-+++ b/include/linux/sunrpc/svc_xprt.h
+--- a/include-nfs/linux/sunrpc/svc_xprt.h
++++ b/include-nfs/linux/sunrpc/svc_xprt.h
 @@ -147,13 +147,13 @@ static inline char *__svc_print_addr(const struct sockaddr *addr,
  
  	switch (addr->sa_family) {
diff --git a/ofed_scripts/Makefile b/ofed_scripts/Makefile
index 8c4acbb..ca5a5e5 100644
--- a/ofed_scripts/Makefile
+++ b/ofed_scripts/Makefile
@@ -1,5 +1,6 @@
 EXTRA_CFLAGS += $(OPENIB_KERNEL_EXTRA_CFLAGS) \
 		$(KERNEL_MEMTRACK_CFLAGS) \
+		$(KERNEL_NFS_FS_CFLAGS) \
 		-I$(CWD)/include \
 		-I$(CWD)/drivers/infiniband/ulp/ipoib \
 		-I$(CWD)/drivers/infiniband/debug \
diff --git a/ofed_scripts/checkout_files b/ofed_scripts/checkout_files
index 0ee505b..2896430 100644
--- a/ofed_scripts/checkout_files
+++ b/ofed_scripts/checkout_files
@@ -13,29 +13,7 @@ fs/lockd/
 fs/nfs/
 fs/nfs_common/
 fs/nfsd/
-include/linux/exportfs.h
-include/linux/lockd/
 include/linux/mlx4/
-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/
 include/rdma/
 include/scsi/iscsi_if.h
 include/scsi/iscsi_proto.h
diff --git a/ofed_scripts/makefile b/ofed_scripts/makefile
index 3317840..929524a 100644
--- a/ofed_scripts/makefile
+++ b/ofed_scripts/makefile
@@ -14,13 +14,19 @@ include ./configure.mk.kernel
 include ./config.mk
 
 DEPMOD  = /sbin/depmod
-	
+
 ifeq ($(CONFIG_MEMTRACK),m)
         export KERNEL_MEMTRACK_CFLAGS = -include $(CWD)/drivers/infiniband/debug/mtrack.h
 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:
@@ -145,6 +151,7 @@ kernel:
 		-include $(CWD)/include/linux/autoconf.h \
 		$(BACKPORT_INCLUDES) \
 		$(KERNEL_MEMTRACK_CFLAGS) \
+		$(KERNEL_NFS_FS_CFLAGS) \
 		$(OPENIB_KERNEL_EXTRA_CFLAGS) \
 		-I$(CWD)/include \
 		-I$(CWD)/drivers/infiniband/debug \
diff --git a/ofed_scripts/nfs_header_checkout_files b/ofed_scripts/nfs_header_checkout_files
new file mode 100644
index 0000000..29dd7ff
--- /dev/null
+++ b/ofed_scripts/nfs_header_checkout_files
@@ -0,0 +1,22 @@
+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 fa91d08..7766f98 100755
--- a/ofed_scripts/ofed_checkout.sh
+++ b/ofed_scripts/ofed_checkout.sh
@@ -29,6 +29,16 @@ 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.6.0.4




More information about the ewg mailing list