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
b98d1b05
Commit
b98d1b05
authored
Jan 19, 2016
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass the objcore to VBO_waitlen() instead of deriving it from the busyobj
parent
8656fec9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
+8
-5
cache.h
bin/varnishd/cache/cache.h
+2
-1
cache_busyobj.c
bin/varnishd/cache/cache_busyobj.c
+5
-3
storage_simple.c
bin/varnishd/storage/storage_simple.c
+1
-1
No files found.
bin/varnishd/cache/cache.h
View file @
b98d1b05
...
@@ -671,7 +671,8 @@ double BAN_Time(const struct ban *ban);
...
@@ -671,7 +671,8 @@ double BAN_Time(const struct ban *ban);
struct
busyobj
*
VBO_GetBusyObj
(
struct
worker
*
,
const
struct
req
*
);
struct
busyobj
*
VBO_GetBusyObj
(
struct
worker
*
,
const
struct
req
*
);
void
VBO_DerefBusyObj
(
struct
worker
*
wrk
,
struct
busyobj
**
busyobj
);
void
VBO_DerefBusyObj
(
struct
worker
*
wrk
,
struct
busyobj
**
busyobj
);
void
VBO_extend
(
struct
busyobj
*
,
ssize_t
);
void
VBO_extend
(
struct
busyobj
*
,
ssize_t
);
ssize_t
VBO_waitlen
(
struct
worker
*
,
struct
busyobj
*
,
ssize_t
l
);
ssize_t
VBO_waitlen
(
struct
worker
*
,
struct
objcore
*
,
struct
busyobj
*
,
ssize_t
l
);
void
VBO_setstate
(
struct
busyobj
*
bo
,
enum
busyobj_state_e
next
);
void
VBO_setstate
(
struct
busyobj
*
bo
,
enum
busyobj_state_e
next
);
void
VBO_waitstate
(
struct
busyobj
*
bo
,
enum
busyobj_state_e
want
);
void
VBO_waitstate
(
struct
busyobj
*
bo
,
enum
busyobj_state_e
want
);
...
...
bin/varnishd/cache/cache_busyobj.c
View file @
b98d1b05
...
@@ -236,20 +236,22 @@ VBO_extend(struct busyobj *bo, ssize_t l)
...
@@ -236,20 +236,22 @@ VBO_extend(struct busyobj *bo, ssize_t l)
}
}
ssize_t
ssize_t
VBO_waitlen
(
struct
worker
*
wrk
,
struct
busyobj
*
bo
,
ssize_t
l
)
VBO_waitlen
(
struct
worker
*
wrk
,
struct
objcore
*
oc
,
struct
busyobj
*
bo
,
ssize_t
l
)
{
{
ssize_t
rv
;
ssize_t
rv
;
CHECK_OBJ_NOTNULL
(
wrk
,
WORKER_MAGIC
);
CHECK_OBJ_NOTNULL
(
wrk
,
WORKER_MAGIC
);
CHECK_OBJ_NOTNULL
(
bo
,
BUSYOBJ_MAGIC
);
CHECK_OBJ_NOTNULL
(
bo
,
BUSYOBJ_MAGIC
);
xxxassert
(
bo
->
fetch_objcore
==
oc
);
Lck_Lock
(
&
bo
->
mtx
);
Lck_Lock
(
&
bo
->
mtx
);
rv
=
ObjGetLen
(
wrk
,
bo
->
fetch_objcore
);
rv
=
ObjGetLen
(
wrk
,
oc
);
while
(
1
)
{
while
(
1
)
{
assert
(
l
<=
rv
||
bo
->
state
==
BOS_FAILED
);
assert
(
l
<=
rv
||
bo
->
state
==
BOS_FAILED
);
if
(
rv
>
l
||
bo
->
state
>=
BOS_FINISHED
)
if
(
rv
>
l
||
bo
->
state
>=
BOS_FINISHED
)
break
;
break
;
(
void
)
Lck_CondWait
(
&
bo
->
cond
,
&
bo
->
mtx
,
0
);
(
void
)
Lck_CondWait
(
&
bo
->
cond
,
&
bo
->
mtx
,
0
);
rv
=
ObjGetLen
(
wrk
,
bo
->
fetch_objcore
);
rv
=
ObjGetLen
(
wrk
,
oc
);
}
}
Lck_Unlock
(
&
bo
->
mtx
);
Lck_Unlock
(
&
bo
->
mtx
);
return
(
rv
);
return
(
rv
);
...
...
bin/varnishd/storage/storage_simple.c
View file @
b98d1b05
...
@@ -257,7 +257,7 @@ sml_iterator(struct worker *wrk, struct objcore *oc,
...
@@ -257,7 +257,7 @@ sml_iterator(struct worker *wrk, struct objcore *oc,
while
(
1
)
{
while
(
1
)
{
ol
=
len
;
ol
=
len
;
nl
=
VBO_waitlen
(
wrk
,
bo
,
ol
);
nl
=
VBO_waitlen
(
wrk
,
oc
,
bo
,
ol
);
if
(
bo
->
state
==
BOS_FAILED
)
{
if
(
bo
->
state
==
BOS_FAILED
)
{
ret
=
-
1
;
ret
=
-
1
;
break
;
break
;
...
...
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