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
c8e7c20e
Commit
c8e7c20e
authored
Jan 21, 2016
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Call ObjStable() when the boc goes away.
parent
c95addc6
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
13 deletions
+13
-13
cache.h
bin/varnishd/cache/cache.h
+1
-1
cache_busyobj.c
bin/varnishd/cache/cache_busyobj.c
+0
-2
cache_hash.c
bin/varnishd/cache/cache_hash.c
+2
-0
cache_obj.c
bin/varnishd/cache/cache_obj.c
+4
-4
cache_obj.h
bin/varnishd/cache/cache_obj.h
+1
-1
storage_simple.c
bin/varnishd/storage/storage_simple.c
+5
-5
No files found.
bin/varnishd/cache/cache.h
View file @
c8e7c20e
...
...
@@ -870,7 +870,7 @@ void *ObjSetattr(struct worker *, struct objcore *, enum obj_attr attr,
ssize_t
len
,
const
void
*
);
int
ObjCopyAttr
(
struct
worker
*
,
struct
objcore
*
,
struct
objcore
*
,
enum
obj_attr
attr
);
void
ObjStable
(
struct
worker
*
,
struct
objcore
*
,
struct
b
usyobj
*
);
void
ObjStable
(
struct
worker
*
,
struct
objcore
*
,
struct
b
oc
*
);
int
ObjSetDouble
(
struct
worker
*
,
struct
objcore
*
,
enum
obj_attr
,
double
);
int
ObjSetU32
(
struct
worker
*
,
struct
objcore
*
,
enum
obj_attr
,
uint32_t
);
...
...
bin/varnishd/cache/cache_busyobj.c
View file @
c8e7c20e
...
...
@@ -177,8 +177,6 @@ VBO_DerefBusyObj(struct worker *wrk, struct busyobj **pbo)
if
(
bo
->
fetch_objcore
!=
NULL
)
{
AN
(
wrk
);
if
(
bo
->
fetch_objcore
->
stobj
->
stevedore
!=
NULL
)
ObjStable
(
bo
->
wrk
,
bo
->
fetch_objcore
,
bo
);
(
void
)
HSH_DerefObjCore
(
wrk
,
&
bo
->
fetch_objcore
);
}
...
...
bin/varnishd/cache/cache_hash.c
View file @
c8e7c20e
...
...
@@ -768,6 +768,8 @@ HSH_DerefBusy(struct worker *wrk, struct objcore *oc)
oc
->
boc
=
NULL
;
Lck_Unlock
(
&
oc
->
objhead
->
mtx
);
if
(
r
==
0
)
{
if
(
oc
->
stobj
->
stevedore
!=
NULL
)
ObjStable
(
wrk
,
oc
,
boc
);
VBO_DerefBusyObj
(
wrk
,
&
boc
->
busyobj
);
AZ
(
pthread_cond_destroy
(
&
boc
->
cond
));
Lck_Delete
(
&
boc
->
mtx
);
...
...
bin/varnishd/cache/cache_obj.c
View file @
c8e7c20e
...
...
@@ -256,19 +256,19 @@ ObjUpdateMeta(struct worker *wrk, struct objcore *oc)
}
/*====================================================================
* Called when the b
usyobj
used to populate the objcore is going away.
* Called when the b
oc
used to populate the objcore is going away.
* Useful for releasing any leftovers from Trim.
*/
void
ObjStable
(
struct
worker
*
wrk
,
struct
objcore
*
oc
,
struct
b
usyobj
*
bo
)
ObjStable
(
struct
worker
*
wrk
,
struct
objcore
*
oc
,
struct
b
oc
*
boc
)
{
const
struct
obj_methods
*
m
=
obj_getmethods
(
oc
);
CHECK_OBJ_NOTNULL
(
wrk
,
WORKER_MAGIC
);
CHECK_OBJ_NOTNULL
(
bo
,
BUSYOBJ
_MAGIC
);
CHECK_OBJ_NOTNULL
(
bo
c
,
BOC
_MAGIC
);
if
(
m
->
objstable
!=
NULL
)
m
->
objstable
(
wrk
,
oc
,
bo
);
m
->
objstable
(
wrk
,
oc
,
bo
c
);
}
/*====================================================================
...
...
bin/varnishd/cache/cache_obj.h
View file @
c8e7c20e
...
...
@@ -43,7 +43,7 @@ typedef int objgetspace_f(struct worker *, struct objcore *,
ssize_t
*
sz
,
uint8_t
**
ptr
);
typedef
void
objextend_f
(
struct
worker
*
,
struct
objcore
*
,
ssize_t
l
);
typedef
void
objtrimstore_f
(
struct
worker
*
,
struct
objcore
*
);
typedef
void
objstable_f
(
struct
worker
*
,
struct
objcore
*
,
struct
b
usyobj
*
);
typedef
void
objstable_f
(
struct
worker
*
,
struct
objcore
*
,
struct
b
oc
*
);
typedef
void
objslim_f
(
struct
worker
*
,
struct
objcore
*
);
typedef
void
*
objgetattr_f
(
struct
worker
*
,
struct
objcore
*
,
enum
obj_attr
attr
,
ssize_t
*
len
);
...
...
bin/varnishd/storage/storage_simple.c
View file @
c8e7c20e
...
...
@@ -484,19 +484,19 @@ sml_trimstore(struct worker *wrk, struct objcore *oc)
}
static
void
__match_proto__
(
objstable_f
)
sml_stable
(
struct
worker
*
wrk
,
struct
objcore
*
oc
,
struct
b
usyobj
*
bo
)
sml_stable
(
struct
worker
*
wrk
,
struct
objcore
*
oc
,
struct
b
oc
*
boc
)
{
const
struct
stevedore
*
stv
;
struct
storage
*
st
;
CHECK_OBJ_NOTNULL
(
wrk
,
WORKER_MAGIC
);
CHECK_OBJ_NOTNULL
(
oc
,
OBJCORE_MAGIC
);
CHECK_OBJ_NOTNULL
(
bo
,
BUSYOBJ
_MAGIC
);
CHECK_OBJ_NOTNULL
(
bo
c
,
BOC
_MAGIC
);
if
(
bo
->
bo
c
->
stevedore_priv
==
NULL
)
if
(
boc
->
stevedore_priv
==
NULL
)
return
;
CAST_OBJ_NOTNULL
(
st
,
bo
->
bo
c
->
stevedore_priv
,
STORAGE_MAGIC
);
bo
->
bo
c
->
stevedore_priv
=
0
;
CAST_OBJ_NOTNULL
(
st
,
boc
->
stevedore_priv
,
STORAGE_MAGIC
);
boc
->
stevedore_priv
=
0
;
CHECK_OBJ_NOTNULL
(
st
,
STORAGE_MAGIC
);
stv
=
oc
->
stobj
->
stevedore
;
CHECK_OBJ_NOTNULL
(
stv
,
STEVEDORE_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