[pnfs] [PATCH 1/9] nfs41: Setup the backchannel
Benny Halevy
bhalevy at panasas.com
Wed Jul 16 05:29:44 EDT 2008
From: Ricardo Labiaga <ricardo.labiaga at netapp.com>
The NFS v4.1 callback service has already been setup, and
rpc_xprt->serv points to the svc_serv structure describing it.
Invoke the xprt_setup_backchannel() initialization to pre-
allocate the necessary backchannel structures.
Signed-off-by: Ricardo Labiaga <ricardo.labiaga at netapp.com>
Signed-off-by: Benny Halevy <bhalevy at panasas.com>
nfs41: fix nfs4_init_session for v4.0
Signed-off-by: Andy Adamson<andros at netapp.com>
Signed-off-by: Benny Halevy <bhalevy at panasas.com>
---
fs/nfs/client.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index dedf7e8..ed2d4ca 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -39,6 +39,7 @@
#include <linux/nfs_xdr.h>
#if defined(CONFIG_NFS_V4_1)
#include <linux/nfs41_session_recovery.h>
+#include <linux/sunrpc/bc_xprt.h>
#endif /* CONFIG_NFS_V4_1 */
#include <asm/system.h>
@@ -1130,7 +1131,7 @@ error:
#if defined(CONFIG_NFS_V4_1)
/*
- * Allocate and initialize a session if required
+ * Allocate and initialize a session if required, including its backchannel.
*/
int nfs4_init_session(struct nfs_client *clp, struct nfs4_session **spp,
struct rpc_clnt *clnt)
@@ -1151,6 +1152,12 @@ int nfs4_init_session(struct nfs_client *clp, struct nfs4_session **spp,
else {
session->clnt = clnt;
session->clp = clp;
+
+ error = xprt_setup_backchannel(clnt->cl_xprt,
+ NFS41_BC_MIN_CALLBACKS);
+ if (error < 0)
+ /* nfs4_put session sets the session to NULL */
+ nfs4_put_session(&session);
}
}
*spp = session;
--
1.5.6.3
More information about the pNFS
mailing list