autofs-5.1.6 - mount_nfs.c fix local rdma share not mounting From: Achilles Gaikwad When using the same system as nfs-server and nfs-client, and using `nobind` option for autofs we would fall to the code where we let `mount.nfs(8)` to handle the mount. However, when the nfs-server and the nfs-client is the same system we end up calling `rpc_ping` which gives negative return code. Due to this we fall to the label next: and never attempt a mount of nfs share. This patch fixes this BUG by not probing rpc_ping if we're using rdma. Signed-off-by: Achilles Gaikwad Signed-off-by: Ian Kent --- CHANGELOG | 1 + modules/mount_nfs.c | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 2565b04d..4dc1b179 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -11,6 +11,7 @@ xx/xx/2020 autofs-5.1.7 - initialize struct addrinfo for getaddrinfo() calls. - fix quoted string length calc in expandsunent(). - fix autofs mount options construction. +- mount_nfs.c fix local rdma share not mounting. 07/10/2019 autofs-5.1.6 - support strictexpire mount option. diff --git a/modules/mount_nfs.c b/modules/mount_nfs.c index 4e3e703f..f1b3fb3a 100644 --- a/modules/mount_nfs.c +++ b/modules/mount_nfs.c @@ -375,9 +375,14 @@ dont_probe: */ if (this->proximity == PROXIMITY_LOCAL) { char *host = this->name ? this->name : "localhost"; - int ret; - - ret = rpc_ping(host, port, vers, 2, 0, RPC_CLOSE_DEFAULT); + int ret = 1; + + /* If we're using RDMA, rpc_ping will fail when + * nfs-server is local. Therefore, don't probe + * when we're using RDMA. + */ + if(!rdma) + ret = rpc_ping(host, port, vers, 2, 0, RPC_CLOSE_DEFAULT); if (ret <= 0) goto next; }