diff options
| author | Chuck Lever <chuck.lever@oracle.com> | 2014-07-16 15:38:32 -0400 |
|---|---|---|
| committer | J. Bruce Fields <bfields@redhat.com> | 2014-07-18 11:35:45 -0400 |
| commit | 3c45ddf823d679a820adddd53b52c6699c9a05ac (patch) | |
| tree | ca52538cb038660181621282d82cf5ff54f8d8e6 /fs/nfsd/nfs4callback.c | |
| parent | 5d6031ca742f9f07b9c9d9322538619f3bd155ac (diff) | |
svcrdma: Select NFSv4.1 backchannel transport based on forward channel
The current code always selects XPRT_TRANSPORT_BC_TCP for the back
channel, even when the forward channel was not TCP (eg, RDMA). When
a 4.1 mount is attempted with RDMA, the server panics in the TCP BC
code when trying to send CB_NULL.
Instead, construct the transport protocol number from the forward
channel transport or'd with XPRT_TRANSPORT_BC. Transports that do
not support bi-directional RPC will not have registered a "BC"
transport, causing create_backchannel_client() to fail immediately.
Fixes: https://bugzilla.linux-nfs.org/show_bug.cgi?id=265
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4callback.c')
| -rw-r--r-- | fs/nfsd/nfs4callback.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index a88a93e09d69..564d72304613 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c | |||
| @@ -689,7 +689,8 @@ static int setup_callback_client(struct nfs4_client *clp, struct nfs4_cb_conn *c | |||
| 689 | clp->cl_cb_session = ses; | 689 | clp->cl_cb_session = ses; |
| 690 | args.bc_xprt = conn->cb_xprt; | 690 | args.bc_xprt = conn->cb_xprt; |
| 691 | args.prognumber = clp->cl_cb_session->se_cb_prog; | 691 | args.prognumber = clp->cl_cb_session->se_cb_prog; |
| 692 | args.protocol = XPRT_TRANSPORT_BC_TCP; | 692 | args.protocol = conn->cb_xprt->xpt_class->xcl_ident | |
| 693 | XPRT_TRANSPORT_BC; | ||
| 693 | args.authflavor = ses->se_cb_sec.flavor; | 694 | args.authflavor = ses->se_cb_sec.flavor; |
| 694 | } | 695 | } |
| 695 | /* Create RPC client */ | 696 | /* Create RPC client */ |
