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
23c608f7
Commit
23c608f7
authored
Nov 05, 2013
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update st->len inside the bo->mtx in VBO_extend() so that it
is always synchronized with obj->len.
parent
27c7ff03
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
17 deletions
+9
-17
cache_busyobj.c
bin/varnishd/cache/cache_busyobj.c
+3
-0
cache_esi_fetch.c
bin/varnishd/cache/cache_esi_fetch.c
+0
-1
cache_fetch.c
bin/varnishd/cache/cache_fetch.c
+0
-1
cache_fetch_proc.c
bin/varnishd/cache/cache_fetch_proc.c
+0
-1
cache_gzip.c
bin/varnishd/cache/cache_gzip.c
+0
-8
cache_obj.c
bin/varnishd/cache/cache_obj.c
+6
-6
No files found.
bin/varnishd/cache/cache_busyobj.c
View file @
23c608f7
...
...
@@ -212,6 +212,7 @@ VBO_DerefBusyObj(struct worker *wrk, struct busyobj **pbo)
void
VBO_extend
(
struct
busyobj
*
bo
,
ssize_t
l
)
{
struct
storage
*
st
;
CHECK_OBJ_NOTNULL
(
bo
,
BUSYOBJ_MAGIC
);
CHECK_OBJ_NOTNULL
(
bo
->
fetch_obj
,
OBJECT_MAGIC
);
...
...
@@ -219,6 +220,8 @@ VBO_extend(struct busyobj *bo, ssize_t l)
return
;
assert
(
l
>
0
);
Lck_Lock
(
&
bo
->
mtx
);
st
=
VTAILQ_LAST
(
&
bo
->
fetch_obj
->
store
,
storagehead
);
st
->
len
+=
l
;
bo
->
fetch_obj
->
len
+=
l
;
AZ
(
pthread_cond_signal
(
&
bo
->
cond
));
Lck_Unlock
(
&
bo
->
mtx
);
...
...
bin/varnishd/cache/cache_esi_fetch.c
View file @
23c608f7
...
...
@@ -101,7 +101,6 @@ vfp_esi_bytes_uu(struct busyobj *bo, const struct vef_priv *vef,
if
(
wl
<=
0
)
return
(
wl
);
VEP_Parse
(
bo
,
(
const
char
*
)
st
->
ptr
+
st
->
len
,
wl
);
st
->
len
+=
wl
;
VBO_extend
(
bo
,
wl
);
bytes
-=
wl
;
}
...
...
bin/varnishd/cache/cache_fetch.c
View file @
23c608f7
...
...
@@ -541,7 +541,6 @@ vbf_stp_condfetch(struct worker *wrk, struct busyobj *bo)
if
(
tl
>
st
->
space
-
st
->
len
)
tl
=
st
->
space
-
st
->
len
;
memcpy
(
st
->
ptr
+
st
->
len
,
sp
,
tl
);
st
->
len
+=
tl
;
al
+=
tl
;
sp
=
(
char
*
)
sp
+
tl
;
sl
-=
tl
;
...
...
bin/varnishd/cache/cache_fetch_proc.c
View file @
23c608f7
...
...
@@ -129,7 +129,6 @@ vfp_nop_bytes(struct busyobj *bo, struct http_conn *htc, ssize_t bytes)
wl
=
HTTP1_Read
(
htc
,
st
->
ptr
+
st
->
len
,
l
);
if
(
wl
<=
0
)
return
(
wl
);
st
->
len
+=
wl
;
VBO_extend
(
bo
,
wl
);
bytes
-=
wl
;
}
...
...
bin/varnishd/cache/cache_gzip.c
View file @
23c608f7
...
...
@@ -55,8 +55,6 @@ struct vgz {
char
*
tmp_snapshot
;
int
last_i
;
struct
storage
*
st_obuf
;
/* Wrw stuff */
char
*
m_buf
;
ssize_t
m_sz
;
...
...
@@ -210,7 +208,6 @@ VGZ_ObufStorage(struct busyobj *bo, struct vgz *vg)
if
(
st
==
NULL
)
return
(
-
1
);
vg
->
st_obuf
=
st
;
VGZ_Obuf
(
vg
,
st
->
ptr
+
st
->
len
,
st
->
space
-
st
->
len
);
return
(
0
);
...
...
@@ -237,8 +234,6 @@ VGZ_Gunzip(struct vgz *vg, const void **pptr, size_t *plen)
*
pptr
=
before
;
l
=
(
const
uint8_t
*
)
vg
->
vz
.
next_out
-
before
;
*
plen
=
l
;
if
(
vg
->
st_obuf
!=
NULL
)
vg
->
st_obuf
->
len
+=
l
;
}
vg
->
last_i
=
i
;
if
(
i
==
Z_OK
)
...
...
@@ -280,8 +275,6 @@ VGZ_Gzip(struct vgz *vg, const void **pptr, size_t *plen, enum vgz_flag flags)
*
pptr
=
before
;
l
=
(
const
uint8_t
*
)
vg
->
vz
.
next_out
-
before
;
*
plen
=
l
;
if
(
vg
->
st_obuf
!=
NULL
)
vg
->
st_obuf
->
len
+=
l
;
}
vg
->
last_i
=
i
;
if
(
i
==
Z_OK
)
...
...
@@ -683,7 +676,6 @@ vfp_testgzip_bytes(struct busyobj *bo, struct http_conn *htc, ssize_t bytes)
return
(
wl
);
bytes
-=
wl
;
VGZ_Ibuf
(
vg
,
st
->
ptr
+
st
->
len
,
wl
);
st
->
len
+=
wl
;
VBO_extend
(
bo
,
wl
);
while
(
!
VGZ_IbufEmpty
(
vg
))
{
...
...
bin/varnishd/cache/cache_obj.c
View file @
23c608f7
...
...
@@ -63,7 +63,6 @@ ObjIter(struct objiter *oi, void **p, ssize_t *l)
{
ssize_t
ol
;
ssize_t
nl
;
volatile
unsigned
u
;
CHECK_OBJ_NOTNULL
(
oi
,
OBJITER_MAGIC
);
CHECK_OBJ_NOTNULL
(
oi
->
obj
,
OBJECT_MAGIC
);
...
...
@@ -98,15 +97,16 @@ ObjIter(struct objiter *oi, void **p, ssize_t *l)
Lck_Lock
(
&
oi
->
bo
->
mtx
);
AZ
(
VTAILQ_EMPTY
(
&
oi
->
obj
->
store
));
VTAILQ_FOREACH
(
oi
->
st
,
&
oi
->
obj
->
store
,
list
)
{
u
=
(
volatile
unsigned
)(
oi
->
st
->
len
);
if
(
u
>
ol
)
{
if
(
oi
->
st
->
len
>
ol
)
{
*
p
=
oi
->
st
->
ptr
+
ol
;
*
l
=
u
-
ol
;
*
l
=
oi
->
st
->
len
-
ol
;
oi
->
len
+=
*
l
;
break
;
}
ol
-=
u
;
nl
-=
u
;
ol
-=
oi
->
st
->
len
;
assert
(
ol
>=
0
);
nl
-=
oi
->
st
->
len
;
assert
(
nl
>
0
);
}
CHECK_OBJ_NOTNULL
(
oi
->
obj
,
OBJECT_MAGIC
);
CHECK_OBJ_NOTNULL
(
oi
->
st
,
STORAGE_MAGIC
);
...
...
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