|
|
306fa1 |
autofs-5.1.0 - fix hosts map update on reload
|
|
|
306fa1 |
|
|
|
306fa1 |
From: Ian Kent <ikent@redhat.com>
|
|
|
306fa1 |
|
|
|
306fa1 |
Commit aedfd5aa - "amd lookup fix host mount naming" introduced a
|
|
|
306fa1 |
regression when updating sun format maps.
|
|
|
306fa1 |
|
|
|
306fa1 |
The amd host mount type assumes the lookup name is the host name for
|
|
|
306fa1 |
the host mount but amd uses ${rhost} for this.
|
|
|
306fa1 |
|
|
|
306fa1 |
This introduces the possibility of multiple concurrent mount requests
|
|
|
306fa1 |
since constructing a mount tree that isn't under the lookup name can't
|
|
|
306fa1 |
take advantage of the kernel queuing of other concurrent lookups while
|
|
|
306fa1 |
the mount tree is constructed.
|
|
|
306fa1 |
|
|
|
306fa1 |
Consequently multi-mount updates (currently only done for the internal
|
|
|
306fa1 |
hosts map which the amd parser also uses for its hosts map) can't be
|
|
|
306fa1 |
allowed for amd mounts.
|
|
|
306fa1 |
---
|
|
|
306fa1 |
CHANGELOG | 1 +
|
|
|
306fa1 |
modules/parse_sun.c | 37 ++++++++++++++++++++++++++++---------
|
|
|
306fa1 |
2 files changed, 29 insertions(+), 9 deletions(-)
|
|
|
306fa1 |
|
|
|
306fa1 |
--- autofs-5.0.7.orig/CHANGELOG
|
|
|
306fa1 |
+++ autofs-5.0.7/CHANGELOG
|
|
|
306fa1 |
@@ -158,6 +158,7 @@
|
|
|
306fa1 |
- update man page autofs(8) for systemd.
|
|
|
306fa1 |
- fix fix master map type check.
|
|
|
306fa1 |
- fix typo in update_hosts_mounts().
|
|
|
306fa1 |
+- fix hosts map update on reload.
|
|
|
306fa1 |
|
|
|
306fa1 |
25/07/2012 autofs-5.0.7
|
|
|
306fa1 |
=======================
|
|
|
306fa1 |
--- autofs-5.0.7.orig/modules/parse_sun.c
|
|
|
306fa1 |
+++ autofs-5.0.7/modules/parse_sun.c
|
|
|
306fa1 |
@@ -1356,16 +1356,35 @@ int parse_mount(struct autofs_point *ap,
|
|
|
306fa1 |
}
|
|
|
306fa1 |
|
|
|
306fa1 |
cache_multi_writelock(me);
|
|
|
306fa1 |
- /* Someone beat us to it, return success */
|
|
|
306fa1 |
- if (me->multi) {
|
|
|
306fa1 |
- free(options);
|
|
|
306fa1 |
- cache_multi_unlock(me);
|
|
|
306fa1 |
- cache_unlock(mc);
|
|
|
306fa1 |
- pthread_setcancelstate(cur_state, NULL);
|
|
|
306fa1 |
- return 0;
|
|
|
306fa1 |
- }
|
|
|
306fa1 |
/* So we know we're the multi-mount root */
|
|
|
306fa1 |
- me->multi = me;
|
|
|
306fa1 |
+ if (!me->multi)
|
|
|
306fa1 |
+ me->multi = me;
|
|
|
306fa1 |
+ else {
|
|
|
306fa1 |
+ /*
|
|
|
306fa1 |
+ * The amd host mount type assumes the lookup name
|
|
|
306fa1 |
+ * is the host name for the host mount but amd uses
|
|
|
306fa1 |
+ * ${rhost} for this.
|
|
|
306fa1 |
+ *
|
|
|
306fa1 |
+ * This introduces the possibility of multiple
|
|
|
306fa1 |
+ * concurrent mount requests since constructing a
|
|
|
306fa1 |
+ * mount tree that isn't under the lookup name can't
|
|
|
306fa1 |
+ * take advantage of the kernel queuing of other
|
|
|
306fa1 |
+ * concurrent lookups while the mount tree is
|
|
|
306fa1 |
+ * constructed.
|
|
|
306fa1 |
+ *
|
|
|
306fa1 |
+ * Consequently multi-mount updates (currently only
|
|
|
306fa1 |
+ * done for the internal hosts map which the amd
|
|
|
306fa1 |
+ * parser also uses for its hosts map) can't be
|
|
|
306fa1 |
+ * allowed for amd mounts.
|
|
|
306fa1 |
+ */
|
|
|
306fa1 |
+ if (source->flags & MAP_FLAG_FORMAT_AMD) {
|
|
|
306fa1 |
+ free(options);
|
|
|
306fa1 |
+ cache_multi_unlock(me);
|
|
|
306fa1 |
+ cache_unlock(mc);
|
|
|
306fa1 |
+ pthread_setcancelstate(cur_state, NULL);
|
|
|
306fa1 |
+ return 0;
|
|
|
306fa1 |
+ }
|
|
|
306fa1 |
+ }
|
|
|
306fa1 |
|
|
|
306fa1 |
age = me->age;
|
|
|
306fa1 |
|