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:
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, 0 insertions, 69 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
deleted file mode 100644
index 64446874c..000000000
--- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-dont-schedule-new-alarms-after-readmap.patch
+++ /dev/null
@@ -1,69 +0,0 @@
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);