diff options
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.patch | 69 |
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 @@ | |||
1 | autofs-5.0.7 - don't schedule new alarms after readmap | ||
2 | |||
3 | From: Leonardo Chiquitto <leonardo.lists@gmail.com> | ||
4 | |||
5 | Currently, a new alarm is scheduled every time the daemon receives | ||
6 | a SIGHUP (map re-read) or SIGUSR1 (forced expiration). Besides that, | ||
7 | map re-reads started on demand when a map is found to be outdated | ||
8 | also generate a new alarm. | ||
9 | |||
10 | Once added, these alarms are never deleted and hence increase the | ||
11 | number of times the daemon wakes up to run the expiration procedure. | ||
12 | After a couple of months, in setups with many mount points, it's | ||
13 | normal to see automount waking up every second to handle the | ||
14 | expiration timer. | ||
15 | |||
16 | This patch removes the alarm scheduling from the readmap cleanup | ||
17 | routine and makes sure the alarm is re-added after the expiration | ||
18 | process only when it was not triggered by SIGUSR1. | ||
19 | |||
20 | I couldn't think of any use case to justify keeping these alarms: | ||
21 | it's critical to have the alarm ticking every timeout/4 seconds, | ||
22 | but more than one periodic alarm running doesn't seem to make | ||
23 | sense. | ||
24 | --- | ||
25 | |||
26 | CHANGELOG | 1 + | ||
27 | daemon/state.c | 6 +----- | ||
28 | 2 files changed, 2 insertions(+), 5 deletions(-) | ||
29 | |||
30 | |||
31 | diff --git a/CHANGELOG b/CHANGELOG | ||
32 | index 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 | ======================= | ||
43 | diff --git a/daemon/state.c b/daemon/state.c | ||
44 | index 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); | ||