Re: [PATCH] autofs: mount_nfs.c fix local rdma share not mounting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2020-07-19 at 15:14 +0530, Achilles Gaikwad wrote:
> 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.

I made some minor changes to the patch.

In the subject I changed "autofs" to "autofs-5.1.6".
I moved the declare of ret up and added a blank line following it.
I changed the format of the comment a bit (but not the content).

Currently I've pushed all the patches I have to the repo. so
there's no need to keep the patch in the patch queue, waiting
until I'm happy with others before it.

I'll push it to the repo once I've built autofs and used it a
few times just to be sure it's ok.

Thanks
Ian

> 
> Signed-off-by: Achilles Gaikwad <agaikwad@xxxxxxxxxx>
> ---
>  modules/mount_nfs.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/modules/mount_nfs.c b/modules/mount_nfs.c
> index 4e3e703..5a8c3bf 100644
> --- a/modules/mount_nfs.c
> +++ b/modules/mount_nfs.c
> @@ -375,9 +375,13 @@ 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);
> +			/* If we're using RDMA, rpc_ping will fail
> +			 * when nfs-server is local.
> +			 * Therefore, don't probe when we're using RDMA
> +			 */
> +			int ret = 1;
> +			if(!rdma)
> +				ret = rpc_ping(host, port, vers, 2, 0,
> RPC_CLOSE_DEFAULT);
>  			if (ret <= 0)
>  				goto next;
>  		}




[Index of Archives]     [Linux Filesystem Development]     [Linux Ext4]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux