Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

NFS rename client back channel transport field

Differentiate from server backchannel

Signed-off-by: Andy Adamson <andros@netapp.com>
Acked-by: Bruce Fields <bfields@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

authored by

Andy Adamson and committed by
Trond Myklebust
4a19de0f 42acd021

+11 -11
+6 -6
fs/nfs/callback.c
··· 142 142 struct svc_serv *serv = clp->cl_rpcclient->cl_xprt->bc_serv; 143 143 struct nfs4_sessionid *bc_sid; 144 144 145 - if (!serv->bc_xprt) 145 + if (!serv->sv_bc_xprt) 146 146 return -EINVAL; 147 147 148 148 /* on success freed in xprt_free */ ··· 152 152 memcpy(bc_sid->data, &clp->cl_session->sess_id.data, 153 153 NFS4_MAX_SESSIONID_LEN); 154 154 spin_lock_bh(&serv->sv_cb_lock); 155 - serv->bc_xprt->xpt_bc_sid = bc_sid; 155 + serv->sv_bc_xprt->xpt_bc_sid = bc_sid; 156 156 spin_unlock_bh(&serv->sv_cb_lock); 157 - dprintk("%s set xpt_bc_sid=%u:%u:%u:%u for bc_xprt %p\n", __func__, 157 + dprintk("%s set xpt_bc_sid=%u:%u:%u:%u for sv_bc_xprt %p\n", __func__, 158 158 ((u32 *)bc_sid->data)[0], ((u32 *)bc_sid->data)[1], 159 159 ((u32 *)bc_sid->data)[2], ((u32 *)bc_sid->data)[3], 160 - serv->bc_xprt); 160 + serv->sv_bc_xprt); 161 161 return 0; 162 162 } 163 163 ··· 228 228 init_waitqueue_head(&serv->sv_cb_waitq); 229 229 rqstp = svc_prepare_thread(serv, &serv->sv_pools[0]); 230 230 if (IS_ERR(rqstp)) { 231 - svc_xprt_put(serv->bc_xprt); 232 - serv->bc_xprt = NULL; 231 + svc_xprt_put(serv->sv_bc_xprt); 232 + serv->sv_bc_xprt = NULL; 233 233 } 234 234 out: 235 235 dprintk("--> %s return %ld\n", __func__,
+2 -2
include/linux/sunrpc/bc_xprt.h
··· 43 43 */ 44 44 static inline int svc_is_backchannel(const struct svc_rqst *rqstp) 45 45 { 46 - if (rqstp->rq_server->bc_xprt) 46 + if (rqstp->rq_server->sv_bc_xprt) 47 47 return 1; 48 48 return 0; 49 49 } ··· 51 51 { 52 52 if (svc_is_backchannel(rqstp)) 53 53 return (struct nfs4_sessionid *) 54 - rqstp->rq_server->bc_xprt->xpt_bc_sid; 54 + rqstp->rq_server->sv_bc_xprt->xpt_bc_sid; 55 55 return NULL; 56 56 } 57 57
+1 -1
include/linux/sunrpc/svc.h
··· 99 99 spinlock_t sv_cb_lock; /* protects the svc_cb_list */ 100 100 wait_queue_head_t sv_cb_waitq; /* sleep here if there are no 101 101 * entries in the svc_cb_list */ 102 - struct svc_xprt *bc_xprt; 102 + struct svc_xprt *sv_bc_xprt; /* callback on fore channel */ 103 103 #endif /* CONFIG_NFS_V4_1 */ 104 104 }; 105 105
+1 -1
net/sunrpc/svc.c
··· 1262 1262 struct kvec *resv = &rqstp->rq_res.head[0]; 1263 1263 1264 1264 /* Build the svc_rqst used by the common processing routine */ 1265 - rqstp->rq_xprt = serv->bc_xprt; 1265 + rqstp->rq_xprt = serv->sv_bc_xprt; 1266 1266 rqstp->rq_xid = req->rq_xid; 1267 1267 rqstp->rq_prot = req->rq_xprt->prot; 1268 1268 rqstp->rq_server = serv;
+1 -1
net/sunrpc/svcsock.c
··· 1595 1595 xprt = &svsk->sk_xprt; 1596 1596 svc_xprt_init(&svc_tcp_bc_class, xprt, serv); 1597 1597 1598 - serv->bc_xprt = xprt; 1598 + serv->sv_bc_xprt = xprt; 1599 1599 1600 1600 return xprt; 1601 1601 }