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
72a19f2f
Commit
72a19f2f
authored
Aug 28, 2013
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Isolate req->busyobj in the state engine.
parent
8489546f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
9 deletions
+6
-9
cache.h
bin/varnishd/cache/cache.h
+1
-1
cache_pipe.c
bin/varnishd/cache/cache_pipe.c
+1
-3
cache_req_fsm.c
bin/varnishd/cache/cache_req_fsm.c
+4
-5
No files found.
bin/varnishd/cache/cache.h
View file @
72a19f2f
...
@@ -996,7 +996,7 @@ const char *reqbody_status_2str(enum req_body_state_e e);
...
@@ -996,7 +996,7 @@ const char *reqbody_status_2str(enum req_body_state_e e);
const
char
*
sess_close_2str
(
enum
sess_close
sc
,
int
want_desc
);
const
char
*
sess_close_2str
(
enum
sess_close
sc
,
int
want_desc
);
/* cache_pipe.c */
/* cache_pipe.c */
void
PipeRequest
(
struct
req
*
req
);
void
PipeRequest
(
struct
req
*
req
,
struct
busyobj
*
bo
);
/* cache_pool.c */
/* cache_pool.c */
void
Pool_Init
(
void
);
void
Pool_Init
(
void
);
...
...
bin/varnishd/cache/cache_pipe.c
View file @
72a19f2f
...
@@ -60,19 +60,17 @@ rdf(int fd0, int fd1)
...
@@ -60,19 +60,17 @@ rdf(int fd0, int fd1)
}
}
void
void
PipeRequest
(
struct
req
*
req
)
PipeRequest
(
struct
req
*
req
,
struct
busyobj
*
bo
)
{
{
struct
vbc
*
vc
;
struct
vbc
*
vc
;
struct
worker
*
wrk
;
struct
worker
*
wrk
;
struct
pollfd
fds
[
2
];
struct
pollfd
fds
[
2
];
struct
busyobj
*
bo
;
int
i
;
int
i
;
CHECK_OBJ_NOTNULL
(
req
,
REQ_MAGIC
);
CHECK_OBJ_NOTNULL
(
req
,
REQ_MAGIC
);
CHECK_OBJ_NOTNULL
(
req
->
sp
,
SESS_MAGIC
);
CHECK_OBJ_NOTNULL
(
req
->
sp
,
SESS_MAGIC
);
wrk
=
req
->
wrk
;
wrk
=
req
->
wrk
;
CHECK_OBJ_NOTNULL
(
wrk
,
WORKER_MAGIC
);
CHECK_OBJ_NOTNULL
(
wrk
,
WORKER_MAGIC
);
bo
=
req
->
busyobj
;
CHECK_OBJ_NOTNULL
(
bo
,
BUSYOBJ_MAGIC
);
CHECK_OBJ_NOTNULL
(
bo
,
BUSYOBJ_MAGIC
);
vc
=
VDI_GetFd
(
NULL
,
bo
);
vc
=
VDI_GetFd
(
NULL
,
bo
);
...
...
bin/varnishd/cache/cache_req_fsm.c
View file @
72a19f2f
...
@@ -685,23 +685,22 @@ cnt_pipe(struct worker *wrk, struct req *req)
...
@@ -685,23 +685,22 @@ cnt_pipe(struct worker *wrk, struct req *req)
AZ
(
req
->
busyobj
);
AZ
(
req
->
busyobj
);
req
->
acct_req
.
pipe
++
;
req
->
acct_req
.
pipe
++
;
req
->
busyobj
=
VBO_GetBusyObj
(
wrk
,
req
);
bo
=
VBO_GetBusyObj
(
wrk
,
req
);
bo
=
req
->
busyobj
;
HTTP_Setup
(
bo
->
bereq
,
bo
->
ws
,
bo
->
vsl
,
HTTP_Bereq
);
HTTP_Setup
(
bo
->
bereq
,
bo
->
ws
,
bo
->
vsl
,
HTTP_Bereq
);
http_FilterReq
(
bo
->
bereq
,
req
->
http
,
0
);
// XXX: 0 ?
http_FilterReq
(
bo
->
bereq
,
req
->
http
,
0
);
// XXX: 0 ?
http_PrintfHeader
(
bo
->
bereq
,
http_PrintfHeader
(
bo
->
bereq
,
"X-Varnish: %u"
,
req
->
vsl
->
wid
&
VSL_IDENTMASK
);
"X-Varnish: %u"
,
req
->
vsl
->
wid
&
VSL_IDENTMASK
);
VCL_pipe_method
(
req
->
vcl
,
wrk
,
req
,
NULL
,
req
->
http
->
ws
);
VCL_pipe_method
(
req
->
vcl
,
wrk
,
req
,
bo
,
req
->
http
->
ws
);
if
(
wrk
->
handling
==
VCL_RET_ERROR
)
if
(
wrk
->
handling
==
VCL_RET_ERROR
)
INCOMPL
();
INCOMPL
();
assert
(
wrk
->
handling
==
VCL_RET_PIPE
);
assert
(
wrk
->
handling
==
VCL_RET_PIPE
);
PipeRequest
(
req
);
PipeRequest
(
req
,
bo
);
assert
(
WRW_IsReleased
(
wrk
));
assert
(
WRW_IsReleased
(
wrk
));
http_Teardown
(
bo
->
bereq
);
http_Teardown
(
bo
->
bereq
);
VBO_DerefBusyObj
(
wrk
,
&
req
->
busyobj
);
VBO_DerefBusyObj
(
wrk
,
&
bo
);
return
(
REQ_FSM_DONE
);
return
(
REQ_FSM_DONE
);
}
}
...
...
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