|
Ian Kent |
ca38f0 |
autofs-5.0.6 - fix not bind mounting local filesystem
|
|
Ian Kent |
ca38f0 |
|
|
Ian Kent |
ca38f0 |
From: Ian Kent <ikent@redhat.com>
|
|
Ian Kent |
ca38f0 |
|
|
Ian Kent |
ca38f0 |
When the --random-multimount-selection (-r) option is used automount(8)
|
|
Ian Kent |
ca38f0 |
won't bind mount a local filesystem. If the filesystem that has been
|
|
Ian Kent |
ca38f0 |
requested is local it should always be used.
|
|
Ian Kent |
ca38f0 |
---
|
|
Ian Kent |
ca38f0 |
|
|
Ian Kent |
ca38f0 |
CHANGELOG | 1 +
|
|
Ian Kent |
ca38f0 |
modules/replicated.c | 12 +++++++-----
|
|
Ian Kent |
ca38f0 |
2 files changed, 8 insertions(+), 5 deletions(-)
|
|
Ian Kent |
ca38f0 |
|
|
Ian Kent |
ca38f0 |
|
|
Ian Kent |
ca38f0 |
diff --git a/CHANGELOG b/CHANGELOG
|
|
Ian Kent |
ca38f0 |
index acc5f0c..7e86c84 100644
|
|
Ian Kent |
ca38f0 |
--- a/CHANGELOG
|
|
Ian Kent |
ca38f0 |
+++ b/CHANGELOG
|
|
Ian Kent |
ca38f0 |
@@ -7,6 +7,7 @@
|
|
Ian Kent |
ca38f0 |
- fix result null check in read_one_map().
|
|
Ian Kent |
ca38f0 |
- fix LDAP result leaks on error paths.
|
|
Ian Kent |
ca38f0 |
- code analysis fixes part 1.
|
|
Ian Kent |
ca38f0 |
+- fix not bind mounting local filesystem.
|
|
Ian Kent |
ca38f0 |
|
|
Ian Kent |
ca38f0 |
28/06/2011 autofs-5.0.6
|
|
Ian Kent |
ca38f0 |
-----------------------
|
|
Ian Kent |
ca38f0 |
diff --git a/modules/replicated.c b/modules/replicated.c
|
|
Ian Kent |
ca38f0 |
index a10a817..eee1a06 100644
|
|
Ian Kent |
ca38f0 |
--- a/modules/replicated.c
|
|
Ian Kent |
ca38f0 |
+++ b/modules/replicated.c
|
|
Ian Kent |
ca38f0 |
@@ -1068,18 +1068,20 @@ static int add_new_host(struct host **list,
|
|
Ian Kent |
ca38f0 |
* We can't use PROXIMITY_LOCAL or we won't perform an RPC ping
|
|
Ian Kent |
ca38f0 |
* to remove hosts that may be down.
|
|
Ian Kent |
ca38f0 |
*/
|
|
Ian Kent |
ca38f0 |
- if (options & MOUNT_FLAG_RANDOM_SELECT)
|
|
Ian Kent |
ca38f0 |
+ if (!host_addr)
|
|
Ian Kent |
ca38f0 |
prx = PROXIMITY_SUBNET;
|
|
Ian Kent |
ca38f0 |
else {
|
|
Ian Kent |
ca38f0 |
prx = get_proximity(host_addr->ai_addr);
|
|
Ian Kent |
ca38f0 |
/*
|
|
Ian Kent |
ca38f0 |
* If we want the weight to be the determining factor
|
|
Ian Kent |
ca38f0 |
- * when selecting a host then all hosts must have the
|
|
Ian Kent |
ca38f0 |
- * same proximity. However, if this is the local machine
|
|
Ian Kent |
ca38f0 |
- * it should always be used since it is certainly available.
|
|
Ian Kent |
ca38f0 |
+ * when selecting a host, or we are using random selection,
|
|
Ian Kent |
ca38f0 |
+ * then all hosts must have the same proximity. However,
|
|
Ian Kent |
ca38f0 |
+ * if this is the local machine it should always be used
|
|
Ian Kent |
ca38f0 |
+ * since it is certainly available.
|
|
Ian Kent |
ca38f0 |
*/
|
|
Ian Kent |
ca38f0 |
if (prx != PROXIMITY_LOCAL &&
|
|
Ian Kent |
ca38f0 |
- (options & MOUNT_FLAG_USE_WEIGHT_ONLY))
|
|
Ian Kent |
ca38f0 |
+ (options & (MOUNT_FLAG_USE_WEIGHT_ONLY |
|
|
Ian Kent |
ca38f0 |
+ MOUNT_FLAG_RANDOM_SELECT)))
|
|
Ian Kent |
ca38f0 |
prx = PROXIMITY_SUBNET;
|
|
Ian Kent |
ca38f0 |
}
|
|
Ian Kent |
ca38f0 |
|