~ubuntu-branches/ubuntu/precise/autofs5/precise

« back to all changes in this revision

Viewing changes to debian/patches/autofs-5.0.5-reset-negative-status-on-cache-prune.patch

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2011-07-03 14:35:46 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110703143546-nej26krjij0rf792
Tags: 5.0.6-0ubuntu1
* New upstream release:
  - Dropped upstream patches 
  - Refreshed debian/patches/17ld.patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
autofs-5.0.5 - reset negative status on cache prune
2
 
 
3
 
From: Ian Kent <raven@themaw.net>
4
 
 
5
 
When we prune the cache we should reset time of last fail for valid map
6
 
entries so that, on a HUP signal, we force an entry update on next mount
7
 
attempt.
8
 
---
9
 
 
10
 
 CHANGELOG       |    1 +
11
 
 daemon/lookup.c |    5 +++++
12
 
 2 files changed, 6 insertions(+), 0 deletions(-)
13
 
 
14
 
 
15
 
diff --git a/CHANGELOG b/CHANGELOG
16
 
index 8b12bbe..d7d8512 100644
17
 
--- a/CHANGELOG
18
 
+++ b/CHANGELOG
19
 
@@ -70,6 +70,7 @@
20
 
 - fix out of order locking in readmap.
21
 
 - include ip address in debug logging.
22
 
 - mount using address for DNS round robin host names.
23
 
+- reset negative status on cache prune.
24
 
 
25
 
 03/09/2009 autofs-5.0.5
26
 
 -----------------------
27
 
diff --git a/daemon/lookup.c b/daemon/lookup.c
28
 
index 0f7051b..958d8cc 100644
29
 
--- a/daemon/lookup.c
30
 
+++ b/daemon/lookup.c
31
 
@@ -1034,6 +1034,11 @@ void lookup_prune_one_cache(struct autofs_point *ap, struct mapent_cache *mc, ti
32
 
                char *key = NULL, *next_key = NULL;
33
 
 
34
 
                if (me->age >= age) {
35
 
+                       /*
36
 
+                        * Reset time of last fail for valid map entries to
37
 
+                        * force entry update and subsequent mount retry.
38
 
+                        */
39
 
+                       me->status = 0;
40
 
                        me = cache_enumerate(mc, me);
41
 
                        continue;
42
 
                }