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

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