svcrpc: autoload rdma module
Subsystems (3)
PATCH 1/1 svcrpc: autoload rdma module
From: "J. Bruce Fields" <[email protected]>
This should fix failures like:
# rpc.nfsd --rdma rpc.nfsd: Unable to request RDMA services: Protocol not supported
Reported-by Steve Dickson <[email protected]>
Tested-by Steve Dickson <[email protected]>
Signed-off-by J. Bruce Fields <[email protected]>
--- net/sunrpc/svc_xprt.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-)
I'm intending to apply this for 4.7.
net/sunrpc/svc_xprt.c +19 -4
@@ -244,13 +244,12 @@ void svc_add_new_perm_xprt(struct svc_serv *serv, struct svc_xprt *new)svc_xprt_received (new); } -int svc_create_xprt (struct svc_serv *serv,const char *xprt_name, +int _svc_create_xprt (struct svc_serv *serv,const char *xprt_name,struct net *net,const int family,const unsigned short port,int flags) {struct svc_xprt_class *xcl; -dprintk ("svc: creating transport %s[%d]\n" , xprt_name, port);spin_lock (&svc_xprt_class_lock);list_for_each_entry (xcl, &svc_xprt_class_list, xcl_list) {struct svc_xprt *newxprt;
@@ -274,12 +273,28 @@ int svc_create_xprt(struct svc_serv *serv, const char *xprt_name, } err:spin_unlock (&svc_xprt_class_lock); -dprintk ("svc: transport %s not found\n" , xprt_name); -/* This errno is exposed to user space. Provide a reasonable * perror msg for a bad transport. */ return -EPROTONOSUPPORT ; } + +int svc_create_xprt (struct svc_serv *serv,const char *xprt_name, +struct net *net,const int family, +const unsigned short port,int flags) +{ +int err; + +dprintk ("svc: creating transport %s[%d]\n" , xprt_name, port); + err =_svc_create_xprt (serv, xprt_name, net, family, port, flags); +if (err == -EPROTONOSUPPORT ) { +request_module ("svc%s" , xprt_name); + err =_svc_create_xprt (serv, xprt_name, net, family, port, flags); + } +if (err) +dprintk ("svc: transport %s not found, err %d\n" , + xprt_name, err); +return err; +}EXPORT_SYMBOL_GPL (svc_create_xprt);/*
Signature · 1 line
2.5.5
Quoted 13 lines · On May 20, 2016, at 11:48 AM, [email protected] wrote:
From: "J. Bruce Fields" <[email protected]>
This should fix failures like:
# rpc.nfsd --rdma rpc.nfsd: Unable to request RDMA services: Protocol not supportedReported-by Steve Dickson <[email protected]>Tested-by Steve Dickson <[email protected]>Signed-off-by J. Bruce Fields <[email protected]>
Reviewed-by Chuck Lever <[email protected]>
Quoted 63 lines
---
net/sunrpc/svc_xprt.c| 23 +++++++++++++++++++----1 file changed, 19 insertions(+), 4 deletions(-)I'm intending to apply this for 4.7.
net/sunrpc/svc_xprt.c +19
-4@@ -244,13 +244,12 @@ void svc_add_new_perm_xprt(struct svc_serv *serv, struct svc_xprt *new)svc_xprt_received (new); } -int svc_create_xprt (struct svc_serv *serv,const char *xprt_name, +int _svc_create_xprt (struct svc_serv *serv,const char *xprt_name,struct net *net,const int family,const unsigned short port,int flags) {struct svc_xprt_class *xcl; -dprintk ("svc: creating transport %s[%d]\n" , xprt_name, port);spin_lock (&svc_xprt_class_lock);list_for_each_entry (xcl, &svc_xprt_class_list, xcl_list) {struct svc_xprt *newxprt;@@ -274,12 +273,28 @@ int svc_create_xprt(struct svc_serv *serv, const char *xprt_name, } err:spin_unlock (&svc_xprt_class_lock); -dprintk ("svc: transport %s not found\n" , xprt_name); -/* This errno is exposed to user space. Provide a reasonable * perror msg for a bad transport. */ return -EPROTONOSUPPORT ; } + +int svc_create_xprt (struct svc_serv *serv,const char *xprt_name, +struct net *net,const int family, +const unsigned short port,int flags) +{ +int err; + +dprintk ("svc: creating transport %s[%d]\n" , xprt_name, port); + err =_svc_create_xprt (serv, xprt_name, net, family, port, flags); +if (err == -EPROTONOSUPPORT ) { +request_module ("svc%s" , xprt_name); + err =_svc_create_xprt (serv, xprt_name, net, family, port, flags); + } +if (err) +dprintk ("svc: transport %s not found, err %d\n" , + xprt_name, err); +return err; +}EXPORT_SYMBOL_GPL (svc_create_xprt);/* Signature · 6 lines
2.5.5 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Chuck Lever