]> git.pld-linux.org Git - packages/autofs.git/blob - autofs-5.0.2-singleton-host-list.patch
- rel.1, lets try
[packages/autofs.git] / autofs-5.0.2-singleton-host-list.patch
1 diff --git a/CHANGELOG b/CHANGELOG
2 index be50aad..3557b16 100644
3 --- a/CHANGELOG
4 +++ b/CHANGELOG
5 @@ -45,6 +45,7 @@
6  - update negative mount timeout handling.
7  - fix large group handling (Ryan Thomas).
8  - fix for dynamic logging breaking non-sasl build (Guillaume Rousse)
9 +- eliminate NULL proc ping for singleton host or local mounts.
10  
11  18/06/2007 autofs-5.0.2
12  -----------------------
13 diff --git a/modules/replicated.c b/modules/replicated.c
14 index 14b20a9..90b2925 100644
15 --- a/modules/replicated.c
16 +++ b/modules/replicated.c
17 @@ -725,19 +725,21 @@ int prune_host_list(unsigned logopt, struct host **list,
18         while (this && this->proximity == PROXIMITY_LOCAL)
19                 this = this->next;
20  
21 -       proximity = PROXIMITY_LOCAL;
22 -       if (this)
23 -               proximity = this->proximity;
24 +       /*
25 +        * Check for either a list containing only proximity local hosts
26 +        * or a single host entry whose proximity isn't local. If so
27 +        * return immediately as we don't want to add probe latency for
28 +        * the common case of a single filesystem mount request.
29 +        */
30 +       if (!this || !this->next)
31 +               return 1;
32  
33 +       proximity = this->proximity;
34 +       first = this;
35         this = first;
36         while (this) {
37                 struct host *next = this->next;
38  
39 -               if (this->proximity == PROXIMITY_LOCAL) {
40 -                       this = next;
41 -                       continue;
42 -               }
43 -
44                 if (this->proximity != proximity)
45                         break;
46  
47 @@ -758,10 +760,6 @@ int prune_host_list(unsigned logopt, struct host **list,
48  
49         last = this;
50  
51 -       /* If there are only local entries on the list, just return it. */
52 -       if (!first)
53 -               return 0;
54 -
55         /* Select NFS version of highest number of closest servers */
56  
57         v4_tcp_count = v3_tcp_count = v2_tcp_count = 0;
This page took 0.033928 seconds and 3 git commands to generate.