Skip to content

Commit

Permalink
nfs41: Setup the backchannel
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andy Adamson authored and Benny Halevy committed Jun 17, 2009
1 parent e82dc22 commit 0b5b7ae
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions fs/nfs/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 0b5b7ae

Please sign in to comment.