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
c463be36
Commit
c463be36
authored
Apr 22, 2013
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move beresp.storage to busyobj
parent
4118ad53
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
16 deletions
+16
-16
cache.h
bin/varnishd/cache/cache.h
+2
-2
cache_req_fsm.c
bin/varnishd/cache/cache_req_fsm.c
+5
-5
cache_vrt_var.c
bin/varnishd/cache/cache_vrt_var.c
+8
-8
generate.py
lib/libvcl/generate.py
+1
-1
No files found.
bin/varnishd/cache/cache.h
View file @
c463be36
...
...
@@ -537,6 +537,8 @@ struct busyobj {
double
first_byte_timeout
;
double
between_bytes_timeout
;
const
char
*
storage_hint
;
struct
vsl_log
vsl
[
1
];
struct
dstat
*
stats
;
};
...
...
@@ -645,8 +647,6 @@ struct req {
struct
objcore
*
objcore
;
/* Lookup stuff */
struct
SHA256Context
*
sha256ctx
;
/* This is only here so VRT can find it */
const
char
*
storage_hint
;
/* ESI delivery stuff */
int
gzip_resp
;
...
...
bin/varnishd/cache/cache_req_fsm.c
View file @
c463be36
...
...
@@ -362,7 +362,7 @@ cnt_fetch(struct worker *wrk, struct req *req)
AN
(
req
->
director
);
AZ
(
bo
->
vbc
);
AZ
(
bo
->
should_close
);
AZ
(
req
->
storage_hint
);
AZ
(
bo
->
storage_hint
);
HTTP_Setup
(
bo
->
beresp
,
bo
->
ws
,
bo
->
vsl
,
HTTP_Beresp
);
...
...
@@ -445,10 +445,10 @@ cnt_fetch(struct worker *wrk, struct req *req)
req
->
objcore
=
NULL
;
}
assert
(
bo
->
refcount
==
2
);
bo
->
storage_hint
=
NULL
;
VBO_DerefBusyObj
(
wrk
,
&
bo
);
VBO_DerefBusyObj
(
wrk
,
&
req
->
busyobj
);
req
->
director
=
NULL
;
req
->
storage_hint
=
NULL
;
switch
(
wrk
->
handling
)
{
case
VCL_RET_RESTART
:
...
...
@@ -601,11 +601,11 @@ cnt_fetchbody(struct worker *wrk, struct req *req)
if
(
bo
->
exp
.
ttl
<
cache_param
->
shortlived
||
req
->
objcore
==
NULL
)
req
->
storage_hint
=
TRANSIENT_STORAGE
;
bo
->
storage_hint
=
TRANSIENT_STORAGE
;
AZ
(
bo
->
stats
);
bo
->
stats
=
&
wrk
->
stats
;
req
->
obj
=
STV_NewObject
(
bo
,
&
req
->
objcore
,
req
->
storage_hint
,
l
,
req
->
obj
=
STV_NewObject
(
bo
,
&
req
->
objcore
,
bo
->
storage_hint
,
l
,
nhttp
);
if
(
req
->
obj
==
NULL
)
{
/*
...
...
@@ -631,7 +631,7 @@ cnt_fetchbody(struct worker *wrk, struct req *req)
}
CHECK_OBJ_NOTNULL
(
req
->
obj
,
OBJECT_MAGIC
);
req
->
storage_hint
=
NULL
;
bo
->
storage_hint
=
NULL
;
AZ
(
bo
->
fetch_obj
);
bo
->
fetch_obj
=
req
->
obj
;
...
...
bin/varnishd/cache/cache_vrt_var.c
View file @
c463be36
...
...
@@ -288,26 +288,26 @@ VRT_r_beresp_backend_port(const struct req *req)
}
const
char
*
VRT_r_beresp_storage
(
const
struct
req
*
req
)
VRT_r_beresp_storage
(
const
struct
busyobj
*
bo
)
{
CHECK_OBJ_NOTNULL
(
req
,
REQ
_MAGIC
);
if
(
req
->
storage_hint
!=
NULL
)
return
(
req
->
storage_hint
);
CHECK_OBJ_NOTNULL
(
bo
,
BUSYOBJ
_MAGIC
);
if
(
bo
->
storage_hint
!=
NULL
)
return
(
bo
->
storage_hint
);
else
return
(
NULL
);
}
void
VRT_l_beresp_storage
(
struct
req
*
req
,
const
char
*
str
,
...)
VRT_l_beresp_storage
(
struct
busyobj
*
bo
,
const
char
*
str
,
...)
{
va_list
ap
;
char
*
b
;
CHECK_OBJ_NOTNULL
(
req
,
REQ
_MAGIC
);
CHECK_OBJ_NOTNULL
(
bo
,
BUSYOBJ
_MAGIC
);
va_start
(
ap
,
str
);
b
=
VRT_String
(
req
->
busyobj
->
ws
,
NULL
,
str
,
ap
);
b
=
VRT_String
(
bo
->
ws
,
NULL
,
str
,
ap
);
va_end
(
ap
);
req
->
storage_hint
=
b
;
bo
->
storage_hint
=
b
;
}
/*--------------------------------------------------------------------*/
...
...
lib/libvcl/generate.py
View file @
c463be36
...
...
@@ -391,7 +391,7 @@ sp_variables = (
'STRING'
,
(
'backend_response'
,),
(
'backend_response'
,),
'
R
'
'
B
'
),
(
'obj.proto'
,
'STRING'
,
...
...
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