]> git.karo-electronics.de Git - linux-beck.git/commitdiff
nfs41: Setup the backchannel
authorAndy Adamson <andros@netapp.com>
Wed, 1 Apr 2009 13:23:15 +0000 (09:23 -0400)
committerBenny Halevy <bhalevy@panasas.com>
Wed, 17 Jun 2009 21:11:32 +0000 (14:11 -0700)
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@netapp.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
[nfs41: change nfs4_put_session(nfs4_session**) to nfs4_destroy_session(nfs_session*)]
Signed-off-by: Alexandros Batsakis <Alexandros.Batsakis@netapp.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
[moved xprt_setup_backchannel from nfs4_init_session to nfs4_init_backchannel]
Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
fs/nfs/client.c

index ac6575c4da3129791b87ec67ffc1ff5d77cd9739..4f75ec593be8b8395899b44fa63fafa1742e8eb7 100644 (file)
@@ -37,6 +37,7 @@
 #include <linux/in6.h>
 #include <net/ipv6.h>
 #include <linux/nfs_xdr.h>
+#include <linux/sunrpc/bc_xprt.h>
 
 #include <asm/system.h>
 
@@ -1096,6 +1097,14 @@ static int nfs4_init_callback(struct nfs_client *clp)
        int error;
 
        if (clp->rpc_ops->version == 4) {
+               if (nfs4_has_session(clp)) {
+                       error = xprt_setup_backchannel(
+                                               clp->cl_rpcclient->cl_xprt,
+                                               NFS41_BC_MIN_CALLBACKS);
+                       if (error < 0)
+                               return error;
+               }
+
                error = nfs_callback_up(clp->cl_minorversion,
                                        clp->cl_rpcclient->cl_xprt);
                if (error < 0) {