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
c95addc6
Commit
c95addc6
authored
Jan 21, 2016
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify the handover to the fetch-thread: the req-side doesn't
need the busyobj at all now.
parent
ba104c92
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
13 deletions
+15
-13
cache_fetch.c
bin/varnishd/cache/cache_fetch.c
+15
-13
No files found.
bin/varnishd/cache/cache_fetch.c
View file @
c95addc6
...
...
@@ -967,7 +967,8 @@ void
VBF_Fetch
(
struct
worker
*
wrk
,
struct
req
*
req
,
struct
objcore
*
oc
,
struct
objcore
*
oldoc
,
enum
vbf_fetch_mode_e
mode
)
{
struct
busyobj
*
bo
,
*
bo_fetch
;
struct
boc
*
boc
;
struct
busyobj
*
bo
;
const
char
*
how
;
CHECK_OBJ_NOTNULL
(
wrk
,
WORKER_MAGIC
);
...
...
@@ -994,9 +995,9 @@ VBF_Fetch(struct worker *wrk, struct req *req, struct objcore *oc,
THR_SetBusyobj
(
bo
);
assert
(
HSH_RefBusy
(
oc
)
==
bo
->
b
oc
);
bo_fetch
=
bo
;
boc
=
HSH_RefBusy
(
oc
);
AN
(
boc
)
;
assert
(
boc
==
bo
->
boc
);
AN
(
bo
->
vcl
);
...
...
@@ -1021,7 +1022,7 @@ VBF_Fetch(struct worker *wrk, struct req *req, struct objcore *oc,
AZ
(
bo
->
req
);
bo
->
req
=
req
;
bo
->
fetch_task
.
priv
=
bo
_fetch
;
bo
->
fetch_task
.
priv
=
bo
;
bo
->
fetch_task
.
func
=
vbf_fetch_thread
;
if
(
Pool_Task
(
wrk
->
pool
,
&
bo
->
fetch_task
,
TASK_QUEUE_BO
))
{
...
...
@@ -1029,22 +1030,23 @@ VBF_Fetch(struct worker *wrk, struct req *req, struct objcore *oc,
(
void
)
vbf_stp_fail
(
req
->
wrk
,
bo
);
if
(
bo
->
stale_oc
!=
NULL
)
(
void
)
HSH_DerefObjCore
(
wrk
,
&
bo
->
stale_oc
);
HSH_DerefBusy
(
wrk
,
bo
->
fetch_objcore
);
HSH_DerefBusy
(
wrk
,
oc
);
}
else
{
bo
_fetch
=
NULL
;
/* ref transferred to fetch thread */
bo
=
NULL
;
/* ref transferred to fetch thread */
if
(
mode
==
VBF_BACKGROUND
)
{
ObjWaitState
(
bo
->
bo
c
,
BOS_REQ_DONE
);
ObjWaitState
(
boc
,
BOS_REQ_DONE
);
}
else
{
ObjWaitState
(
bo
->
bo
c
,
BOS_STREAM
);
if
(
bo
->
bo
c
->
state
==
BOS_FAILED
)
{
ObjWaitState
(
boc
,
BOS_STREAM
);
if
(
boc
->
state
==
BOS_FAILED
)
{
AN
((
oc
->
flags
&
OC_F_FAILED
));
}
else
{
AZ
(
bo
->
fetch_objcore
->
flags
&
OC_F_BUSY
);
AZ
(
oc
->
flags
&
OC_F_BUSY
);
}
}
}
AZ
(
bo
_fetch
);
AZ
(
bo
);
VSLb_ts_req
(
req
,
"Fetch"
,
W_TIM_real
(
wrk
));
HSH_DerefBusy
(
wrk
,
bo
->
fetch_objcore
);
assert
(
oc
->
boc
==
boc
);
HSH_DerefBusy
(
wrk
,
oc
);
THR_SetBusyobj
(
NULL
);
}
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