[pnfs] [PATCH 01/10] nfs41: Setup the backchannel
Ricardo Labiaga
ricardo.labiaga at netapp.com
Thu Jan 31 06:56:58 EST 2008
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>
---
fs/nfs/client.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 1993f2b..c2ab890 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -37,6 +37,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>
@@ -986,7 +987,7 @@ static int nfs4_init_server(struct nfs_server *server,
#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)
@@ -1008,6 +1009,11 @@ int nfs4_init_session(struct nfs_client *clp, struct nfs4_session **spp,
session->clnt = clnt;
rpc_init_wait_queue(&session->recovery_waitq,
"Session recovery wait queue");
+
+ error = xprt_setup_backchannel(clnt->cl_xprt,
+ NFS41_BC_MIN_CALLBACKS);
+ if (error < 0)
+ nfs4_put_session(&session);
}
*spp = session;
break;
--
1.5.3.3
More information about the pNFS
mailing list