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

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