Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
30046dce
Commit
30046dce
authored
Oct 21, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make EXP_NukeOne() make do with a struct worker arg instead of sess.
parent
da68c3aa
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
10 deletions
+9
-10
cache.h
bin/varnishd/cache.h
+1
-1
cache_center.c
bin/varnishd/cache_center.c
+2
-2
cache_expire.c
bin/varnishd/cache_expire.c
+4
-4
cache_http.c
bin/varnishd/cache_http.c
+0
-1
stevedore.c
bin/varnishd/storage/stevedore.c
+2
-2
No files found.
bin/varnishd/cache.h
View file @
30046dce
...
...
@@ -697,7 +697,7 @@ void EXP_Inject(struct objcore *oc, struct lru *lru, double when);
void
EXP_Init
(
void
);
void
EXP_Rearm
(
const
struct
object
*
o
);
int
EXP_Touch
(
struct
objcore
*
oc
);
int
EXP_NukeOne
(
const
struct
sess
*
sp
,
struct
lru
*
lru
);
int
EXP_NukeOne
(
struct
worker
*
w
,
struct
lru
*
lru
);
/* cache_fetch.c */
struct
storage
*
FetchStorage
(
const
struct
sess
*
sp
,
ssize_t
sz
);
...
...
bin/varnishd/cache_center.c
View file @
30046dce
...
...
@@ -440,8 +440,8 @@ cnt_error(struct sess *sp)
&
w
->
exp
,
(
uint16_t
)
params
->
http_max_hdr
);
if
(
sp
->
obj
==
NULL
)
sp
->
obj
=
STV_NewObject
(
sp
,
TRANSIENT_STORAGE
,
params
->
http_resp_size
,
&
w
->
exp
,
(
uint16_t
)
params
->
http_max_hdr
);
params
->
http_resp_size
,
&
w
->
exp
,
(
uint16_t
)
params
->
http_max_hdr
);
if
(
sp
->
obj
==
NULL
)
{
sp
->
doclose
=
"Out of objects"
;
sp
->
director
=
NULL
;
...
...
bin/varnishd/cache_expire.c
View file @
30046dce
...
...
@@ -414,7 +414,7 @@ exp_timer(struct sess *sp, void *priv)
*/
int
EXP_NukeOne
(
const
struct
sess
*
sp
,
struct
lru
*
lru
)
EXP_NukeOne
(
struct
worker
*
w
,
struct
lru
*
lru
)
{
struct
objcore
*
oc
;
struct
object
*
o
;
...
...
@@ -446,9 +446,9 @@ EXP_NukeOne(const struct sess *sp, struct lru *lru)
return
(
-
1
);
/* XXX: bad idea for -spersistent */
o
=
oc_getobj
(
sp
->
wrk
,
oc
);
WSL
(
sp
->
wrk
,
SLT_ExpKill
,
0
,
"%u LRU"
,
o
->
xid
);
(
void
)
HSH_Deref
(
sp
->
wrk
,
NULL
,
&
o
);
o
=
oc_getobj
(
w
,
oc
);
WSL
(
w
,
SLT_ExpKill
,
0
,
"%u LRU"
,
o
->
xid
);
(
void
)
HSH_Deref
(
w
,
NULL
,
&
o
);
return
(
1
);
}
...
...
bin/varnishd/cache_http.c
View file @
30046dce
...
...
@@ -1001,7 +1001,6 @@ http_PutResponse(struct worker *w, unsigned vsl_id, const struct http *to,
if
(
to
->
hd
[
HTTP_HDR_RESPONSE
].
b
==
NULL
)
http_SetH
(
to
,
HTTP_HDR_RESPONSE
,
"Lost Response"
);
Tcheck
(
to
->
hd
[
HTTP_HDR_RESPONSE
]);
}
void
...
...
bin/varnishd/storage/stevedore.c
View file @
30046dce
...
...
@@ -184,7 +184,7 @@ stv_alloc(const struct sess *sp, size_t size)
}
/* no luck; try to free some space and keep trying */
if
(
EXP_NukeOne
(
sp
,
stv
->
lru
)
==
-
1
)
if
(
EXP_NukeOne
(
sp
->
wrk
,
stv
->
lru
)
==
-
1
)
break
;
/* Enough is enough: try another if we have one */
...
...
@@ -336,7 +336,7 @@ STV_NewObject(struct sess *sp, const char *hint, unsigned wsl, struct exp *ep,
if
(
o
==
NULL
)
{
/* no luck; try to free some space and keep trying */
for
(
i
=
0
;
o
==
NULL
&&
i
<
params
->
nuke_limit
;
i
++
)
{
if
(
EXP_NukeOne
(
sp
,
stv
->
lru
)
==
-
1
)
if
(
EXP_NukeOne
(
sp
->
wrk
,
stv
->
lru
)
==
-
1
)
break
;
o
=
stv
->
allocobj
(
stv
,
sp
,
ltot
,
&
soc
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment