aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4state.c
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2009-09-10 05:25:59 -0400
committerJ. Bruce Fields <bfields@citi.umich.edu>2009-09-15 20:49:55 -0400
commit38524ab38f2752beee262a97403d871665838172 (patch)
treecbccd7de004d2ad437bd514fc3baefefd6a711f5 /fs/nfsd/nfs4state.c
parent80fc015bdfe1f5b870c1e1ee02d78e709523fee7 (diff)
nfsd41: Backchannel: callback infrastructure
Keep the xprt used for create_session in cl_cb_xprt. Mark cl_callback.cb_minorversion = 1 and remember the client provided cl_callback.cb_prog rpc program number. Use it to probe the callback path. Use the client's network address to initialize as the callback's address as expected by the xprt creation routines. Define xdr sizes and code nfs4_cb_compound header to be able to send a null callback rpc. Signed-off-by: Andy Adamson<andros@netapp.com> Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@netapp.com> [get callback minorversion from fore channel's] Signed-off-by: Benny Halevy <bhalevy@panasas.com> [nfsd41: change bc_sock to bc_xprt] Signed-off-by: Benny Halevy <bhalevy@panasas.com> [pulled definition for cl_cb_xprt] Signed-off-by: Benny Halevy <bhalevy@panasas.com> [nfsd41: set up backchannel's cb_addr] [moved rpc_create_args init to "nfsd: modify nfsd4.1 backchannel to use new xprt class"] Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r--fs/nfsd/nfs4state.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 0445192d660d..d8196b453f61 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -702,6 +702,8 @@ static inline void
702free_client(struct nfs4_client *clp) 702free_client(struct nfs4_client *clp)
703{ 703{
704 shutdown_callback_client(clp); 704 shutdown_callback_client(clp);
705 if (clp->cl_cb_xprt)
706 svc_xprt_put(clp->cl_cb_xprt);
705 if (clp->cl_cred.cr_group_info) 707 if (clp->cl_cred.cr_group_info)
706 put_group_info(clp->cl_cred.cr_group_info); 708 put_group_info(clp->cl_cred.cr_group_info);
707 kfree(clp->cl_principal); 709 kfree(clp->cl_principal);
@@ -1317,6 +1319,18 @@ nfsd4_create_session(struct svc_rqst *rqstp,
1317 cr_ses->flags &= ~SESSION4_PERSIST; 1319 cr_ses->flags &= ~SESSION4_PERSIST;
1318 cr_ses->flags &= ~SESSION4_RDMA; 1320 cr_ses->flags &= ~SESSION4_RDMA;
1319 1321
1322 if (cr_ses->flags & SESSION4_BACK_CHAN) {
1323 unconf->cl_cb_xprt = rqstp->rq_xprt;
1324 svc_xprt_get(unconf->cl_cb_xprt);
1325 rpc_copy_addr(
1326 (struct sockaddr *)&unconf->cl_cb_conn.cb_addr,
1327 sa);
1328 unconf->cl_cb_conn.cb_addrlen = svc_addr_len(sa);
1329 unconf->cl_cb_conn.cb_minorversion =
1330 cstate->minorversion;
1331 unconf->cl_cb_conn.cb_prog = cr_ses->callback_prog;
1332 nfsd4_probe_callback(unconf);
1333 }
1320 conf = unconf; 1334 conf = unconf;
1321 } else { 1335 } else {
1322 status = nfserr_stale_clientid; 1336 status = nfserr_stale_clientid;