For amd format maps it's better to not expire away submounts (amd type "auto" mounts) straight way. This is because of the common heavy reuse of maps in amd maps and we want to try and avoid constantly re-reading large maps. Signed-off-by: Ian Kent <raven@xxxxxxxxxx> --- CHANGELOG | 1 + daemon/state.c | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index eaff2de..a456146 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -48,6 +48,7 @@ xx/xx/2016 autofs-5.1.3 - handle map_option cache for top level mounts. - handle amd cache option all in amd type auto mounts. - fix bogus check in expire_cleanup(). +- delay submount exit for amd submounts. 15/06/2016 autofs-5.1.2 ======================= diff --git a/daemon/state.c b/daemon/state.c index 41a5f6a..be5a834 100644 --- a/daemon/state.c +++ b/daemon/state.c @@ -132,15 +132,27 @@ void expire_cleanup(void *arg) * mount expires in a reasonable time. Just skip * one expire check after it's no longer busy before * allowing it to shutdown. + * + * But if this mount point is an amd format map it + * is better to keep the mount around longer. This + * is because of the common heavy reuse of maps in + * amd maps and we want to try and avoid constantly + * re-reading large maps. */ if (ap->submount && !success) { rv = ops->askumount(ap->logopt, ap->ioctlfd, &idle); if (!rv && idle && ap->submount > 1) { - next = ST_SHUTDOWN_PENDING; - break; + struct map_source *map = ap->entry->maps; + + if (ap->submount > 4 || + !(map->flags & MAP_FLAG_FORMAT_AMD)) { + next = ST_SHUTDOWN_PENDING; + break; + } } ap->submount++; - } + } else if (ap->submount > 1) + ap->submount = 1; if (ap->state == ST_EXPIRE && !ap->submount) alarm_add(ap, ap->exp_runfreq); -- To unsubscribe from this list: send the line "unsubscribe autofs" in