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