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>
This commit is contained in:
committed by
J. Bruce Fields
parent
5d6031ca74
commit
3c45ddf823
@@ -692,6 +692,7 @@ static struct svc_xprt_class svc_udp_class = {
|
||||
.xcl_owner = THIS_MODULE,
|
||||
.xcl_ops = &svc_udp_ops,
|
||||
.xcl_max_payload = RPCSVC_MAXPAYLOAD_UDP,
|
||||
.xcl_ident = XPRT_TRANSPORT_UDP,
|
||||
};
|
||||
|
||||
static void svc_udp_init(struct svc_sock *svsk, struct svc_serv *serv)
|
||||
@@ -1292,6 +1293,7 @@ static struct svc_xprt_class svc_tcp_class = {
|
||||
.xcl_owner = THIS_MODULE,
|
||||
.xcl_ops = &svc_tcp_ops,
|
||||
.xcl_max_payload = RPCSVC_MAXPAYLOAD_TCP,
|
||||
.xcl_ident = XPRT_TRANSPORT_TCP,
|
||||
};
|
||||
|
||||
void svc_init_xprt_sock(void)
|
||||
|
||||
Reference in New Issue
Block a user