Blame SOURCES/autofs-5.0.7-dont-probe-rdma-mounts.patch

304803
autofs-5.0.7 - dont probe rdma mounts
304803
304803
From: Ian Kent <raven@themaw.net>
304803
304803
Since the change to pass text nfs mount options drectly to the kernel all autofs
304803
mount requests now probe server availability. This was because of long delays
304803
mounting from servers that aren't responding.
304803
304803
This caused mounts requesting the rdma protocol to fail if udp or tcp was also
304803
not available from the server.
304803
304803
Since, AFAICT the rmda protocol can't be used with RPC fromn userspace, the only
304803
way to work around it is to not probe servers when rdma is requested.
304803
---
304803
 CHANGELOG           |    1 +
304803
 modules/mount_nfs.c |   13 ++++++++++++-
304803
 2 files changed, 13 insertions(+), 1 deletion(-)
304803
304803
diff --git a/CHANGELOG b/CHANGELOG
304803
index 50e83d7..f9bc987 100644
304803
--- a/CHANGELOG
304803
+++ b/CHANGELOG
304803
@@ -44,6 +44,7 @@
304803
 - document allowed map sources in auto.master.
304803
 - add enable sloppy mount option to configure.
304803
 - fix interface address null check.
304803
+- dont probe rdma mounts.
304803
 
304803
 25/07/2012 autofs-5.0.7
304803
 =======================
304803
diff --git a/modules/mount_nfs.c b/modules/mount_nfs.c
304803
index e61320b..5424d74 100644
304803
--- a/modules/mount_nfs.c
304803
+++ b/modules/mount_nfs.c
304803
@@ -71,6 +71,7 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int
304803
 	int nosymlink = 0;
304803
 	int port = -1;
304803
 	int ro = 0;            /* Set if mount bind should be read-only */
304803
+	int rdma = 0;
304803
 
304803
 	if (ap->flags & MOUNT_FLAG_REMOUNT)
304803
 		return 0;
304803
@@ -124,6 +125,11 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int
304803
 				end--;
304803
 
304803
 			o_len = end - cp + 1;
304803
+
304803
+			if (strncmp("proto=rdma", cp, o_len) == 0 ||
304803
+				   strncmp("rdma", cp, o_len) == 0)
304803
+				rdma = 1;
304803
+
304803
 			if (strncmp("nosymlink", cp, o_len) == 0) {
304803
 				warn(ap->logopt, MODPREFIX
304803
 				     "the \"nosymlink\" option is depricated "
304803
@@ -170,7 +176,12 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int
304803
 		info(ap->logopt, MODPREFIX "no hosts available");
304803
 		return 1;
304803
 	}
304803
-	prune_host_list(ap->logopt, &hosts, vers, port);
304803
+	/*
304803
+	 * We can't probe protocol rdma so leave it to mount.nfs(8)
304803
+	 * and and suffer the delay if a server isn't available.
304803
+	 */
304803
+	if (!rdma)
304803
+		prune_host_list(ap->logopt, &hosts, vers, port);
304803
 
304803
 	if (!hosts) {
304803
 		info(ap->logopt, MODPREFIX "no hosts available");