提交 cdd9ade7 编写于 作者: C Chuck Lever 提交者: Anna Schumaker

xprtrdma: mount reports "Invalid mount option" if memreg mode not supported

If the selected memory registration mode is not supported by the
underlying provider/HCA, the NFS mount command reports that there was
an invalid mount option, and fails. This is misleading.

Reporting a problem allocating memory is a lot closer to the truth.
Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
上级 f10eafd3
...@@ -513,7 +513,7 @@ rpcrdma_ia_open(struct rpcrdma_xprt *xprt, struct sockaddr *addr, int memreg) ...@@ -513,7 +513,7 @@ rpcrdma_ia_open(struct rpcrdma_xprt *xprt, struct sockaddr *addr, int memreg)
#if RPCRDMA_PERSISTENT_REGISTRATION #if RPCRDMA_PERSISTENT_REGISTRATION
memreg = RPCRDMA_ALLPHYSICAL; memreg = RPCRDMA_ALLPHYSICAL;
#else #else
rc = -EINVAL; rc = -ENOMEM;
goto out2; goto out2;
#endif #endif
} }
...@@ -554,9 +554,9 @@ rpcrdma_ia_open(struct rpcrdma_xprt *xprt, struct sockaddr *addr, int memreg) ...@@ -554,9 +554,9 @@ rpcrdma_ia_open(struct rpcrdma_xprt *xprt, struct sockaddr *addr, int memreg)
} }
break; break;
default: default:
printk(KERN_ERR "%s: invalid memory registration mode %d\n", printk(KERN_ERR "RPC: Unsupported memory "
__func__, memreg); "registration mode: %d\n", memreg);
rc = -EINVAL; rc = -ENOMEM;
goto out2; goto out2;
} }
dprintk("RPC: %s: memory registration strategy is %d\n", dprintk("RPC: %s: memory registration strategy is %d\n",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册