|
|
213b36 |
autofs-5.1.6 - mount_nfs.c fix local rdma share not mounting
|
|
|
213b36 |
|
|
|
213b36 |
From: Achilles Gaikwad <agaikwad@redhat.com>
|
|
|
213b36 |
|
|
|
213b36 |
When using the same system as nfs-server and nfs-client, and
|
|
|
213b36 |
using `nobind` option for autofs we would fall to the code where
|
|
|
213b36 |
we let `mount.nfs(8)` to handle the mount. However, when the
|
|
|
213b36 |
nfs-server and the nfs-client is the same system we end up calling
|
|
|
213b36 |
`rpc_ping` which gives negative return code. Due to this we fall to
|
|
|
213b36 |
the label next: and never attempt a mount of nfs share.
|
|
|
213b36 |
This patch fixes this BUG by not probing rpc_ping if we're
|
|
|
213b36 |
using rdma.
|
|
|
213b36 |
|
|
|
213b36 |
Signed-off-by: Achilles Gaikwad <agaikwad@redhat.com>
|
|
|
213b36 |
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
|
213b36 |
---
|
|
|
213b36 |
CHANGELOG | 1 +
|
|
|
213b36 |
modules/mount_nfs.c | 9 +++++++--
|
|
|
213b36 |
2 files changed, 8 insertions(+), 2 deletions(-)
|
|
|
213b36 |
|
|
|
213b36 |
--- autofs-5.1.4.orig/CHANGELOG
|
|
|
213b36 |
+++ autofs-5.1.4/CHANGELOG
|
|
|
213b36 |
@@ -81,6 +81,7 @@ xx/xx/2018 autofs-5.1.5
|
|
|
213b36 |
- initialize struct addrinfo for getaddrinfo() calls.
|
|
|
213b36 |
- fix quoted string length calc in expandsunent().
|
|
|
213b36 |
- fix autofs mount options construction.
|
|
|
213b36 |
+- mount_nfs.c fix local rdma share not mounting.
|
|
|
213b36 |
|
|
|
213b36 |
19/12/2017 autofs-5.1.4
|
|
|
213b36 |
- fix spec file url.
|
|
|
213b36 |
--- autofs-5.1.4.orig/modules/mount_nfs.c
|
|
|
213b36 |
+++ autofs-5.1.4/modules/mount_nfs.c
|
|
|
213b36 |
@@ -375,9 +375,14 @@ dont_probe:
|
|
|
213b36 |
*/
|
|
|
213b36 |
if (this->proximity == PROXIMITY_LOCAL) {
|
|
|
213b36 |
char *host = this->name ? this->name : "localhost";
|
|
|
213b36 |
- int ret;
|
|
|
213b36 |
+ int ret = 1;
|
|
|
213b36 |
|
|
|
213b36 |
- ret = rpc_ping(host, port, vers, 2, 0, RPC_CLOSE_DEFAULT);
|
|
|
213b36 |
+ /* If we're using RDMA, rpc_ping will fail when
|
|
|
213b36 |
+ * nfs-server is local. Therefore, don't probe
|
|
|
213b36 |
+ * when we're using RDMA.
|
|
|
213b36 |
+ */
|
|
|
213b36 |
+ if(!rdma)
|
|
|
213b36 |
+ ret = rpc_ping(host, port, vers, 2, 0, RPC_CLOSE_DEFAULT);
|
|
|
213b36 |
if (ret <= 0)
|
|
|
213b36 |
goto next;
|
|
|
213b36 |
}
|