[PATCH] more ifdef CONFIG_PNFS for pnfs only code

Benny Halevy bhalevy at ns1.bhalevy.com
Mon May 7 09:09:16 EDT 2007


---
 fs/nfsd/nfs4proc.c         |    4 ++++
 include/linux/nfsd/state.h |    7 +++++++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 435dc39..095d582 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -737,6 +737,7 @@ out_kfree:
 	return status;
 }
 
+#ifdef CONFIG_PNFS
 static int
 nfsd4_getdevlist( struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_pnfs_getdevlist *gdlp)
 {
@@ -969,6 +970,7 @@ nfsd4_getdevinfo( struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd
 out:
 	return status;
 }
+#endif
 
 /*
  * NULL call.
@@ -1182,6 +1184,7 @@ nfsd4_proc_compound(struct svc_rqst *rqstp,
 		case OP_RELEASE_LOCKOWNER:
 			op->status = nfsd4_release_lockowner(rqstp, &op->u.release_lockowner);
 			break;
+#ifdef CONFIG_PNFS
 		case OP_GETDEVICELIST:
 			op->status = nfsd4_getdevlist(rqstp, current_fh, &op->u.pnfs_getdevlist);
 			break;
@@ -1197,6 +1200,7 @@ nfsd4_proc_compound(struct svc_rqst *rqstp,
 		case OP_LAYOUTRETURN:
 			op->status = nfsd4_layoutreturn(rqstp, current_ses, current_fh, &op->u.pnfs_layoutreturn);
 			break;
+#endif
 		case OP_EXCHANGE_ID:
 			op->status = nfsd4_exchange_id(rqstp, &op->u.exchange_id);
 			break;
diff --git a/include/linux/nfsd/state.h b/include/linux/nfsd/state.h
index e095d1f..83b078c 100644
--- a/include/linux/nfsd/state.h
+++ b/include/linux/nfsd/state.h
@@ -197,7 +197,9 @@ struct nfs4_client {
 	struct list_head	cl_strhash; 	/* hash by cl_name */
 	struct list_head	cl_openowners;
 	struct list_head	cl_delegations;
+#ifdef CONFIG_PNFS
 	struct list_head	cl_layouts;
+#endif /* CONFIG_PNFS */
 	struct list_head	cl_sessions;
 	struct list_head        cl_lru;         /* tail queue */
 	struct xdr_netobj	cl_name; 	/* id generated by client */
@@ -218,6 +220,7 @@ struct nfs4_client {
 	u32                     cl_session_flags;
 };
 
+#ifdef CONFIG_PNFS
 enum layout_recall_type {
 	RECALL_FILE = 1,
 	RECALL_FSID = 2,
@@ -265,6 +268,8 @@ struct nfs4_layout {
 #define lo_offset       lo_cb_layout.cbl_offset
 #define lo_length       lo_cb_layout.cbl_length
 
+#endif /* CONFIG_PNFS */
+
 /* struct nfs4_client_reset
  * one per old client. Populates reset_str_hashtbl. Filled from conf_id_hashtbl
  * upon lease reset, or from upcall to state_daemon (to read in state
@@ -432,7 +437,9 @@ extern void put_nfs4_client(struct nfs4_client *clp);
 extern void nfs4_free_stateowner(struct kref *kref);
 extern void nfsd4_probe_callback(struct nfs4_client *clp);
 extern void nfsd4_cb_recall(struct nfs4_delegation *dp);
+#ifdef CONFIG_PNFS
 extern void nfsd4_cb_layout(struct nfs4_cb_layout *lp);
+#endif /* CONFIG_PNFS */
 extern void nfs4_put_delegation(struct nfs4_delegation *dp);
 extern int nfs4_make_rec_clidname(char *clidname, struct xdr_netobj *clname);
 extern void nfsd4_init_recdir(char *recdir_name);
-- 
1.5.1


--------------090307080908040903040103--


More information about the pNFS mailing list