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
6699df59
Commit
6699df59
authored
Aug 11, 2014
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eliminate bo->fetch_obj
parent
4ee1b911
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
20 deletions
+7
-20
cache.h
bin/varnishd/cache/cache.h
+0
-1
cache_fetch.c
bin/varnishd/cache/cache_fetch.c
+7
-17
cache_panic.c
bin/varnishd/cache/cache_panic.c
+0
-2
No files found.
bin/varnishd/cache/cache.h
View file @
6699df59
...
...
@@ -498,7 +498,6 @@ struct busyobj {
struct
object
*
ims_obj
;
struct
objcore
*
ims_oc
;
struct
objcore
*
fetch_objcore
;
struct
object
*
fetch_obj
;
struct
http_conn
htc
;
...
...
bin/varnishd/cache/cache_fetch.c
View file @
6699df59
...
...
@@ -139,9 +139,6 @@ vbf_beresp2obj(struct busyobj *bo)
CHECK_OBJ_NOTNULL
(
obj
,
OBJECT_MAGIC
);
AZ
(
bo
->
fetch_obj
);
bo
->
fetch_obj
=
obj
;
if
(
vary
!=
NULL
)
{
obj
->
vary
=
(
void
*
)
WS_Copy
(
obj
->
http
->
ws
,
VSB_data
(
vary
),
varyl
);
...
...
@@ -167,6 +164,8 @@ vbf_beresp2obj(struct busyobj *bo)
AZ
(
ObjSetDouble
(
bo
->
vfc
,
OA_LASTMODIFIED
,
floor
(
bo
->
fetch_objcore
->
exp
.
t_origin
)));
bo
->
vfc
->
body
=
obj
->
body
;
return
(
0
);
}
...
...
@@ -398,7 +397,6 @@ vbf_stp_startfetch(struct worker *wrk, struct busyobj *bo)
static
enum
fetch_step
vbf_stp_fetch
(
struct
worker
*
wrk
,
struct
busyobj
*
bo
)
{
struct
object
*
obj
;
CHECK_OBJ_NOTNULL
(
wrk
,
WORKER_MAGIC
);
CHECK_OBJ_NOTNULL
(
bo
,
BUSYOBJ_MAGIC
);
...
...
@@ -478,8 +476,6 @@ vbf_stp_fetch(struct worker *wrk, struct busyobj *bo)
assert
(
WRW_IsReleased
(
wrk
));
obj
=
bo
->
fetch_obj
;
bo
->
vfc
->
body
=
obj
->
body
;
if
(
bo
->
do_gzip
||
(
bo
->
is_gzip
&&
!
bo
->
do_gunzip
))
ObjSetFlag
(
bo
->
vfc
,
OF_GZIPED
,
1
);
...
...
@@ -501,7 +497,7 @@ vbf_stp_fetch(struct worker *wrk, struct busyobj *bo)
assert
(
bo
->
state
==
BOS_REQ_DONE
);
if
(
bo
->
do_stream
)
{
HSH_Unbusy
(
&
wrk
->
stats
,
obj
->
objcore
);
HSH_Unbusy
(
&
wrk
->
stats
,
bo
->
fetch_
objcore
);
VBO_setstate
(
bo
,
BOS_STREAM
);
}
...
...
@@ -517,10 +513,8 @@ vbf_stp_fetch(struct worker *wrk, struct busyobj *bo)
if
(
bo
->
vfc
->
failed
&&
!
bo
->
do_stream
)
{
assert
(
bo
->
state
<
BOS_STREAM
);
if
(
bo
->
fetch_objcore
!=
NULL
)
{
if
(
bo
->
fetch_objcore
!=
NULL
)
ObjFreeObj
(
bo
->
fetch_objcore
,
bo
->
stats
);
bo
->
fetch_obj
=
NULL
;
}
return
(
F_STP_ERROR
);
}
...
...
@@ -531,7 +525,7 @@ vbf_stp_fetch(struct worker *wrk, struct busyobj *bo)
assert
(
bo
->
state
==
BOS_STREAM
);
else
{
assert
(
bo
->
state
==
BOS_REQ_DONE
);
HSH_Unbusy
(
&
wrk
->
stats
,
obj
->
objcore
);
HSH_Unbusy
(
&
wrk
->
stats
,
bo
->
fetch_
objcore
);
}
/* Recycle the backend connection before setting BOS_FINISHED to
...
...
@@ -554,7 +548,6 @@ vbf_stp_fetch(struct worker *wrk, struct busyobj *bo)
static
enum
fetch_step
vbf_stp_condfetch
(
struct
worker
*
wrk
,
struct
busyobj
*
bo
)
{
struct
object
*
obj
;
struct
objiter
*
oi
;
void
*
sp
;
ssize_t
sl
,
al
,
tl
;
...
...
@@ -578,8 +571,6 @@ vbf_stp_condfetch(struct worker *wrk, struct busyobj *bo)
}
AZ
(
vbf_beresp2obj
(
bo
));
obj
=
bo
->
fetch_obj
;
bo
->
vfc
->
body
=
obj
->
body
;
if
(
ObjGetattr
(
bo
->
ims_oc
,
bo
->
stats
,
OA_ESIDATA
,
NULL
)
!=
NULL
)
AZ
(
ObjCopyAttr
(
bo
->
vfc
,
bo
->
ims_oc
,
OA_ESIDATA
));
...
...
@@ -589,7 +580,7 @@ vbf_stp_condfetch(struct worker *wrk, struct busyobj *bo)
AZ
(
WS_Overflowed
(
bo
->
ws_o
));
if
(
bo
->
do_stream
)
{
HSH_Unbusy
(
&
wrk
->
stats
,
obj
->
objcore
);
HSH_Unbusy
(
&
wrk
->
stats
,
bo
->
fetch_
objcore
);
VBO_setstate
(
bo
,
BOS_STREAM
);
}
...
...
@@ -622,7 +613,7 @@ vbf_stp_condfetch(struct worker *wrk, struct busyobj *bo)
return
(
F_STP_FAIL
);
if
(
!
bo
->
do_stream
)
HSH_Unbusy
(
&
wrk
->
stats
,
obj
->
objcore
);
HSH_Unbusy
(
&
wrk
->
stats
,
bo
->
fetch_
objcore
);
assert
(
al
==
ol
);
assert
(
ObjGetLen
(
bo
->
fetch_objcore
,
bo
->
stats
)
==
al
);
...
...
@@ -700,7 +691,6 @@ vbf_stp_error(struct worker *wrk, struct busyobj *bo)
if
(
vbf_beresp2obj
(
bo
))
return
(
F_STP_FAIL
);
bo
->
vfc
->
body
=
bo
->
fetch_obj
->
body
;
l
=
VSB_len
(
bo
->
synth_body
);
if
(
l
>
0
)
{
...
...
bin/varnishd/cache/cache_panic.c
View file @
6699df59
...
...
@@ -341,8 +341,6 @@ pan_busyobj(const struct busyobj *bo)
pan_ws
(
bo
->
ws_o
,
4
);
if
(
bo
->
fetch_objcore
)
pan_objcore
(
"FETCH"
,
bo
->
fetch_objcore
);
if
(
bo
->
fetch_obj
)
pan_object
(
"FETCH"
,
bo
->
fetch_obj
);
if
(
bo
->
ims_obj
)
pan_object
(
"IMS"
,
bo
->
ims_obj
);
VSB_printf
(
pan_vsp
,
" }
\n
"
);
...
...
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