aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/client.c
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2009-04-01 09:22:03 -0400
committerBenny Halevy <bhalevy@panasas.com>2009-06-17 13:46:28 -0400
commitcccef3b96a4759ae0790452280c00ea505412157 (patch)
tree26e4f93653a5c980cf8bb585d6fc05817a23f4be /fs/nfs/client.c
parent22958463d5dca8548e19430779f379e66fd6e4a4 (diff)
nfs41: introduce nfs4_call_sync
Use nfs4_call_sync rather than rpc_call_sync to provide for a nfs41 sessions-enabled interface for sessions manipulation. The nfs41 rpc logic uses the rpc_call_prepare method to recover and create the session, as well as selecting a free slot id and the rpc_call_done to free the slot and update slot table related metadata. In the coming patches we'll add rpc prepare and done routines for setting up the sequence op and processing the sequence result. Signed-off-by: Benny Halevy <bhalevy@panasas.com> [nfs41: nfs4_call_sync] As per 11-14-08 review. Squash into "nfs41: introduce nfs4_call_sync" and "nfs41: nfs4_setup_sequence" Define two functions one for v4 and one for v41 add a pointer to struct nfs4_client to the correct one. Signed-off-by: Andy Adamson <andros@netapp.com> [added BUG() in _nfs4_call_sync_session if !CONFIG_NFS_V4_1] Signed-off-by: Benny Halevy <bhalevy@panasas.com> [nfs41: check for session not minorversion] Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Benny Halevy <bhalevy@panasas.com> [group minorversion specific stuff together] Signed-off-by: Alexandros Batsakis <Alexandros.Batsakis@netapp.com> Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Andy Adamson <andros@netapp.com> [nfs41: fixup nfs4_clear_client_minor_version] [introduce nfs4_init_client_minor_version() in this patch] Signed-off-by: Benny Halevy <bhalevy@panasas.com> [cleaned-up patch: got rid of nfs_call_sync_t, dprintks, cosmetics, extra server defs] Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/client.c')
-rw-r--r--fs/nfs/client.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index f1506f148521..a9828baaa445 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -194,6 +194,8 @@ static void nfs4_clear_client_minor_version(struct nfs_client *clp)
194 nfs4_destroy_session(clp->cl_session); 194 nfs4_destroy_session(clp->cl_session);
195 clp->cl_session = NULL; 195 clp->cl_session = NULL;
196 } 196 }
197
198 clp->cl_call_sync = _nfs4_call_sync;
197#endif /* CONFIG_NFS_V4_1 */ 199#endif /* CONFIG_NFS_V4_1 */
198} 200}
199 201
@@ -1073,6 +1075,8 @@ error:
1073 */ 1075 */
1074static int nfs4_init_client_minor_version(struct nfs_client *clp) 1076static int nfs4_init_client_minor_version(struct nfs_client *clp)
1075{ 1077{
1078 clp->cl_call_sync = _nfs4_call_sync;
1079
1076#if defined(CONFIG_NFS_V4_1) 1080#if defined(CONFIG_NFS_V4_1)
1077 if (clp->cl_minorversion) { 1081 if (clp->cl_minorversion) {
1078 struct nfs4_session *session = NULL; 1082 struct nfs4_session *session = NULL;
@@ -1086,6 +1090,7 @@ static int nfs4_init_client_minor_version(struct nfs_client *clp)
1086 return -ENOMEM; 1090 return -ENOMEM;
1087 1091
1088 clp->cl_session = session; 1092 clp->cl_session = session;
1093 clp->cl_call_sync = _nfs4_call_sync_session;
1089 } 1094 }
1090#endif /* CONFIG_NFS_V4_1 */ 1095#endif /* CONFIG_NFS_V4_1 */
1091 1096