diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2014-05-28 10:33:00 -0400 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2014-06-04 08:56:39 -0400 |
commit | cdd9ade711599e7672a635add0406080856f8b92 (patch) | |
tree | 9e6ca370dbb72c5cb5e17a824aafcab97651a68c /net/sunrpc | |
parent | f10eafd3a6ce9da7e96999c124b643ea6c4921f3 (diff) |
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: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/xprtrdma/verbs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c index a3527989f5b3..7c7e9b41f43f 100644 --- a/net/sunrpc/xprtrdma/verbs.c +++ b/net/sunrpc/xprtrdma/verbs.c | |||
@@ -513,7 +513,7 @@ rpcrdma_ia_open(struct rpcrdma_xprt *xprt, struct sockaddr *addr, int memreg) | |||
513 | #if RPCRDMA_PERSISTENT_REGISTRATION | 513 | #if RPCRDMA_PERSISTENT_REGISTRATION |
514 | memreg = RPCRDMA_ALLPHYSICAL; | 514 | memreg = RPCRDMA_ALLPHYSICAL; |
515 | #else | 515 | #else |
516 | rc = -EINVAL; | 516 | rc = -ENOMEM; |
517 | goto out2; | 517 | goto out2; |
518 | #endif | 518 | #endif |
519 | } | 519 | } |
@@ -554,9 +554,9 @@ rpcrdma_ia_open(struct rpcrdma_xprt *xprt, struct sockaddr *addr, int memreg) | |||
554 | } | 554 | } |
555 | break; | 555 | break; |
556 | default: | 556 | default: |
557 | printk(KERN_ERR "%s: invalid memory registration mode %d\n", | 557 | printk(KERN_ERR "RPC: Unsupported memory " |
558 | __func__, memreg); | 558 | "registration mode: %d\n", memreg); |
559 | rc = -EINVAL; | 559 | rc = -ENOMEM; |
560 | goto out2; | 560 | goto out2; |
561 | } | 561 | } |
562 | dprintk("RPC: %s: memory registration strategy is %d\n", | 562 | dprintk("RPC: %s: memory registration strategy is %d\n", |