summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-dont-schedule-new-alarms-after-readmap.patch
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2014-10-10 03:20:04 +0200
committerTudor Florea <tudor.florea@enea.com>2014-10-10 03:20:04 +0200
commit1b8dfe266937a37a4c642f96ceb2347bf4c00a17 (patch)
tree0c6aab146bb3c82efd9c7846a9a4e70dcb0ec84f /meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-dont-schedule-new-alarms-after-readmap.patch
downloadmeta-openembedded-daisy-140929.tar.gz
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-dont-schedule-new-alarms-after-readmap.patch')
-rw-r--r--meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-dont-schedule-new-alarms-after-readmap.patch69
1 files changed, 69 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-dont-schedule-new-alarms-after-readmap.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-dont-schedule-new-alarms-after-readmap.patch
new file mode 100644
index 0000000000..64446874cd
--- /dev/null
+++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-dont-schedule-new-alarms-after-readmap.patch
@@ -0,0 +1,69 @@
1autofs-5.0.7 - don't schedule new alarms after readmap
2
3From: Leonardo Chiquitto <leonardo.lists@gmail.com>
4
5Currently, a new alarm is scheduled every time the daemon receives
6a SIGHUP (map re-read) or SIGUSR1 (forced expiration). Besides that,
7map re-reads started on demand when a map is found to be outdated
8also generate a new alarm.
9
10Once added, these alarms are never deleted and hence increase the
11number of times the daemon wakes up to run the expiration procedure.
12After a couple of months, in setups with many mount points, it's
13normal to see automount waking up every second to handle the
14expiration timer.
15
16This patch removes the alarm scheduling from the readmap cleanup
17routine and makes sure the alarm is re-added after the expiration
18process only when it was not triggered by SIGUSR1.
19
20I couldn't think of any use case to justify keeping these alarms:
21it's critical to have the alarm ticking every timeout/4 seconds,
22but more than one periodic alarm running doesn't seem to make
23sense.
24---
25
26 CHANGELOG | 1 +
27 daemon/state.c | 6 +-----
28 2 files changed, 2 insertions(+), 5 deletions(-)
29
30
31diff --git a/CHANGELOG b/CHANGELOG
32index c9be73e..4cf5621 100644
33--- a/CHANGELOG
34+++ b/CHANGELOG
35@@ -22,6 +22,7 @@
36 - fix init script status return.
37 - fix use get_proximity() without libtirpc.
38 - don't use dirent d_type to filter out files in scandir()
39+- don't schedule new alarms after readmap.
40
41 25/07/2012 autofs-5.0.7
42 =======================
43diff --git a/daemon/state.c b/daemon/state.c
44index b451c56..6e23022 100644
45--- a/daemon/state.c
46+++ b/daemon/state.c
47@@ -144,7 +144,7 @@ void expire_cleanup(void *arg)
48 ap->submount = 2;
49 }
50
51- if (!ap->submount)
52+ if (ap->state == ST_EXPIRE && !ap->submount)
53 alarm_add(ap, ap->exp_runfreq);
54
55 /* FALLTHROUGH */
56@@ -330,13 +330,9 @@ static void do_readmap_cleanup(void *arg)
57 ap = ra->ap;
58
59 st_mutex_lock();
60-
61 ap->readmap_thread = 0;
62 st_set_done(ap);
63- if (!ap->submount)
64- alarm_add(ap, ap->exp_runfreq);
65 st_ready(ap);
66-
67 st_mutex_unlock();
68
69 free(ra);