Contents of /trunk/glibc/patches/glibc-2.15-negative-result-cache.patch
Parent Directory
|
Revision Log
Revision 1806 -
(show annotations)
(download)
Tue Jun 12 12:33:27 2012 UTC (11 years, 11 months ago) by niro
File size: 5653 byte(s)
Tue Jun 12 12:33:27 2012 UTC (11 years, 11 months ago) by niro
File size: 5653 byte(s)
-added patches for 2.15-r1
1 | diff --git a/nscd/aicache.c b/nscd/aicache.c |
2 | index aaaf80d..e1f1244 100644 |
3 | --- a/nscd/aicache.c |
4 | +++ b/nscd/aicache.c |
5 | @@ -1,5 +1,5 @@ |
6 | /* Cache handling for host lookup. |
7 | - Copyright (C) 2004-2008, 2009, 2010, 2011 Free Software Foundation, Inc. |
8 | + Copyright (C) 2004-2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. |
9 | This file is part of the GNU C Library. |
10 | Contributed by Ulrich Drepper <drepper@redhat.com>, 2004. |
11 | |
12 | @@ -514,8 +514,9 @@ next_nip: |
13 | if (fd != -1) |
14 | TEMP_FAILURE_RETRY (send (fd, ¬found, total, MSG_NOSIGNAL)); |
15 | |
16 | - /* If we cannot permanently store the result, so be it. */ |
17 | - if (__builtin_expect (db->negtimeout == 0, 0)) |
18 | + /* If we have a transient error or cannot permanently store the |
19 | + result, so be it. */ |
20 | + if (rc4 == EAGAIN || __builtin_expect (db->negtimeout == 0, 0)) |
21 | { |
22 | /* Mark the old entry as obsolete. */ |
23 | if (dh != NULL) |
24 | diff --git a/nscd/grpcache.c b/nscd/grpcache.c |
25 | index e9607c6..a698f36 100644 |
26 | --- a/nscd/grpcache.c |
27 | +++ b/nscd/grpcache.c |
28 | @@ -1,5 +1,5 @@ |
29 | /* Cache handling for group lookup. |
30 | - Copyright (C) 1998-2008, 2009, 2011 Free Software Foundation, Inc. |
31 | + Copyright (C) 1998-2008, 2009, 2011, 2012 Free Software Foundation, Inc. |
32 | This file is part of the GNU C Library. |
33 | Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. |
34 | |
35 | @@ -120,8 +120,9 @@ cache_addgr (struct database_dyn *db, int fd, request_header *req, |
36 | else |
37 | written = total; |
38 | |
39 | - /* If we cannot permanently store the result, so be it. */ |
40 | - if (db->negtimeout == 0) |
41 | + /* If we have a transient error or cannot permanently store |
42 | + the result, so be it. */ |
43 | + if (errno == EAGAIN || __builtin_expect (db->negtimeout == 0, 0)) |
44 | { |
45 | /* Mark the old entry as obsolete. */ |
46 | if (dh != NULL) |
47 | diff --git a/nscd/hstcache.c b/nscd/hstcache.c |
48 | index 4d68ade..c72feaa 100644 |
49 | --- a/nscd/hstcache.c |
50 | +++ b/nscd/hstcache.c |
51 | @@ -1,5 +1,5 @@ |
52 | /* Cache handling for host lookup. |
53 | - Copyright (C) 1998-2008, 2009, 2011 Free Software Foundation, Inc. |
54 | + Copyright (C) 1998-2008, 2009, 2011, 2012 Free Software Foundation, Inc. |
55 | This file is part of the GNU C Library. |
56 | Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. |
57 | |
58 | @@ -141,8 +141,9 @@ cache_addhst (struct database_dyn *db, int fd, request_header *req, |
59 | MSG_NOSIGNAL)) != total) |
60 | all_written = false; |
61 | |
62 | - /* If we cannot permanently store the result, so be it. */ |
63 | - if (__builtin_expect (db->negtimeout == 0, 0)) |
64 | + /* If we have a transient error or cannot permanently store |
65 | + the result, so be it. */ |
66 | + if (errval == EAGAIN || __builtin_expect (db->negtimeout == 0, 0)) |
67 | { |
68 | /* Mark the old entry as obsolete. */ |
69 | if (dh != NULL) |
70 | diff --git a/nscd/initgrcache.c b/nscd/initgrcache.c |
71 | index 4ac9942..2019991 100644 |
72 | --- a/nscd/initgrcache.c |
73 | +++ b/nscd/initgrcache.c |
74 | @@ -1,5 +1,5 @@ |
75 | /* Cache handling for host lookup. |
76 | - Copyright (C) 2004-2006, 2008, 2009, 2011 Free Software Foundation, Inc. |
77 | + Copyright (C) 2004-2006, 2008, 2009, 2011, 2012 Free Software Foundation, Inc. |
78 | This file is part of the GNU C Library. |
79 | Contributed by Ulrich Drepper <drepper@redhat.com>, 2004. |
80 | |
81 | @@ -202,8 +202,9 @@ addinitgroupsX (struct database_dyn *db, int fd, request_header *req, |
82 | written = TEMP_FAILURE_RETRY (send (fd, ¬found, total, |
83 | MSG_NOSIGNAL)); |
84 | |
85 | - /* If we cannot permanently store the result, so be it. */ |
86 | - if (__builtin_expect (db->negtimeout == 0, 0)) |
87 | + /* If we have a transient error or cannot permanently store |
88 | + the result, so be it. */ |
89 | + if (all_tryagain || __builtin_expect (db->negtimeout == 0, 0)) |
90 | { |
91 | /* Mark the old entry as obsolete. */ |
92 | if (dh != NULL) |
93 | diff --git a/nscd/pwdcache.c b/nscd/pwdcache.c |
94 | index 49e130c..e2ba09d 100644 |
95 | --- a/nscd/pwdcache.c |
96 | +++ b/nscd/pwdcache.c |
97 | @@ -1,5 +1,5 @@ |
98 | /* Cache handling for passwd lookup. |
99 | - Copyright (C) 1998-2008, 2009, 2011 Free Software Foundation, Inc. |
100 | + Copyright (C) 1998-2008, 2009, 2011, 2012 Free Software Foundation, Inc. |
101 | This file is part of the GNU C Library. |
102 | Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. |
103 | |
104 | @@ -124,8 +124,9 @@ cache_addpw (struct database_dyn *db, int fd, request_header *req, |
105 | written = TEMP_FAILURE_RETRY (send (fd, ¬found, total, |
106 | MSG_NOSIGNAL)); |
107 | |
108 | - /* If we cannot permanently store the result, so be it. */ |
109 | - if (__builtin_expect (db->negtimeout == 0, 0)) |
110 | + /* If we have a transient error or cannot permanently store |
111 | + the result, so be it. */ |
112 | + if (errno == EAGAIN || __builtin_expect (db->negtimeout == 0, 0)) |
113 | { |
114 | /* Mark the old entry as obsolete. */ |
115 | if (dh != NULL) |
116 | diff --git a/nscd/servicescache.c b/nscd/servicescache.c |
117 | index d3d5dce..a6337e3 100644 |
118 | --- a/nscd/servicescache.c |
119 | +++ b/nscd/servicescache.c |
120 | @@ -1,5 +1,5 @@ |
121 | /* Cache handling for services lookup. |
122 | - Copyright (C) 2007, 2008, 2009, 2011 Free Software Foundation, Inc. |
123 | + Copyright (C) 2007, 2008, 2009, 2011, 2012 Free Software Foundation, Inc. |
124 | This file is part of the GNU C Library. |
125 | Contributed by Ulrich Drepper <drepper@drepper.com>, 2007. |
126 | |
127 | @@ -108,8 +108,9 @@ cache_addserv (struct database_dyn *db, int fd, request_header *req, |
128 | written = TEMP_FAILURE_RETRY (send (fd, ¬found, total, |
129 | MSG_NOSIGNAL)); |
130 | |
131 | - /* If we cannot permanently store the result, so be it. */ |
132 | - if (__builtin_expect (db->negtimeout == 0, 0)) |
133 | + /* If we have a transient error or cannot permanently store |
134 | + the result, so be it. */ |
135 | + if (errval == EAGAIN || __builtin_expect (db->negtimeout == 0, 0)) |
136 | { |
137 | /* Mark the old entry as obsolete. */ |
138 | if (dh != NULL) |